
Spring is one of the most used tools to create Java web portals. However, many programmers avoid using it because they don’t know its advantages. Let’s see some of them:
Simple configuration files
Everything can be configured with xml files, even advanced options like the connection to the database, authentication using LDAP or the method that is executed when a user logs in successfully.
Fast development of forms
One of the most tedious tasks is the programming of forms because there are actions that are repeated in most of them, like checking that data has valid values, displaying errors … Spring handles this and has JSP tags for binding the elements of the form.
Web flow management
Most websites have sequences of actions that can be performed in order to get a result. For example, to buy a flight, you will select the day and time, then select the seats, provide payment details … Spring WebFlow allows developers to specify the possible states and transitions between them in XML files, so developers can focus on programming features such as payment processing.
Integrated MVC pattern
Spring has special annotations for MVC that allow for separating code in groups like services or repositories, and make it easier to load and test them using dependency injection. And it is easy to map the URLs to the classes that do the functionalities using Controllers and automatically serialise the data before sending it to the views.
Annotations use
It includes many annotations that reduce the code needed to do typical actions. For example, @RequestMapping maps a url address to a method instead of defining a servlet and configuring it in the web.xml file.
I hope that now you feel encouraged to work with it.

Leave a Reply