Posts Tagged ‘mvc’
That title is a mouth full.
Moving on – if you don’t know by now the Asp.net MVC team posted their first draft of v2 last night along with a few blogs posts and a Scott Hanselman Channel 9 video. And while the first hint at Areas looks incomplete, the work on Data Annotations looks very promising.
I have been doing a major eCommerce project at work leveraging ASP.net 3.5 Dynamic Data along with Entity Framework for the admin. Using Dynamic Data has really cut my development time and I couldn’t fathom leveraging MVC without similar support. Well, MCV v2 Data Annotation support thus far appears similar but stripped down like the MCV types like it. Support comes from several improvements:
- Display and Editor Templates: these are user controls that can be used to create display and editing output for properties specified by Data Annotations applied to the model. These are similar to field templates. However, they can be used for more than just values types, you can make controls for complex types as well.
- Strong Typed UI Helpers: these extensions of the Html object inside a view not only allow for using lambda expressions for specifying output but also act as the gateway to leveraging Display and Editor templates. And of course using lambda expressions adds compile time support.
- Data Annotation Validation: model validation now supports data type validations in the controller and returning the same view returns the correct validation error messages.
This really gets my interest in MVC going. The lack of controls is frustrating but I could live with out them. I cannot however live with out Data Annotation UI and validation support so this makes MVC much more approachable in the near term. The rest of the details are in the revised road map.
It looks like future previews will improve on all current features and add a few additional things to boot. How much get’s added to MVC v2 ultimately will be limited by the teams stated goal of being on the VS 2010 DVD which will probably ship next spring.
I have been using ASP.net Web Forms since the 1.0 Beta 2 release in late 2001. At the time of it’s release ASP.net as a whole eclipsed ASP classic in many ways. But like any technology its was designed to solve the technology of it’s time. However, in recent years many of these solutions that Web Forms solves are no longer problems, and quite often today much of what comprises Web Forms and it’s elaborate control architecture seems … unnecessary. Since ASP.net is really just making the .Net framework available for web page creation many of the functional decisions can be traced to browsers of the day. So what was that environment?
- IE 5/5.5, IE 5 for Mac, and Netscape for 4.x all had a very different support for html layout and css styling. ASP.net’s controls could adapt html css style output depending on what kind of browser was making the request. This would often result much different html and css being sent to the various browsers, depending on the control in question.
- The XmlHttpRequest object, the X in AJAX, existed primarily in IE for Windows at the time. ASP.net therefore requires full page post backs, but with the existence of control model that emulated state – that allowed for only one form per page and elaborate sever side control pipeline. If you have ever tried to write an elaborate server control you know.
So it was a big win for lots of us developers, upcoming and established alike. That was 2000-2001.