Not bad for a bastard. |
I am going through a similar transition right now as I learn how to run my own business and master this funny technology known as MVC. In this blog, I want to talk about MVC and how I am starting to slowly like this bastard child of PHP and ASP classic.
MVC stands for Model View Controller and it is touted as different means of building web application in the ASP.NET framework. MVC partisans claim that this approach better supports test-driven development, total control over HTML generated on the page and divides complexity of the application into meaningful chunks.
When confronted with MVC3 in August 2011, I felt a wave of despair because it looked like I would have to unlearn everything I have ever done with web development over my entire career. It also did not help that my manager used to say things like, "..of course you don't know any better you are a web forms guy."
Instead of a page with code behind as is typical in web forms, I had a controller which handled the http behavior, a view which had no server controls , and models which are nothing more than classes which are passed between the controller and view. Even the markup on the view seemed alien looking like old ASP classic.
Matters were made worse by MVC3's steep learning curve. Unlike web forms which allow a gradual learning process from entry level developer to master. MVC demanded you code a particular way right away. It felt like learning to fly in an F-15 fighter jet instead of a single prop Cessna. It was maddening being given tasks in MVC which would have taken me hours with web forms taking days and weeks.
Over the last six months I have gone from completely helpless with MVC3 to an entry level developer. I still feel that the training books out in the market need to be better to help web forms developers make the transition. I also feel that Microsoft and its partners could provide more classroom style training to get developers up to speed. If I ever get a chance, I might write a book on the subject.
Complaints aside, I have learned to like MVC. Thanks to MVC3 and JQuery mobile, it is easy to write mobile application. They do not even need to download an application. Just fire up the smart phone web browser and you are in business. I also like MVC3's ability to finely control HTML so that CSS and JQuery behave in a cleaner fashion. The security model of MVC 3 is exactly the same as web forms which allows you to use the same security for a web forms application as a phone application. Finally, MVC has forced me to be a better object oriented developer and improved my LINQ skills.
I may be just a "web forms developer," but I understand where MVC fits in the pantheon of web development. Barrowing from Greek mythology, the hero Perseus was the bastard son of Zeus and Danae. Somehow in spite of his questionable upbringing, Perseus turned out OK. I expect similar things from MVC.
Until next time.
No comments:
Post a Comment