My Top 3 "No XML" Frameworks
I just reviewed my past projects and noticed that for about two
years I've almost completely managed to get rid of XML configuration and deployment
descriptors. It really works well, is efficient to develop, maintain,
and test. I especially appreciated working with:- Wicket (Apache's Web Framework, from conceptual point of view similar to JSF)
- Google's Guice (I like especially the fluent configuration and only 22 pages of documentation)
- EJB 3 - No XML and just works. EJB 3.1 would be even better.
- [JPA] it rocks but comes with very small XML-configuration - so it should be out of scope here.
Especially the integration between EJB 3 and Wicket and EJB 3 and Google's Guice are superb (I will write some more about that soon). I like JSF as well, however the amount of XML configuration is still huge. JSF was designed from the tool perspective, so it isn't a problem with a good tool (like NetBeans IDE or JDeveloper). ...already looking forward to JSF 2.0 :-).
From http://www.adam-bien.com/roller/abien/
| Attachment | Size |
|---|---|
| fig-1.jpg | 8.74 KB |
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)





Comments
Roger Marin replied on Mon, 2008/09/22 - 5:53am
I would be nice to see a tutorial on writing an app with Wicket,EJB 3 and Google's Guice, it seems like a really good combination, and no XML!
Mark Unknown replied on Mon, 2008/09/22 - 8:04am
kenjobonesnapper replied on Mon, 2008/09/22 - 8:22am
John Denver replied on Tue, 2008/09/23 - 9:07am
The only problem with EJB3 now is it is difficult to get it working on Tomcat with many dependencies but I know EJB3.1 will fix this.
Also I would say Tapestry 5 is a great project without XML, it use annotations and have its own DI.
I try Wicket and Guice together and it rocks. It is easy to use Wicket with EJB3?.
I think JSF2 will rock, JSF1.2 it is ok the xml configuration for navigation I like it actually with IntelliJ IDEA I can see graphically the flow of my pages but the problem is JSP with JSF that is horrible I like much better Facelets.
Regards.
Gerd Ziegler replied on Tue, 2008/09/23 - 2:36pm
Omar Palomino S... replied on Tue, 2008/09/23 - 6:56pm
John Denver replied on Wed, 2008/09/24 - 12:51am
in response to:
Omar Palomino Sandoval
Dont give a try to Spring check this article why :
http://java.dzone.com/articles/springsource-and-lost-tag
I think Spring lost its Mojo.
Anyway Hibernate and JPA it is good actually you can use Guice with Hibernate or EJB3 with JPA.
Albert Buława replied on Wed, 2008/09/24 - 2:21am
I am amazed how many people hate XML so much that they are all ready to pollute their business logic code with framework specific annotations thus introducing unneeded container and/or framework dependencies.
I understand using standard annotations like JPA or EJB3 ones but making my business logic dependent on some Guice or other framework-du-jour just to do DI? XML is tedious and annoying, yes, but it's still obviously a better choice than introducing martian dependencies into the code.
Omar Palomino S... replied on Wed, 2008/09/24 - 10:59am
in response to:
John Denver
Gerd Ziegler replied on Wed, 2008/09/24 - 2:44pm
in response to:
Albert Buława
Otengi Miloskov replied on Thu, 2008/09/25 - 1:04pm
in response to:
Omar Palomino Sandoval
Omar Palomino S... replied on Thu, 2008/09/25 - 1:15pm
in response to:
Otengi Miloskov
Jose Maria Arranz replied on Fri, 2008/09/26 - 2:43am
Have you tried ItsNat, Natural AJAX?
Albert Buława replied on Mon, 2008/09/29 - 5:07am
in response to:
Gerd Ziegler
I surely depend on the air I am breathing but Java frameworks are no air. While XML configuration has some downsides, modern tools support refactoring (my, even basic Eclipse lets you refactor non-java files). I agree that XML configs could be supported much better and I believe that this is the right way: to improve support for external configuration, be it XML or another format, not to "get rid of XML" and invite unnecessary dependencies.
Also, the broken window effect is not to be forgotten. Having already needlessly coupled various unrelated parts of the application to an external library, it takes much less hesitation to introduce another dubious coupling or otherwise decrease code quality. And so the story goes...