RSS

Monthly Archives: January 2011

Getting acquainted with ASP.NET MVC

After several years of professional development mainly in ASP.NET Web Forms (1.x, 2, 3.5 and 4), I have decided to start learning ASP.NET MVC. The general idea was to learn a different web development technique in .NET, in order to be able to decide in the future which technology is more suitable per project requirements. I remember reading post(s) several years ago which stated that basically web forms is a “sort of MVC”, long before ASP.NET MVC was developed (or so I think). The markup being the View, the code behind was the Controller, and the data objects were the Model. Apparently this isn’t the case.

It is my impression that there’s a really large buzz around ASP.NET MVC and I’m curious whether this is “justifiable”. In my MVC-newbie eyes, ASP.NET MVC code resembles classic ASP: Server side code is embedded within Client side code (or is it the other way around??). I did enjoy classic ASP at the time, before ASP.NET, but I really wouldn’t want to return to those days. In short, MVC “better be worth the buzz”.

In order to learn ASP.NET MVC, I have decided to take on a “pet” project. I believe that developing a “real world” project is the better way of learning programming. You can watch sample code or video lectures, but I believe that hands-on development is when you really get to know things. Just like in driving: you can learn theory as much as you want, but it doesn’t mean that you can drive. You know how to drive only after you have practiced driving. And the more you drive and gain experience, the better driver you become. So, every now and then I (re)write projects in new technologies. This “pet” project is not only designated to learn MVC, but other stuff too, such as the Entity Framework 4, JQuery UI and others. I also intend on using professional but free templates I found in http://www.freewebtemplates.com.

So, in order to learn ASP.NET MVC I have taken several steps. I believe that the first steps were to view some of Scott Hanselman video intros. Those videos led me to other interesting posts. So far I can recommend those:

  1. MVC basics: although this relates to MVC2 (MVC3 just been released), its a great “hello world” video.
  2. While we’re at it, I thought it’s a good idea to start MVC with the new Razor View engine. So Scott Gu has a good intro post on razor.
  3. Scott Hanselman has several Ninja tips videos which are quite useful: http://channel9.msdn.com/Blogs/matthijs/ASPNET-MVC-2-Ninja-Black-Belt-Tips-by-Scott-Hanselman and http://www.hanselman.com/blog/PDC09ASPNETMVC2NinjasStillOnFireBlackBeltTips.aspx. Note: I don’t quite remember if they have overlapping tips or not.
  4. In one of the lectures, Scott recommended the Route Debugger. This is really a great utility.
  5. For using Ajax in MVC, I read this great post: http://dotnetslackers.com/articles/aspnet/ASP-NET-MVC-2-0-and-AJAX-Part-1.aspx.

After being through these, I experimented some of the stuff on one or two sample MVC projects. Once I felt confident enough with the basics, I started my pet project, today.

 
3 Comments

Posted by on 30/01/2011 in Software Development

 

Tags: , , ,

 
Follow

Get every new post delivered to your Inbox.

Join 60 other followers