Tuesday, January 10, 2012

Spring WebMVC and Spring WebFlow

one of the project I am working is similar to an inventory management system. where users submits requests and it has to go several approvals before it is submitted to the approved vendor from the list.

this also involves technologies like spring batch for receiving the list of the approved vendors from different system on a daily basis and weekly basis in a csv file.

It also involves sending an email to the approval manager and reminding him by sending emails everyday if he didn't approve.

planning to use modules of the spring framework for implementing this project. started learning about spring webmvc and spring webflow. getting some understanding of the webmvc. created a small prototype of my own.

Now I need to integrate Spring MVC with tiles framework.

breif description of spring MVC.
Dispatcher servlet. code is

appServlet
org.springframework.web.servlet.DispatcherServlet

contextConfigLocation
/WEB-INF/spring/appServlet/servlet-context.xml

It is configured in web.xml and all the requests should go to dispatcher servlet. once dispatcher servlet receives the request it will check for Handler Mappings configured in xml file. from the handler mapping it will find the Controller. Dispatcher servlet will forward the request to the controller using with the help of Handler Adapters. if you dont specify any handler adapter it will use the default one that comes with spring distribution. think that it is similar to your request filter.

once the controller performs the business operation by invoking the service methods it will return a ModelandView object that is populated with model Map data to the dispatcher servlet.

Now dispatcher servlet uses viewresolver to identify the correct view that has to render back to the user.

Just started now...lets dig more into it by developing a real application....looks like fun

No comments:

Post a Comment