J2EE Is Dead - Completely Dead
adam-bien.com
adam-bien.com
J2EE 1.4 or officially: "JSR 151: JavaTM 2 Platform, Enterprise Edition 1.4 (J2EE 1.4) Specification" was released at 24 Nov, 2003 and was designed to be used with JDK 1.4, J2EE 1.3 was released at 24 September 2001 and is more than 9 years old now. In JDK 1.4 there were no annotations available, so you had to configure everything with XML. J2EE 1.4 is more Configuration Over Convention, than the current - more reasonable opposite principle of Configuration by Exception or Convention over Configuration. If I read or hear "J2EE" I always have to think about xdoclet with about 50 lines of XML, a Home Interface, Remote Interface and an unrelated Bean class just to implement a helloWorld() method. ...with Java EE 6 a helloWorld() takes exactly one line of code - as it should be.
Even JDK 1.5 is End of Service Life and so officially dead for greenfield projects as well. Most of the J2EE 1.4 application servers were not even officially supported on JDK 1.5, so it is truly ancient technology. However: there is more interests in Java EE 6 - measured in number of session attendees at conferences, blog statistics, number of sold books :-) and project requests, than ever. What also amazed me was the result of my informal surveys after talks at various conferences (JAX, W-JAX, JavaOne and Devoxx). The majority of attendees do use Java EE 5. The minority is using J2EE 1.4. Even the number of Java EE 6 projects seems to be slightly higher, than J2EE. ...and Java EE 6 is only one year young... So J2EE is dead, but Java EE 6 rocks.
It amazes me that when people say "J2EE" they're really describing "EJB"
One lesson from that fiasco: Just because all the giants of the day are supporting something doesn't mean it's any good.
Java EE 6 is the current Java enterprise solution.
J2EE is the old, e.g. 1.4 or 1.5. Java EE 6 is far better, and technologies like JPA and JTA are quite powerful. There's also a lot less boilerplate code than before. As another poster said, Java EE 6 rocks for enterprise development, particularly with large teams.
Also, for most of those results, you'll get some horrible unusable web site, probably with serif fonts to compliment.
Also, there are lots and lots of people who learn just enough Java so they can get jobs in programming. Body shops hire them because they are cheap and because none of their clients, who demand their products to be written with enterprisey brands they read about in enterprisey magazines, will ever look into the code they write. Unfortunately, most of them also learn HTML and build websites.
And that creates the problem you see.
I had successfully avoided Java for most of my career, so it was also an opportunity to learn something new.
That was a terrible mistake. It's almost impossible to find answers that are relevant. There is very little readable documentation, even directly from Oracle. When you do find a relevant bit of information on a forum or blog, it's either outdated or useless because the author doesn't specify what their environment is.
I asked my colleagues for books, blogs or other resources to help me get up to speed. They pretty much laughed and said I'm out of luck.
I won't complain about the tooling. It's bad, but that may be more a matter of taste than anything else.
It seems to me that the number of third-party OS libraries and frameworks available in java, both in terms of breadth and state-of-the art, far outstrips the resources available in other languages. It's virtually the default choice for enterprise systems, and a vast array of academic research is also java-based, resulting in a hugely rich eco-system.
I just don't understand why java is not better embraced or more widely adopted amongst the startup community.
Because other languages are faster for rapid prototyping.
(ex. I just googled system.out.println and it pulls up Java 1.4.2)
There are definitely some great reasons to use java for certain tasks, specifically due to the wide range of library support. If I had to use Java for a greenfield project though I'd probably take a serious look at groovy.
They're doing pretty well for themselves too.
After a certain point, there's a base of libraries that is Large Enough. I've never really been wanting with Ruby, at least not in the 'oh, but there's this Java library that does exactly what I want' sense.
Even then, JRuby would make it Just Happen, or maybe even SOA.
Having GD embedded in PHP makes many image processing tasks far easier and less painful than trying to do stuff using Java image libraries (for example).
"It's virtually the default choice for enterprise systems" then "I just don't understand why java is not better embraced or more widely adopted amongst the startup community"
"Startups" and "enterprise systems" are, in many (most? all?) cases, worlds apart in terms of needs.
I say this as someone who's done PHP for 14 years and Groovy/Grails for 3.
Sorry, I didn't mean to imply that they were; more that the wide adoption by both enterprise and academia has driven the development of a great number of world-class libraries and platforms in java.
That said, when I am prototyping, or doing a quick tool, it's usually in Perl. Quicker to write, and runs quicker as well (when single threaded). At least if "quicker" involves I/O, caching in hashes (maps) or sorting/searching. Java is quicker than Perl if you are twiddling ints, or throwing all your data away just after the network gives it to you, though :-)
Ruby is nice too, but I have done quite a bit less of that.
In the past year i have read at least half a dozen articles proclaiming various technologies dead.
The Web, Grails, Java, Telephones, ect...
PS I declare that declaring preemptive postmortems to be dead!
Google Cache seems to have it, but it's overall rather thin: http://webcache.googleusercontent.com/search?q=cache:Fbn8cjc... Something along the lines the king is dead long live the king.
Unsurprisingly, old technology is old and new technology is new.
Maybe it's getting DDoSed by a disorganised horde of anonymous pro J2EE teenagers.
We have come a long way from the Java Pet Store.
copy/paste from the link above
=================
@Stateless
public class SimpleSample {
public void doSomething() { /*business logic*/ }
}How to compile:
You will need the the EJB 3.0 / 3.1 API in the classpath, or at least the @Stateless annotation.
How to deploy:
Just JAR the class and put the JAR into e.g: [glassfishv3-prelude-b23]\glassfish\domains\domain1\autodeploy
How to use:
e.g.:
import javax.ejb.EJB;
public class MyServlet extends HttpServlet{
@EJB
private SimpleSample sample;
}
And: there is no XML, strange configuration, libraries, additional frameworks or jars needed...
=================
Looks a slight bit more than 1 line to me. Note: the page was linked to from another page indicating you can do 'hello world' in JEE6 in 'one line' of code. Java people have a funny way of counting lines sometimes.