Sunday 21 August 2011

Spring 3

In this tutorial we will learn Spring 3 Framework with the help of many articles and example.
Spring Framework 3.0
In this tutorial we will learn Spring 3 Framework with the help of many articles and example. We have developed the tutorials covering major spring technologies. Let's get started with the Spring 3.
In the Spring 3 many new and improved features are introduced.  The Spring 3 framework is release with may new features, it's support for the  RESTful web services makes it very useful. The Spring 3 framework allows the developers to develop  RESTful web services using Spring Framework. The  RESTful web services is based on the SOAP.
Here is the list of new Modules introduced in the Spring 3:
  1. org.springframework.aop
  2. org.springframework.beans
  3. org.springframework.context
  4. org.springframework.context.support
  5. org.springframework.expression
  6. org.springframework.instrument
  7. org.springframework.jdbc
  8. org.springframework.jms
  9. org.springframework.orm
  10. org.springframework.oxm
  11. org.springframework.test
  12. org.springframework.transaction
  13. org.springframework.web
  14. org.springframework.web.portlet
  15. org.springframework.web.servlet
  16. org.springframework.web.struts
Spring Core Technologies:
Following are the Spring Core Technologies:
  1. The IoC Container
  2. Resources
  3. Validation, Data Binding, and Type Conversion
  4. Spring Expression Language (SpEL)
  5. Aspect Oriented Programming with Spring
  6. Spring AOP APIs
  7. Testing

Spring MVC

Spring MVC helps in building flexible and loosely coupled web applications. The Model-view-controller design pattern helps in seperating the business logic, presentation logic and navigation logic. Models are responsible for encapsulating the application data. The Views render response to the user with the help of the model object . Controllers are responsible for receiving the request from the user and calling the back-end services.
The figure below shows the flow of request in the Spring MVC Framework.
When a request is sent to the Spring MVC Framework the following sequence of events happen.
  • The DispatcherServlet first receives the request.
  • The DispatcherServlet consults the HandlerMapping and invokes the Controller associated with the request.
  • The Controller process the request by calling the appropriate service methods and returns a ModeAndView object to the DispatcherServlet. The ModeAndView object contains the model data and the view name.
  • The DispatcherServlet sends the view name to a ViewResolver to find the actual View to invoke.
  • Now the DispatcherServlet will pass the model object to the View to render the result.
  • The View with the help of the model data will render the result back to the user.

No comments:

Post a Comment