
Ask HN: Good resources to learn Java EE - alicorn
In my new workplace, we have several web projects built with Java EE. I had not done any Java programming before starting here. Two months in, I am able to contribute to maintenance of said projects and develop new features based on the existing code, but I lack knowledge to meaningfully improve the design of the application (meaning architecture &#x2F; code patterns). There is only one other person who knows more than I do about Java EE (he built the things), but he does not have too much knowledge about the more advanced aspects of Java EE application design either.
So could you recommend any good resources for learning Java EE? Especially about:
- load balancing &#x2F; HA, 
- multithreading, 
- developing an API for external consumption (not entirely Java EE related). 
We are not using the Spring framework. 
Any recommendation about good design patterns in Java EE is also very appreciated.
======
agibsonccc
This might be a hard pill to swallow...but it's going to be highly dependent
on your app server.

Java EE is just a set of annotations with several different vendors
implementing the standard in an app container.

I would look at the docs for whatever your employer is using.

A lot of it comes down to knowing some basic fundamentals about web
development. For example: Load balancing/HA can be done in several different
ways not tied to Java EE, the same is true of any of the things you're
mentioning.

Largely, HA can be done with your app server. An API is just REST which means
the jaxrs implementation.

Multi threading dynamics are typically app server specific. Generally "let
your container do it" is the right answer though.

Source: Been doing java since spring 2.0 as well as dealing with app servers
ranging from glassfish to jboss (now wildfly).

~~~
alicorn
Not hard at all, I already suspected that this might be the case. Can you
recommend any generally good resources about these topics? I am looking first
and foremost to acquire enough knowledge to think about them the right way.
Technical implementation is important as well, but perhaps secondary in the
context. We are using Wildfly as app server.

~~~
agibsonccc
Then use their docs. In general, I would follow a few tutorials specific to
red hat. For now, decompose it focusing on using jaxrs for now. The only other
thing might be JNDI for accessing data sources. The rest will come from that.

------
BjoernKW
I haven't used it myself because I'm mostly dealing with Spring applications
but from a cursory look this seems like good place to start:
[https://javaee.github.io/tutorial/](https://javaee.github.io/tutorial/)

~~~
alicorn
Thanks! Despite all my googling, I had missed this one. Regarding Spring, I
have heard an opinion that the "new features" in latest Java EE versions make
it somewhat obsolete, but I lack knowledge to evaluate the statement. What do
you think? What are the advantages / disadvantages of Spring vs "pure"(?) Java
EE.

~~~
BjoernKW
Java EE is no less or more pure than Spring. It's just an alternative set of
libraries and frameworks for roughly the same purposes. Everything else is
just marketing by Oracle. The statement that Spring is obsolete is plainly
wrong. Java EE neither provides the exact same feature set nor is it included
in default Java environments.

Spring runs in any servlet container and on every cloud platform that supports
Java. Spring Boot applications can even run as a stand-alone JAR. Java EE
requires an application server such as Glassfish or JBoss to run. This incurs
additional cost and complexity.

The Spring ecosystem is somewhat larger, too. You'll find a wide range of
additional libraries by both Pivotal and third parties that draw upon Spring
features like annotations and the Spring way of doing dependency injection.

If I were to decide whether to use Spring or Java EE for a new application
regardless of the environment I'd clearly opt for Spring. If on the other hand
for one reason or another you're running a Java EE environment anyway you
might just as well use those capabilities. Depending on your scalability
requirements and the number of applications a Java EE application can perform
better than a Spring one in terms of memory usage because Java EE libraries
typically are provided by the server whereas Spring libraries often come with
each application individually.

