Features for faster development

Each task discussed previously in the introduction, such as reading data from the presentation layer, binding the read data to an object, and so on, adds extra burden on the development side within limited time. The Spring framework facilitates developers for easy and faster development with the following features:

  • The Spring framework supports MVC architecture, which gives a clear separation of Model, View, and Controller.
  • The framework facilitates the developers with the power of beans for easy handling of data by binding the request parameters to the command object.
  • It provides easy validation of request parameters performing validation either with the Validator interface, or by using annotations. It can also support customization of validation rules.
  • It provides annotations, such as @RequestParam and @RequestHeader, which facilitate request data binding to the method parameters without getting involved in Servlet APIs.
  • It has support for a wide range of view templates, such as JSTL, FreeMarker, Velocity, Thymeleaf, and many more.
  • The transfer of data from the Controller to the view is made easy with the use of the ModelMap object.
  • It is easily pluggable to other frameworks, such as Apache Struts2.0, JSF, and many more.

Generally, web applications are deployed on web servers. Each resource in the application is mapped with the URL, and users use these URLs to access the resources. The Servlet or JSP reads the data from the request object, performs the business logic on it, and then returns the response as a result. We all are well aware of this general flow, as it takes places in any web application. In this flow, the first and foremost concern is that these web applications don't have any Servlet or controller that manages the flow of the entire application. Yes, the first attainder to the application is absent. The entire application and its flow have to be maintained by the development side. This is where the major difference between Servlets and Spring lies.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.100.42