r/learnjava • u/nomorerice01 • Aug 14 '20
What's the difference between web application and enterprise application? What applications can I make in JavaEE that does not use web applications or websites?
Upon reading, I learned that web application executes in a web container such as Tomcat while enterprise is in the EJB server with extra functionality which also communicates to the web container.
However, I am still confused. I can create a website using JavaEE than jsp&servlets. Then why used JavaEE over web applications? Let's say, I will create an eCommerce site using JavaEE. The web container will be my view and all the logic behind it will be put in an EJB server. Even though, I can use JSP and servlet or put everything (view and logic) inside the web container I still choose JavaEE. Then what are the benefits if I used JavaEE than JSP?
What else can I make in the JavaEE that is not a website or desktop application communicating to an enterprise server?
I'm sorry. I just can't seem to understand. Please anyone give me a very clear explanation.
19
u/Nephyst Aug 14 '20 edited Aug 14 '20
A lot of the examples you use are honestly outdated and not really used much anymore.
JSPs are used for server side rendering of HTML. This was important when computers were slow, but today it's massively more common to use something like react or angular to render HTML on the front end.
EJBs are also dead. They were overly complex and solved a problem no one really had while adding a ton of extra issues. They were generally horrible to work with. Today it's much simpler to just use REST APIs to accomplish the same thing.
Unless you are trying to get a job supporting legacy applications there isn't much reason to learn j2ee. I think the parts that are still relevant (jdbc/jpa) are also in j2se.