What's wrong with the latest version of Spring or JEE (please remember this is NOT J2EE).
What's wrong with the latest version of Spring or JEE (please remember this is NOT J2EE).
I'm sure Spring would make dealing with beans a lot less painful. I know there's more to J2EE these days than Beans and WebSphere and the whole early-2000s debacle that frankly gave Java a bad name and enabled the rise of php and Rails and the like.
Struts is Struts and never really appealed to me. Wicket looks more lightweight but still seems config-heavy. I think that's the one thing, from a coding standpoint, that makes even contemporary Java still feel 15 years behind: configuration hell. It's just part of the whole Java mindset, that it's never really shaken (even in Android!), that a major part of my coding life should be spent configuring the framework. C# and .NET has moved away from that more and more and to me it's a much better environment for it. This is all subjective tho. YMMV.
So what do you use? What makes you happy in the Java world these days (I'd really like to hear).
J2EE is horrible.
JEE is awesome.
Comparing J2EE with ASP.NET MVC is not fair just as I would compare ASP.NET with JEE or Spring MVC :)
Rails -> Spring MVC (albeit we still don't have a mature ActiveRecord but I concur that the Java world prefers the Repository pattern a'la DataMapper/Merb)
The whole Rails ecosystems is pretty much:
1) Spring MVC
2) ORM (Hibernate/JPA2 or one of the newest tool is Spring-Data)
3) Maven == bundler + rake + gem
4) JUnit
5) Some sane folder structure
For a start, J2EE is history, anything using J2EE is a legacy project. JEE6 is the latest Java Enterprise Spec and it's fairly lightweight, you have to use almost zero xml configuration (everything is annotations) and you and you can turn a plain old java object into a bean with just one annotation (@Stateless) and you can even inject beans anywhere with just one annotation.
The same is true for the newer versions of Spring, pretty much no XML config required anymore.
I use JEE6 and Spring, these are as powerful as ever but with less and less actual implementation nightmares with every release. They have looked at the other frameworks and stolen all the best ideas in their latest form.
Play! for java is also a great framework although it doesn't have much adoption by anyone I care about.
The only thing that makes me happy in the Java world lately is Scala. It has it's flaws but is much more pleasant that old school Java.
You don't need to use XML its just an option now. Annotations work well.