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

Monday, January 9, 2012

Webservices basic concepts.

I am reading about webservices these days...I am feeling like I missed lot of concepts before, i was working on webservice quite a long time may be three to four years. Developed SOAP based and Restful webservices in various projects. My vision was always make the webservices to work and I was able to acheive that. developed webservice using RAD and AXIS and also has concepts of SOAP and WSDL.

Reading about webservices now makes me more confidence about my approach towards webservices. I came to know lot of inner details like binding and services in wsdl why they are called as concrete compared to other parts of the wsdl which they are called abstract. core difference between RPC and Document based with SOAP and Literal encoding.

Came to know about how to apply security to the webservices in SOAP based and also in Restful webservice. In my opinion Restful webservices are nothing but SOAP based webservices transfered over HTTP protocal. it basicaly avoids soap message and carries the xml itself in the HTTP payload using HTTP verbs.

planning to get some benchmark for my study in webserivces.

Spring Batch Project.

Its been long time I have blogged. recently I joined a new project in richmond working on Spring batch and spring batch admin project. This is basically an integration project that transfers huge amount of data between different systems. I was leading this project. Started implementing the file transfer in offline mode using spring batch and used spring batch admin for monitoring, restarting and sceduling batches through GUI interface provided by spring batch admin.
spring batch cocepts:
1. what I liked about spring batch project, it is easy to configure if you already know spring basic concepts.
2. It is very robust and powerful in the sense it provides restart feature for the batch and persistent store mechanism for storing batch status during its running.
3. I used job context feature for sharing small parameters between steps inside a job. I liked it very much.
spring batch admin project
1. this one took long time while setting up because the jars are very unstable. version 1.0 to 1.1 has lot of changes.
2. In my project we are overriding the table prefix feature that is given by spring batch admin to change the default table name for all batch infrastructure related tables.
3. In batch admin project, we can configure this only from 1.1 version. I liked the way admin project is developed, we can override any feature like jobRespository, jobOperator or datasource of our own or leave it like that if you want default ones. it is like application context inheritance feature. parent application context and child application context.