Answer the question
In order to leave comments, you need to log in
Where to start learning Java for the web?
Good afternoon!
How to start learning Java for Web development? What books can you recommend? I'm already confused in all this abundance of frameworks, Application Servers, everyone advises something and that's it, no one tells why a particular choice is better than others. For example, everyone recommends Tomcat and no one recommends GlassFish. Why? Personally, I don't understand. With frameworks, it's even worse - some advise Spring, others - JSF, others Grails, etc., and again they don't really emphasize the advantages / disadvantages. There may have been similar questions with good answers before, but I didn't find them.
To make it easier to determine what I need, I will give examples of what I want to do:
1. A web application for executing queries to a certain database on PostgreSQL (Java is, of course, not fundamental here, but desirable, we still get experience)
2. A web application for automating the management of a certain information system (Java is preferred here, because the system's API is in Java).
I would like to hear the rationale for which technologies are preferable for such things, and why. Or at least a link where you can read comparisons to make a choice (I did not find it, honestly).
Answer the question
In order to leave comments, you need to log in
I would recommend that you start learning Java web development by learning Spring and becoming familiar with the core components of Java EE. For the sake of interest, you can read more about Java EE in the future (because Spring and its components are interfaced with Java EE), but in recent years the paths of Java EE and Spring have diverged (especially in terms of the web). Plus, there is now a Spring Boot project that simplifies the process of diving into Spring.
About Java EE, I will say that it makes sense to study only JPA, because. it is actively used in Spring Data JPA; web-related technologies JSP and JSF are no longer relevant, JSP is being replaced by more sane templating libraries like Thymeleaf and Freemarker , and JSF is being replaced by Spring MVC itself.
About containers: Tomcat (as well as Jetty and Undertow) is a web container that only supports the Java EE Web Profile, while Glassfish (as well as Payara, Wildfly and JBoss) supports the entire Java EE stack, which is not always needed .
My advice is to learn Spring and leave Java EE to your leisure.
Professional Java for Web Applications - everything you need is there.
Application Servers is for the enterprise from the 2000s. Now Spring, Hibernate + servlet container(tomcat, jetty) is practically standard in Java.
You need to start by understanding that there is a JavaEE standard, which includes many other standards, including web development standards such as servlets, JSP, JSF, and more. It is highly desirable to know them. Applications developed in accordance with these standards will run on any application server. But not always an application server is needed. For many tasks, a simple web container such as Tomcat will suffice. When it comes to choosing a framework, Spring is so comprehensive and popular that no other framework can compete with it. It is enough to open any job site, look for vacancies for a java developer and read the requirements. I highly doubt you will find Grails.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question