Hacker News new | ask | show | jobs
by jamesblonde 1001 days ago
Glassfish and Java gets an undeservadly bad wrap, IMO. It comes with so much enterprise goodies out of the box - TLS, load balancing, DB connection mgmt, monitoring with Grafana, scalability over multiple cores, good performance in general, easy filters for API calls, and more. Slow load time, yes. But it's worth it for the other features, imo.
2 comments

I cannot speak for anyone else, but when I was pretty young in my career, my first "real" job was doing ColdFusion. Even at the time (early 2012), ColdFusion was largely dead, and PHP had sucked up most of its potential audience, and I was looking to learn a new platform to future-proof myself and make more money.

I had learned the core Java language years before and I knew Java was "enterprise", so I figured that might be a good spot to start, so I bought a book on J2EE development with GlassFish, downloaded all the appropriate SDKs, and after multiple days of spending nearly every minute I could on it, I got something not quite as good as something I could have whipped together in ColdFusion (or Railo/OpenBlueDragon) at the time.

I thought that maybe I was just stupid, and I suppose the jury's still out on that, but shortly after that experience I found a Django tutorial series on YouTube and went through that, and felt like I was productive almost immediately. I was able to build "real" stuff in a matter of a few hours instead of days, and it didn't feel like it was more chaotic than the stuff I had done with J2EE. I then did a similar experiment with Rails, and had the same effect: me being an idiot is not solely to blame for me not really grokking J2EE. Eventually I learned Node.js and did that for a few years, until I was able to (thankfully) transition out of "web development" entirely.

Personally, while I'm sure the Glassfish server, and maybe J2EE has its merits, I don't think they're worth the headaches I went through to try learning it. Java has plenty of cool frameworks now (e.g. Play, vert.x), but I've never even tried using those with Glassfish.

If you used J2EE in 2012, did you happen to get that idea from a very old book?

J2EE ended in 2005. So if you used it in 2012 it may explain something.

Sorry, I'm using J2EE when I really meant JavaEE. A lot of message boards and whatnot at the time still called it "J2EE" so that's what I remembered it as. I think the version was 6 at the time?
Java EE 6 was pretty decent really. It came with JAXRS, CDI, Bean Validation and JSF 2.
I'm sure it's fine once you learn it all, and I'd probably be able to pick it up quicker now since I have a decade more of experience, but my difficulties with it was not for lack of trying on my end. I found a lot of the terminology difficult to work with, and it felt like doing anything required me to touch a million files across a thousand folders.

As I said, I don't really do web stuff anymore; when I need HTTP nowadays I generally want something a bit quicker and lower level than a full-on web framework.

I think bad rep is partly because Spring (and Spring Boot), Quarkus, etc. don’t need any Glassfish or Websphere and can be deployed barebones or run in Docker containers without hassles of having to manage “application servers”.
Isn't this very article about directly running GlassFish from Java SE?

You could also say btw that GlassFish doesn't need any WebSphere or JBoss. Or you could say that WebSphere doesn't need a JBoss or GlassFish.

Also, WebSphere is legacy within IBM. Their new and much much better server for some time is called Open Liberty. It uses some components from WebSphere, but in a highly modularised way, and the overal runtime is totally different.

Maybe you are right. But to me, JavaEE somehow associates with managing applications through the Application Server’s admin panel, registering EJBs with deployment descriptors, etc.
> JavaEE somehow associates with managing applications through the Application Server’s admin panel,

That is a wrong association really.

Even in the really old versions of GlassFish and JBoss such an admin panel was just an extra (I hate them too, btw).

You could always, Tomcat style, just copy your .war to a deployment folder. If you wanted, you could also zip up GlassFish with the war already in that folder and deploy that.

> registering EJBs with deployment descriptors

That was required for the last time in J2EE 1.4, from 2003 or so. Already in Java EE 5 from 2005 that wasn't necessary anymore. Also don't forget that spring beans needed to be registered in very similar deployment descriptors (huge xml files) just as well.