thinking in geek tagline’s are so web2.0

Posted
2 August 2007 @ 4pm

Tagged
asp.net, castle, rails, web architecture

SoC in WebForms

Scott Bellware makes a brillant comment on Hammett’s weblog:

ASP .NET templated controls did almost nothing to encourage separation of orthogonal concerns. It simply ended up separating concerns that aren’t separate concerns.

Pure Genius – this summarises an entire field of criticism (e.g. [1][2]). The whole issue with the OnRowDataBound/FindControl() style of programming is that things which are fundamentally simple (iteration and string concatenation) are impossibly complex because concerns have been separated which are not orthogonal.

There’s an important caveat to this – which is that WebForms is actually trying to solve a different problem from the one that I and many other developers build web apps are trying to solve. WebForms was intended to allow VB6 windows programmers to build web based apps – without having to understand HTTP, HTML, CSS, Javascript, GET/POST/HEAD etc.

This has actually proven to work pretty well in specific circumstances. e.g. A team of developers building an inhouse (intranet) line of business app. A good friend of mine was tasked to lead a team of 20 or so Oracle Designer developer in building a next gen version of the product they had been working on in ASP.NET 1.1. They were able to pick it up and get productive remarkably quickly because they could continue to work with a Control based, form based model that was familar to them.

Where it’s made life immeasurably harder is for developers who are building public facing web apps. Apps the HTML they’re actually emitting matters, where cross browser compat is something that needs to be deeply understood – not abstracted away (thats a whole ‘nother post).

The reason this is even an issue is because of the Microsoft DevDiv monoculture. If it’s a Microsoft solution then it’s obviously the best. In the Java world – there’s JSP (classic asp using Java) and JSF (roughly webforms) – but there’s a whole boatload of other solutions to problems.

I don’t see anyone arguing that the only right way to build web apps using java is to use JSF. People are free to examine the problems they face, look at the solutions proposed by various other people who have published their work (e.g. Tapestry, Grails, RIFE, Struts, WebWork, Struts 2 etc…) and either use an existing solution or roll their own. Same in the Python (Django, Web.py, Zope), PHP (Zend Framework, Cake, various PEAR libraries), Perl and pretty much any other community you care to examine.

Which tool is right for you depends entirely on your context (the problem, your experience, your team, their experience etc). If Webforms is working for you – then fantastic but it’s not the right solution for everyone.


No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment