DEV Community


Posted on

Java web development

Hi everyone, I'm new here and glad to find such an opportunity to talk with other developers.

I'm a beginner to java web programming and I want to know what is the best way to master it, my approch consist of learning servlets and JSP before jumping to frameworks like spring ... , it is the right path to learn effectively the technology ?

Thanks !!

Top comments (4)

rapasoft profile image
Pavol Rajzak

I would second the opinion that the best way to jump in is to start with Spring. Specifically - Spring Boot. There are many tutorials for it and you can easily create skeleton for your application using Spring Initializr.

On the other hand, I would argue that writing everything using Java (that means the pages are rendered on the server and sent to client) is not optimal. Usually you have a combination of Java backend and JavaScript frontend. Therefore, I would recommend you to focus on writing RESTless API for you JS client app.

If you still want to pursue writing everything on the server side, I would stay away from JSP or even JSF, since it's been a while it has been deprecated even by the technology radar, and probably tried to go with Spring's no.1 choice Thymeleaf.

n1try profile image
Ferdinand Mütsch

First, make sure you're familiar with common concepts and patterns including REST, the MVC style, single-page apps and how the web works in general (technically). For learning about REST in all detail, I liked this book: However, you probably might not want to buy and read a whole book, so you can simply stick with guide and tutorials on the web.

After you've learned about these fundamentals, I'd recommend to go for some framework (Spring, Django, Laravel, ...). If you want to stick with Java, Spring (Boot) is the de-facto standard. However, it's also very comprehensive and might be overwhelming for a beginner. Anyway, pick your frameowrk and try building a server-rendered app first and then move on to building a single-page app that consumes a REST API. I'd not learn JSP nowadays. It's simply outdated.

subbramanil profile image
Subbu Lakshmanan

Hi Hamza!

A good understanding of servlets and JSP would help you a learn the Java Web frameworks faster. However I would suggest compare with a Web framework like spring while learning. Java Web frameworks have come a long way from JSPs & Servlets. The number of lines to serve a simple web application with number of JSPs as view and servlets as controller, have tremendously reduced to mere configuration and few lines of code. In my opinion, I would suggest taking a standard java web framework as Spring and understand how it works. You can always find links to see how it works under the hood.

grwth_hackr profile image
Vikas Kalwani

I would recommend checking out "The New Boston" on YouTube.

KTBYTE's Java Tutorials are quite helpful too.

More recommendations on Hackr