Some interesting discussion happening around the notion of MVC, Struts and the general concept of web application design. Bottom line: no matter what your vendor tells you, amongst todays brightest minds we still don’t have the perfect architecture for building web applications.

What’s got people stirred in the Java community is Beyond MVC: A New Look at the Servlet Infrastructure. This article “dares” to suggest MVC may be an inappropriate choice for web apps.

Even more interesting is this response with particular reference to attempting to bring desktop GUI event models to the web (ala Winforms or the upcoming Java Server Faces).

It’s a discussion I’m fascinated in through discussions with Jeff Moore while working on WACT, partly because of struggles with implementing a “universal” (as it you’d actually want to use it) controller designer in PHP and partly on the subject of events. It would be possible to implement a desktop app / JavaScript - like event model in WACT. But why bother?

Jeffs view is, although there’s significant business incentive for Sun and MS to attempt to unify desktop and web development, PHP is a pure web solution (forgetting PHP-GTK for a moment) and it’s just as easy (if not easier) to deal in simple request / response. My jury is still out but from some basic experiments with events in WACT (using call_user_func_array() for the end user it’s a choice between;

function clickHandler(& $sender, $args) {
     // This callback was invoked by clicking on some link
     // Do something here...
}

Vs;

if ( isset($_GET['link']) ) {
      // The traditional way
      // Do something here...
}

Think most people would prefer the second because it’s natural to PHP.

What’s more it’s giving developers more choices in terms of how they design their code around the response, which is important: there is a difference between a one page form mailer and an online groupware system - if you applied an impressive infrastructure to the former, its time to go to return to GO without collecting your salary.

And anyway, those working with XML been struggling to find easier alternatives to the XML SAX API and it’s callback mechanism with API‘s such as XML Pull? I’d be interested if anyone has any links on the topic of callbacks in general and what they do to application design - someone by now must have raised the the question “Do callbacks suck (period)?” .

Bottom line: if you work with a language like PHP it’s alot easier to rollback your design when you get it wrong...


blogs/harry_fuecks/web_applications_still_no_ideal_architecture.txt · Last modified: 2005/10/15 21:47