Ask HN: Good resources to learn Java EE
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 / 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 / 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.
6 comments
[ 1.6 ms ] story [ 21.5 ms ] threadSpring 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.
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).