Learn Ruby on Rails or learn MVC for ASP.NET?

Ruby on Rails has a released version 2.0 and I think based on some of the new and improved changes that it maybe the time to finally jump ship on ASP.NET and move over to Ruby on Rails.  
The one problem that I’ve had with RoR in the past is that it just does not scale.   I’m hoping that this gets resolved and makes my decision easier. My other choice is to continue using ASP.NET and see how their new MVC model is going to be like?
Is it better to use a framework like Ruby on Rails where MVC was designed from the beginning or as an afterthought to ASP.NET. ASP.NET is really started to feel bloated.
It’s reminding me of the days back in VB 6 and web development.  Visual Basic (before .net days) was not designed for the web but as an afterthought.  VB 6  you could develop web applications several ways.  You could just use ASP with vbscript, ASP with VB COM dlls, VB with COM Control running in MTS or VB 6 web classes. They all have their plus and minuses but again they were an after thought.   
 This is what I feel ASP.NET is becoming. You can do it the old way (Web Forms), AJAX way (which is bloated and I’d prefer to use jQuery or Protoype), and now MVC. I don’t know enough of it yet to make an educated decision but at this point should I just jump and move over to RoR instead? Decisions, decisions…. 

Microsoft’s answer to .net Open Source Projects: Hire the developers and stop the development!!

Am I the only one that has noticed a disturbing trend going on with the .net open source projects? Instead of them being supported by developer community, Microsoft is hiring the developers that created them like they are going out of style.

Sure, at the moment it looks like it could be a good thing, but in the end is the source code being owned by Microsoft or will they still be truly open source? 

It first started out out with Jon Lam with his Ruby port to .net.  Then Phil Haack with SubText and finally Rob Conery with SubSonic.

I guess I find it a bit ironic that these Open Source developers would have no problem drinking the kool-aid  so easily.  Don’t get me wrong I think its great that they are working at Microsoft, they need to make a living.

I put this way, its like a politician who’s a Democratic one day, is now running as a Republican because someone gave them some money. However they are still able to be continue their liberal agenda. Would this not seem a little strange to you?

These are definitely strange times we live in.

Why can’t the .net community be more like the Ruby on Rails community?

I’ve been reading a few blogs lately about how the .net community has let down some open source projects. The one that has comes to mind was nDoc. I’m guilty of this myself. However as I’ve become more aware of the importance of such projects I’ve realized the importance of either donating time or money to them to help them grow.
I had fallen into the trap that the .net community was only MSDN. Don’t get me wrong, this has been a wealth of information but I never felt I belonged to a community. The problem with having really only one voice in the community (Microsoft), some things important to the development community go largely ignored. Partly because Microsoft may feel that it’s not worth pursuing. I don’t blame them. I’ve met members of the tools team at Microsoft and I know they want to build the best development tools out there. However, they are only one company and they can’t build or think of everything. At the end of the day they need to make money!
Ruby on Rails Logo

The last 4 to 6 months, I’ve been getting my feet wet with Ruby on Rails. What I can tell you is that the Ruby on Rails community is thriving! Every day I find new information about the framework and how people are really excited about using it to build applications very quickly.  If there is something missing, many people have worked together to add it.

At the beginning I thought I was the only .net developer by day and a ruby on rails enthusiast by night. Wow was I wrong! I’m finding people online everday day that are doing the exact same thing!  It makes you stop to think why?  Is it because of the lack of tools in .net or is the lack of community that people are craving for!
I make my bread and butter with the .net framework but I’ve fallen in love with Ruby on Rails! Reading up on Rails has had me rethink of better ways of writing applications in C#.

On a positive note, I’ve seen that Microsoft has been paying attention to what’s going on in the rails community. (And other scripting languages) Features that make ruby so powerful have been adopted in the next version of C#. (LINQ is a perfect example of this)

Even if Ruby on Rails is the flavor of the month and eventually becomes yesterday’s news, it has had a positive effect of the future of the development languages. This has all been possible by a growing and supportive community like Ruby on Rails!

Visual Studio 2005 Tip #5 Using the Back/Forward mouse buttons to navigate

If you own a Microsoft Explorer mouse, or one that has the back/forward buttons you can navigate back and forth through your code.

For example if you need to see a defintion, right click and select “Go To Definition” from the popup menu.

You are taken to the definition.

Now how many times do you need to go back to where you we’re working?

Simply click the back button on your mouse! Viola! You are now back to where you were before!

If you need to go forward again and look at the defintion, click the the forward button on yor mouse

OK so that’s all great if you like using the mouse. So how would you do it with the keyboard?

Tip #5b: Using the Keyboard to navigate to a definition and back.

Have the cursor over the item you want to get the defintion for and click the F12 key. Sweet! But now how to we get back? Press Ctrl + - (minus key). If you want to back to the definition again press Ctrl + - (minus key) again! There you have it!

NOTE: These key strokes assume you have selected the Visual Studio.net keyboard layout.  I have not tested this with any of the other layouts.

Visual Studio 2005 Tip #4: Column Selecting Text

There are times when you need to select text in column mode instead of the tradtional row selection. Think of it like selecting a range of columns and rows in Excel.

For example, lets say I want to highlight all the strings from this section of constants because you want to put into a store procedure as input parameters.
The image “http://static.flickr.com/21/98461267_8d67f24660.jpg?v=0” cannot be displayed, because it contains errors.

Move the cursor to the beginning column you want to start highlighting from. Hold down the ALT key and then press and hold down the left mouse button. Then Highlight the code you want with the mouse or arrow keys. Once you have the code you need, simply copy ( + C), cut ( + X), paste ( + V) or delete.
The image “http://static.flickr.com/32/98461269_a31ccc6621.jpg?v=0” cannot be displayed, because it contains errors.
Now the clipboard has stored only the text that is highlighted above. The only thing now is remove the quotes and the semi-colons in when posting it in your stored procedure!

ALT + Left Mouse button = Column Text Selection

This feature also works in Visual Studio 2003. (It may work in 2001 but I have not used it in several years to remember)

technorati tags: ,

Visual Studio 2005 Tips #3: Using Surround with …

Another nice feature that will save on time and re-indenting your code is the Surrounds with snippets.  It works the same way as Code Snippets but the difference is that you highlight a section of code that you want to surround your code with.

This example I am going to surround a section of my code with a try catch.  The keyboard short cut is Ctrl + K and the S.

A popup combo box will appear asking you what type.  You can selec the you want to surround with.  Since I am going to use a try catch, I can hit the “T” key and then hit enter.

My code is now surrounded by a try/catch with the Exception object available for me to assign a variable to.

Visual Studio 2005 Tip#2:Writing your own Code Snippets

Now that you’ve seen the power of using Code Snippets, the only thing cooler is creating your very own code snippets!

The best tool that I’ve seen to help you create your own is one from Microsoft. It’s actually an open source project that if want to contribute to, you can.

You can download it from the MSDN website.

Visual Studio 2005 Tips #1: Code Snippets

One of the new features of Visual Studio 2005 is the ability to use Code Snippets.

At times coding can be very repeative and the 9 out of 10 times its the same thing that I am typing.  By using the snippets feature I can reduce this.

So How do you insert a Code Snippet?
The fastest way is from the keyboard Press the Ctrl key + K and then X.

A popup window will appear for you do select the available snippets.  There are several to choose from and you can even create your own!  For this tip I am going to do a Property snippet. Press ‘P’ on your keyboard or scroll through the list and select it.
Flickr Photo

Your code will now have the snippet template of the property item in place.  Very cool!  However the best is yet to come!  Notice that the private data member type is highlighted. 

Flickr Photo

Go ahead and change it to the type you need.  I am going to change mine to a string.
Flickr Photo

To change the name of the private data member simply hit the tab key.  Now the highlighted box is around the private data member name.  Type in the name you would normally give your private data members.
Flickr Photo

One really nice feature is the set and get values have been modified automatically to the same name as the private data member.

Finally tab one more time and enter your property Name.

Flickr Photo
Once you like what you see hit the enter key.  However if you want to change any of the values you made you can simply hit the tab key again and it cycle through them all. (You can’t do this after hit the enter key though)

To me this is one of my favorite features and I find myself constantly doing these key strokes when I am in Visual Studio 2003. One more reason to port everything over to .net 2.0!