On 12/19/06, Piero Sartini <[EMAIL PROTECTED]> wrote:
Hello list,
the last days I've read a lot about web frameworks in java. And the more I
read, the more questions I have. Just writing this down, maybe someone has
some thoughts that can help me.
My problem is simple, or lets say it should be simple: What webframework is a
good choice to start a new web application?
For a small application, you might not need a framework at all. You
can do quite a bit with plain old JSP and JSTL, especially if you are
using something like DreamMaker as an IDE.
But, as applications grow from five to fifteen to fifty pages, we've
found that a MVC framework makes applications easier to maintain.
After all, JSF seams to be popular, it is supported by big vendors and it is a
standard.
As Don mentioned, the JSF plugin lets you use JSF components with
Struts 2, so it's not an either/or decision.
Just as an aside, the latest IDEA is finally shipping with the Struts
Assistant plugin enabled, as well as the Google Web Toolkit Studio,
and the Seam plugin, among others. Open source and plugin
architectures are making "big vendors" less relevant. (After all,
who's the Time Person of the Year? You. (and you! and you!).
* http://www.cnn.com/2006/US/12/16/time.you.tm/index.html
My problem with JSF is that its way too basic in my eyes. It does
not give me best practices, its just there and says: "use me". But it does
not give me an idea how it is used best. But maybe I missed that. My feeling
is that its a core technology like jsp ... someone should build a framework
with it ...
I am missing this "framework" around JSF that does speed up development. Is
shale meant to be this framework? It matured a lot since I last looked at it.
But for me, it looks like its not really accepted - maybe I am wrong. Is
shale what I am searching for?
JSF is considered a MVC framework, just as ASP.NET is a MVC framework.
These frameworks are component-centric. You build pages by assembling
components, and the components can each fire their own actions to
obtain and maintain state. Frameworks like Struts and Spring MVC are
action-centric. You build actions that obtain and maintain state, and
then use pages to present the state.
Component-based frameworks tend to appeal to people who like to use an
IDE to build a visual representation of the page, and then use glue
code to paste the components together. Action-based frameworks tend to
appeal to people who like to hand-code pages and normalize code.
There is JBoss Seam. I don't want to use jboss AS and not sure if its the best
choice..
Seam has been getting some good press on the MyFaces user list. Some
people say that it overcomes several blind spots of the JSF framework.
* http://mail-archive.com/users%40myfaces.apache.org/msg31585.html
I looked at struts2 and it "feels" like it could be what I searched for. There
is good documentation, many examples, an maven archetype, lots of users and
the possibility to use third party technologies like freemarker. But my
problem is that I am not sure if its not better to use JSF to be compatible
with future technologies. There are a lot of ajax-components for example, and
we can wait that a lot of third party libraries and tools will be
available...
It's interesting to note that Ajax caused quite a stir for both JSF
and ASP.NET. The underling technology does not play well with AJAX.
Both frameworks have solutions now, but retrofitting those frameworks
for Ajax was a lot of work.
Meanwhile, frameworks like Struts are able to use AJAX out of the box,
with zero changes. Struts 2 is making AJAX even easier to use, but it
was never hard to begin with.
As Scotty said (or will say), "The fancier the plumbing, the easier it
is to gum up the works." :)
Is there a simple answer?
The truth is that web applications are still way too much work to
create and maintain, which is why we continue to look for better
solutions.
The simplest answer I know is to pick a use case from your application
and implement it using each solution under consideration. It doesn't
have to be a big use case, maybe just a search form that brings back a
list. The important thing is to try it yourself, and choose what works
best for you.
In fact, I'm doing that myself, right now. My team is evaluating Ajax
solutions. We have a simple example application that demonstrates our
architecture. I'm about to code the front-end in the Google Web
Toolkit, to see how it goes. Film at 11.
-- HTH, Ted.
* http://www.husted.com/struts/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]