20060221 Tuesday February 21, 2006

What do we need to do to make WebWork/Action 2 the best framework for *everything*? From Ted Husted on the Struts mailing list:

Seriously, hype aside, engineer to engineer, if we can use the new standalone Tiles with WebWork, and use Ajax to store the state of UI controls, what else do we need to do to make WebWork/Action 2 the best framework for *everything*?

My reply:

The tag documentation (and documentation in general) for WebWork is difficult to navigate. Struts' documentation has generally made it easier to find stuff.

I think the hardest part of WebWork/Action 2 is providing the path for migration. If Struts 1.x applications can run in Struts Action 2.x, and users can create new Actions following WW's APIs - that will be truly awesome.

Another that would be cool is smart defaults. For example, having Actions that end with "Action" be available at the "everythingbeforeAction" URL. Spring has something similar coming in 2.0 - and it's mainly just done by extending a certain class.

http://jroller.com/page/raible?anchor=an_example_of_smart_defaults

So if I have UserAction, it's automatically available at /users, /user/edit, /user/save, etc. Default CRUD in a sense. No xwork.xml required by default. But users can override. Default everything w/o requiring annotations, but allow overriding. Or maybe there's different default schemas - a CRUD one, store front, etc.

Ajax stuff that I think WW already has: in-page updates, sortable/pageable lists with something like the displaytag - but with Ajax. There's a lot of these components already available for this stuff, so it might just be a matter of documenting how to integrate them.

Promoting Maven 2 for building might be an easy way of promoting inclusion of 3rd party libraries. Add 3 lines of XML, use this code in your JSP/template, boom - you're good to go. Those that don't like Maven can use the Ant tasks and pom.xml.

Archetypes could be pretty big too - create starter applications that users can use. Even better, provide a means to upgrade the archetypes. Of course, that might be a Maven thing - and editing pom.xml to change versions really isn't that hard.

Above all else - to become the best MVC framework for Java - documentation and easy migration are essential.

Just my $0.02 of course. ;-)

What's your opinion? Posted in Java at Feb 21 2006, 02:19:17 PM MST 3 Comments

Comments:

When I was researching the various frameworks to use in migrating a struts application over time, I knew I wanted to keep the technologies that I had made investments in. I was fond of Tiles, JSP 2.0, JSTL, commons validator. Spring MVC was my choice because it allowed me to just use the improved controllers without having to redo everything. My app is now about half Struts, half Spring MVC. I looked at webwork, but did not want to port everything to OGNL.

If Struts 2.0 would support the above technologies, I would strongly consider using it. The drawbacks with Spring MVC have been disappointing message board activity for the web portion, and a lack of any books to give MVC significant coverage. I have 4 different Spring books and all just give a single chapter to MVC. I am really dying for the Apress book dedicated to Spring MVC.

Posted by Ted Bergeron on February 21, 2006 at 04:21 PM MST #

I should mention that the "intelligent default" feature you mention is possible to do with Struts Action currently. Three Struts features, ability to load Struts configuration files from a jar and wildcards, allow you to create a generic Action class that can match multiple paths, calling the correct method. Using Struts Flow, I did just that and added a "flash" object, which is great for avoiding action chaining. Done correctly, you don't need to write another Struts configuration file again.

Posted by Don Brown on February 21, 2006 at 08:14 PM MST #

The idea of trying to be the "best framework for *everything*" is interesting.

I've come to the conclusion that different frameworks have different sweet spots.

This seemingly obvious fact is, unfortunately, too often lost in the heated "best framework" debates.

PHP has a sweet-spot for getting simple things working really fast and on a ton of web-hosts.
-- David Heinemeier Hansson

Java Web-MVC action frameworks have a broad sweet spot that spans from shopping cart applications to the presentation tier of enterprise information systems.

Regrettably, I wouldn't use a Java framework for a personal site consisting of a blog and wiki. The Java community has been exclusively focused on corporate/enterprise development and considers these types of "content oriented" web apps to be out of scope. Moreover, due to the problems inherent in using a JVM in a shared environment, hosting options for Java applications are much more expensive. PHP is more suitable for these types of applications.

The new component oriented frameworks, such as JSF, Tapestry, and Wicket, have a narrow sweet spot -- the presentation tier of enterprise information systems, e.g., data entry forms that would previously have been done in VB or Oracle Forms.

I build both corporate-data-entry and customer-facing web applications. After evaluating JSF, I decided to stick with Web-MVC action frameworks because of their more universal applicability. A Web-MVC action framework can efficiently build both types of applications. I don't want to dilute my skills investment by mastering a seperate framework for each type of web application I build. I'd rather invest my skills in a single flexible framework.

I hope that the current trend to simply Java EE development will lead to giving more attention the need to ease the burden of hosting Java web applications. It is important for the future of Java that it span the complete spectrum of web applications, from personal blog to enterprise information systems.

Posted by Allen Halsey on February 22, 2006 at 07:24 PM MST #

Post a Comment:
  • HTML Syntax: Allowed
Click me to subscribe
Matt Raible is a Web Architecture Consultant specializing in open source frameworks.
« May 2012
SunMonTueWedThuFriSat
  
1
2
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
23
24
25
26
27
28
29
30
31
  
       
Today

Recent Entries

Tag Cloud