Java web development

github logo ・1 min read

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 !!

twitter logo DISCUSS (4)
markdown guide
 

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.

 

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: amazon.com/RESTful-Web-Services-Le.... 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.

 

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.

 

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

KTBYTE's Java Tutorials are quite helpful too.

More recommendations on Hackr

Classic DEV Post from Jan 14

Who's looking for open source contributors? (Jan 14th edition)

Find something to work on or promote your project here. Please shamelessly pro...

Hamza profile image
I love anything related to Javascript !

Sore eyes?

dev.to now has dark mode.

Go to the "misc" section of your settings and select night theme ❤️