I know very little about ASP.net and I’m quite interested in MVC frameworks. (since most of my work involves the V in MVC). Have Microsoft finally come to the MVC party then? I put my name down for the Wednesday night talk to investigate.
In the past, as an outsider, I always looked at Microsoft-related web application frameworks with some manner of distaste. The markup it produced was horrible. It required licensing fees. And the caliber of the average developer was nothing short of mediocre. My ignorant, judgemental foundations. I decided to cast my judgements aside and see how the other half works.
Brad’s talk gave a brief intro of MVC. Familiar territory. A Controller prepares the Model for a View. Views are presentation only, etc. In contrast, ASP.net is what’s traditionally known as a Model 1 Framework. Business logic can be and is used within the View. To get the most out of ASP.net, some developers have created their own MVC frameworks using ASP.net with much success. This is the first time Microsoft is adopting MVC in an official capacity. About time.
Brad described how the team in Seattle was working through the transition from View-Centric architecture to the more separated MVC approach. They’ve broken many things along the way, but they’re forging forward.
The ASP.net IDE is quite a beast. Helper functions pop out of every period. I imagine that a competent developer can generate code at lightning speed within Visual Studio. Quite the stark contrast between say using Emacs.
Being familiar with Altova‘s excellent XMLSpy, I almost felt a kinship with Visual Studio’s interface.
The IDE has it’s typical Projects folder, with subfolders for Models, Views and Controllers, and interestingly enough a whole section dedicated to Unit Testing components.
Brad flipped through some Unit tests, created a Controller Function and generated a corresponding View. No more horrible markup, the markup is as you want it. Semantic HTML output baby! Then I was stumped by the template syntax. Apparently they’re working on the presentation logic, but it was like stepping back in time. Run-time Percent tags wrecking the View. Brad explained that they’ve had to resort to old template syntax until the View matures and they start using Tag Libraries or such.
Then it was just like they did in those cooking shows: The buzzer went and the chicken popped out the oven, freshly roasted. A full blown web app chicken. The buzzer in my brain went off too, I realised at that point that I really need to do more development – make my own apps, to tinker and understand.
On the whole, the dot net MVC Framework has legs. The majority of the audience was keen to adopt MVC, with the provisor that the framework mature a little. I think a lot of developers present have a vested interest in the old ways, since so much work has been done there already, it’s also quite a mindshift from just working in the templates. Still, MVC could potentially be used on a new project.
I came out of the talk with a new found respect for ASP.net and the rather-formal Microsoft geeks. I think the adoption of MVC as a Web App Framework is a positive step forward by Microsoft. (I’m too happy with Python and Genshi at this point to switch over though.) The Views in ASP.net MVC still have a long way to go before it can be considered a worthy contender in the Web Application Framework games though.