Re: tiny java web framework
Arne Vajh?j wrote:
You can probably implement the same functionality using
any Java web framework.
I like JSF but I do not consider it lightweight.
Arved Sandstrom wrote:
I don't think of JSF as lightweight either...middleweight (to use boxing
terminology) might be more accurate. Truth be told, I was referring to
the impression I got of the example code - pages and backing Java - that
Wicket presented on its site. I saw no real advantages here over how I'd
code those examples up using JSF and Facelets.
I was thinking more of the developer experience.
The references on the Wicket site to state management I wish to explore,
however. :-) They assert that their approach to this has advantages and
I may as well find out what they are.
From time immemorial template and toolkit purveyors have touted their
approach as the miracle solution to all your application flow and deployment
needs. None that I've seen have reduced the complexity compared to others;
they've but found different approaches to categorizing. organizing and
applying state and logic. It just might possibly be that the problem space of
application flow and deployment is itself inherently complex, and this will
inevitably leak into the tool(s) used to manage this complex area.
Some of those approaches are quite valid. Many Java developers report success
and satisfaction with Java Server Faces (JSF) over Java Server Pages (JSP).
JSF is like the Swing component library for the web. Parts of it annoyed me
until I understood that. JSF is more like Swing than it is like JSP.
Swing does not take a particularly novel outlook on GUIs - it's a fairly
straightforward library and comfortably familiar for anyone who's worked on
event-driven GUI platforms, which is basically all of them. That familiarity
would naturally carry into JSF work. JSF links a screenful of GUI components
to a controller-logic backing bean (a Java POJO) in a standard if epicyclic
model-view-controller (MVC) chain. It somehow magically skips over the
HTTP-ness of the underlying browser-server relationship.
A developer's skills in other GUI environments helps their JSF work.
JSF's mental model for application flow, deployment, and controller-view
bindings (backing beans to corresponding JSPs), is straightforward. Its
deployment only requires one new XML file (more allowed) and a few tweaks to
the web.xml file.
You still have to configure the thing, but that's life in the app server world.
--
Lew