Monthly Archives: June 2007

Serious Geek

I work with smart people everyday but the number of times I meet or hear about a real geek seem much more rare.

Here is a link from John Lam’s blog about Steve Yegge who ported Rails, yes as in Ruby on Rails, to JavaScript.  I work with JavaScript but can’t say I really enjoy it, this guy must love it to take on a project like this.

Steve works at Google and wanted to use Ruby on Rails, but Google is not a Ruby shop but they use JavaScript, so Steve decided to port Rails to JavaScript.  This is very cool, it would be interesting to see how well it works.

Technorati Tags: , ,

Find Web Applications Fast

I came across this new search engine recently called Simple Spark.  Simple Spark is not yet another Google wannabe but a place to look for web-based applications that solve a problem you have or one you didn’t even knew you had.

If you are looking for a place to solve a business problem or compare to an idea you may have, this looks like a great place to start.

A quick search for software development related web applications revealed the results below:

simplespark

Technorati Tags: ,

Subversion Bridge Coming…

I caught a post from Harry Pierson about SVNBridge, a bridge for using Subversion clients as a client for Team Foundation Server.    The original post came from Brad Wilson who does some nice work with Codeplex.

I use Team Explorer on a daily basis from Visual Studio as my client to Team Foundation Server.  Until recently SVNBridge would not have interested me very much but I have switched over to Subversion for consulting projects and some products I am working on.  I still use Visual Studio but use VisualSVN, which is a nice client for Subversion that is an add-in to Visual Studio.

What makes this compelling?  There are many more projects running under Subversion today and many small companies using it but there are large companies set on Team Foundation Server, now with SVNBridge you can run a client like VisualSVN or TortoiseSVN and have access to your Subversion repositories AND any Team Foundation Server repositories you may work with.  This gives you one client and access to two types of repositories.

I think Microsoft has realized Subversion is real and they need to have some support for it.  This is good new indeed.

Technorati Tags: , ,

links for 2007-06-12

Converting to Subversion for Visual Studio 2005 Source Control.

I have used Visual SourceSafe for source control for many years.  Most recently I have used either Vault from Sourcegear or Team Foundation Server from Microsoft.   When I am working from home on smaller projects Vault has been my tool of choice, they give a free single-user licence, but they rely on Microsoft SQL Server which needs to be maintained and is therefore not very practical.

So, after much searching on the net for what others were using the answers kept coming up Subversion, which is an open-source version control system that many open-source projects have turned to.  I have heard of both Subversion and CVS but not being much of an open source guy I was not that familiar with it.  I decided to give it try and was pleasantly surprised how easy it was to setup and use.  Subversion is command line tool and for those used to MS-DOS it is not too bad. 

Since most of my days are spent using a graphical user interface (Windows XP) I tried to find a version control system which would support a GUI.  Other than the ones I have been using (Vault, Team Foundation, Visual SourceSafe), there was little to be found except…TortoiseSVN.  TortoiseSVN installs itself into Windows Explorer and is activated through right mouse click on a directory in Explorer to manage the repository.  It is a seamless integration into Explorer and very nice to use.

TortoiseSVN offers a wonderful set of features such as managing all branch, commits and reports right from Windows Explorer.  The version, 1.43, as of this writing really is feature rich.   From the TortoiseSVN site:

Features of TortoiseSVN/Subversion

  • Easy to use
    • all commands are available directly from the windows explorer.
    • only commands that make sense for the selected file/folder are shown. You won’t see any commands that you can’t use in your situation.
    • See the status of your files directly in the Windows explorer
    • descriptive dialogs, constantly improved due to user feedback
    • allows moving files by right-dragging them in the windows explorer
  • All Subversion protocols are supported
    • http://
    • https://
    • svn://
    • svn+ssh://
    • file:///
    • svn+XXX://
  • Powerful commit dialog
  • The big picture
  • Per project settings
    • minimum log message length to avoid accidentally committing with an empty log message
    • language to use for the spell checker
  • Integration with issue tracking systems

    TortoiseSVN provides a flexible mechanism to integrate any web based bug tracking system.

    • A separate input box to enter the issue number assigned to the commit, or coloring of the issue number directly in the log message itself
    • When showing all log messages, an extra column is added with the issue number. You can immediately see to which issue the commit belongs to.
    • Issue numbers are converted into links which open the webbrowser directly on the corresponding issue
    • Optional warning if a commit isn’t assigned to an issue number
  • Helpful Tools
  • Available in many languages
  • TortoiseSVN is stable
    • Before every release, we create one or more ‘release candidates’ for adventurous people to test first.
    • During development cycles, many people test intermediate builds. These are built every night automatically and made available to all our users. This helps finding bugs very early so they won’t even get into an official release.
    • A big user community helps out with testing each build before we release it.
    • A custom crash report tool is included in every TortoiseSVN release which helps us fix the bugs much faster, even if you can’t remember exactly what you did to trigger it.
  • Support
    • Extensive and descriptive documentation is available in several formats and languages
    • A big list of frequently asked questions and problems with all the answers is also available
    • For your specific problems, we have a mailing list where many users can help you. Usually you get an answer for your problem within a few hours.

TortoiseSVN makes a great Subversion client but working within Visual Studio is difficult to manage the Subversion repository by first checking them out in Windows Explorer.  I found a great Visual Studio add-in called VisualSVN that integrates into Visual Studio and allows management of the repository much the same way Visual SourceSafe and Team Foundation Server. 

VisualSVN comes with a price tag of $49.  I am not affiliated with this company in any way, just a happy customer. 

I am just learning how to setup and manage a Subversion repository, along the way I found this great free book available, one which is also published by O’Reilly.  I am sure the authors would rather see you order the book from Amazon or another retailer but who can argue when it’s made available for free online.

I have been using Subversion for a few weeks now and very happy with it so far.  I think for small teams this will work out very well.

Ruby in Steel 1.1 Released

Version 1.1 of Ruby in Steel has been released.  This is a Ruby development environment that is an add-in to Visual Studio 2005 and becomes an integral part of the environment.  I live in Visual Studio much of my day and being able to create Ruby and Ruby on Rails applications within Visual Studio is really nice.

I have blogged about Ruby in Steel recently and have been using the tool for a while now and really happy with it.  I am also very happy with their support as well.

I can’t say enough good things about how nice this environment makes life so nice for someone who primarily focuses on Visual Studio development but wants to do some Ruby and Rails development and get up-to-speed quickly.  The integration with all the nice Rails-ish tools like Gem, Rake and Capistrano is a huge bonus.

(GIF)

Podcast : Rubyology

I came across a new Ruby on Rails podcast recently called Rubyology by Chris Matthieu who founded Numly.

Chris’s podcast include introductions and reviews to frameworks such as Camping and Hobo and include various screencasts showing their use and general Ruby and Rails techniques.

These podcasts run about 1/2 hour each and are very good, especially for a novice.   The content is geared more toward development than another podcast I really enjoy, Rails Podcast.

Technorati Tags: ,

Object Relational Mapping (O/RM) is Manageable

The topic of Object Relational Mapping or O/RM can be found all over the web in various weblogs and forums debating whether O/R-M was a useable technology or not and the pros and cons to using it. 

Ted Neward always has great posts on technology from both the .NET and Java perspective.  Ted knows both sides very well and it is refreshing to see someone is not an anti-Microsoft person arguing against a non-Java person, which gets very old.

O/RM holds the promise of encapsulating our entire database schema into objects, which is much easier to understand from an object hierarchy perspective.

Ted has had some interesting posts on O/RM in the past, one in particular relating O/RM as the Vietnam of Computer Science.NET Rocks recently had a show dedicated to O/RM call the “ORM Smackdown” where Ted Neward and Oren Eini had a debate about O/RM.  It was a good show and Ted had a follow-up post to the show, which is worth a read.

Successful O/RM Project

The point of this post is not to debate whether O/RM is good or bad but to show any technology can be successful if done correctly.   There are many ways to do something correctly, this just happens to be an overview how we did it.

I am a consultant and one of my current projects is for a major pharmaceutical company.  The project is meant to revolutionalize the way drugs are manufactured.  O/RM is a technology we use to assist developers with focusing on our entities (business objects) and how they interact with each other instead of how to use ADO.NET to interact with Microsoft SQL Server 2005.  The software is written in C# and developers realize the benefits of what O/RM can do for them by making our entities native C# classes.

We built a custom application to generate stored procedures, entity classes and a data access layer.  At the heart of the application is an XML document that defines how the entities are related, this document removes the flat nature of the SQL schema we use.  For example, we may have an entity called Customer which has an address, order history and contact information.  Each of these parts of  the entire Customer may live in it’s own table but from the object perspective each may be a property or collection, part of the complete Customer.

Our tool allows the user to connect to a database which in turn reads the table schema, views, indexes, stored procedures and functions from the the database and loads everything into memory.  The XML document is read in and is validated against the database for schema changes and automatically updates itself.

The combination of this document and the in-memory database information allows the user to generate a complete data access layer and entity classes for the developer to use. 

Manageability

My description is very vague the result is real.  A complete and clear set of classes representing an entity hierarchy which allows the developer to use domain specific objects and not be concerned with SQL in the least.  The data access classes are proven, the entities are complete.  Schema changes and stored procedures are integrated into the nightly build process.  We have the best of both worlds with having a complete object hierarchy representing our domain and use of stored procedures to get away from the dynamic SQL issues.

Granted, this is not a solution for all situations but it does work in ours and it could work in many others.  The code generator we used was written from scratch but if we had to do it again we would probably use CodeSmith and create a family of templates.  The technology used to generate code is really irrelevant, but the techniques are solid and have worked for a few years now.

Conclusion

Overall our implementation is very clean and works very well.  I know we would change some of the implementation but the overall design would pretty much be the same.   I welcome questions about our implementation or suggestions how you had a successful O/RM deployment and successfully maintain that deployment.

Technorati Tags: ,

Martin Fowler on Ruby and Microsoft

In the event you are a Ruby enthusiast and have been living under a rock, Martin Fowler has an interesting post on his view of Microsoft’s lack of open source support, their intent with Ruby and AlphaGeeks ramblings.

I don’t know if I agree with all of his thoughts such as his pat-on-the-back of Sun and their brilliance with JRuby, that is yet to be seen.  I do think he points out some good observations about Microsoft’s attempt at bringing Ruby and Python to the CLR and how these implementations will be handled.  Hopefully Microsoft won’t change Ruby in any way and will just support Ruby as Ruby.

Give the post a read if you get a chance, at least it’s thought provoking.

Technorati Tags: ,

Great Ruby Development Environment for Windows

I am a Microsoft Windows developer by day, writing C# .NET Windows client and web application to make a living.  I use Visual Studio 2005 for my day-to-day work and I have to say, I am spoiled by many of the features Microsoft has baked into the application. 

I am also infatuated by Ruby and Ruby on Rails and the developer productivity I can realize with using the language and it’s primary framework, Rails.  Although Ruby runs on so many different operating systems, Rails developers seem to be either Apple Macintosh users and therefore Unix developers or they use some flavor of Linux. 

Being the Windows developer that I am, I have to admit it has been difficult for me to feel productive at all trying to learn Linux, MySQL, Ruby and a new text editor, be it TextMate or even Emacs.   The learning curve for all of these technologies is quite steep to be productive.  All of the commands in Linux alone is overwhelming, combined with setting up and configured Apache for the web server is crazy.  Yes, I am a Windows developer and probably spoiled a bit but I like my tools.

So, the point of my post…a great development environment in Windows is Visual Studio .NET 2005 and combine that with a great add-in for Ruby development from Sapphire in Steel Software called Ruby in Steel and you have a great Ruby and Ruby on Rails development environment.  I am learning Ruby and Ruby on Rails and I am not familiar enough with the libraries to be productive and Ruby in Steel gives me a great tool known as Intellisense.  Yes, Intellisense for Ruby, imagine the concept.  It’s one key piece missing from all those Mac and Linux Ruby developers out there.  Visual Studio developers are spoiled by Intellisense but I think it’s a necessary tool for productive development on any platform.  It just doesn’t make sense to me to not use it or look for a tool which has it.

Ruby in Steel is  a wonderful tool, in version 1.0 even.  The price tag of $199 right now is also a steal.  Sure, I can develop for free but the time saved by not having to look up methods of an object is worth the $199 price.

Here is an shot of the development environment from the Sapphire in Steel site:

Click for larger image

and here is another image showing Rails development:

Click for larger image

As you can see this is native development for a Microsoft Windows Visual Studio .NET developer.

Ruby in Steel also integrates with many of the Rails tools, such as:

  • Rake
  • Capistrano
  • LightTPD

The nice thing about using this tool is all of the integration under-the-hood manages the Ruby and Gem environment just like I typed it in from the command line.  This makes it nice so I can learn Ruby and Rails and not have to worry about some of the support functions up front, I can learn as I go.

I am not alone as a Rails-wannabe-developer stuck in a Microsoft world.   There is a great web site called Softies on Rails which I read often.  These guys have lived in the Microsoft world and transitioned over successfully, so they understand both sides.

I have a project I am developing in Rails which I will make into a commercially available product for a monthly fee along with a free version, the same model 37Signals uses.  I will document my real-world use of Ruby in Steel and how well it works for me to manage deployment and such.

Technorati Tags: ,