Thursday, December 13, 2007

ASP.NET 3.5 Extensions -> ASP.NET MVC

I always thought and continue to think that ASP.NET model which merges together browser-based UI and server-based business logic in one class, trying to present distributed web page / Web server application as if it would be a desktop application is completely wrong. Traditional ASP / PHP, etc. are much better in this regard.

Also, for a long time I think that event-based model is very hard to manage. I remember a big struggle against MS Access front-end in a big multi-user Access / SQL Server protective gear distribution system we developed in Centech Group, Inc. I worked as a contractor there and developed major part of that application. As usual, it wasn't programmer's decision of what tools to use. Personally, I would use VB 6 as a front-end, not MS Access.
In VB applications I never used bound controls with their hard-to-predict events. It was much easier to manually write code to connect to a database, get data, and then save it back. Events are dangerous: you are never sure what fires first, what triggers another event when you respond to a first one, etc. But, as I said, it was quite easy to turn them off in VB front-end and to use similar approach in a classic ASP. In MS Access, however, you cannot turn off event handlers. A significant portion of development time was spent on workarounds eliminating harmful chains of events.

And now they are back... ASP.NET, SharePoint... old problems.

Apparently, people at Microsoft understand it as well. Otherwise, why they're now introducing in ASP.NET a long-known and proven MVC design pattern? Sure, they would present it as a big Microsoft's achievement, despite the fact other parties use it for a while...