Re: Controller Servlets?

Joseph Dane <[email protected]> Wed, 31 May 2006 08:46:40 -1000
Newsgroups gmane.text.xml.resin.user
Organization University of Hawaii
Message-ID <[email protected]>
Matt White <[email protected]> writes:

> Help! I've been stuck in a Servlet 2.2 / JSP 1.1 world!

Welcome to the 21st century!

> Here's my question - if you were able to start over on a web project,
> which framework (if any) would you go with? Is writing my own
> controller servlet and then making gratuitous use of the features in
> JSP/JSTL an insane idea?

well, first of all I'll say that JSP2.0 is such a vast improvement
over 1.1 that in fact I largely agree with you: you could do very well
sticking with plain old JSP/JSTL.  as a compulsive framework builder
(many Java people seem to be afflicted with this) I often tend to
ignore that very useful rule given to us by the XP people: You Aint
Gonna Need It.

Having said that, I've become a very big fan of the Spring framework:

 http://www.springframework.org/

Spring is not at it's core a web framework, but rather a way of
"wiring" together dependent components.  A lot of people get turned
off by the size of the Spring reference manual, but they don't realize
that it's really only two or three sections of that manual that they
need to look at.  The rest is extra.

Spring does contain a MVC/Model 2 web framework, which IMO is
adequate.  It's not thrilling, not groundbreaking, but it's OK.  In
fact, in the way I tend to use it (and I do use it) it's just a very
small step up from using my own dispatcher servlet.  But it does take
care of some of the boring grunt work (dispatching to "commands", for
example) so it's worth using.

> Checking the archives, this topic came up before sometime in 2002...
> the web framework landscape has changed considerably since then.
> (AJAX, etc)

There are many many choices, and it's easy to get bogged down in
evaluating everything.  So don't do that.

But it can be fun to see what's new and exiting, so I'll mention a few
that I know of.

 * Spring Web Flow -- an alternative to Spring MVC with a more
   declarative approach.  very interesting, but (when last I checked)
   can make certain operations (like using the browser back button)
   difficult.

 * Tapestry -- never used it, but seems to have some smart people
   working on it.  supposed to allow you to write reusable interface
   components.  when I read about it, it seemed to be pretty close to
   what I'd build myself, if I were writing a web application
   framework from scratch.  and yet for some reason, I've never used
   it.

 * JSF -- The "official" successor to JSP, and perhaps Struts,
   depending on your POV.  Too complicated, IMO, but others disagree.

 * Orbeon -- something completely different.  centered around XML
   processing pipelines.  builtin server side XForms.  very very
   interesting, but when last I checked was evolving fairly rapidly
   and perhaps not ready for primetime.  but I last checked quite some
   time ago, so that may well have changed.

-- 

joe