Wednesday 16 May 2012

What is Difference between Spring and structs Frame Work


What is Difference between Spring and structs Frame Work
                         Spring

 1.Java-j2ee Framework software

 2. Can be used to develop java-j2ee application including web application

 3.Provides abstract layer java-j2ee technology including servlets-jsp also by providing abstract layer on other framework software.

 4.Uses built-in-middleware services.

 5.    Light weight software

 6.    All Spring application are given based on dependency injection principle.

                             Structs

 1.Web Framework java Based Software

 2. Should be used to develop only web-application

3.  Also Provides Abstract layer only on servlet/jsp Technologies

4. Does not give built-in-middle ware Services.

5. Heavy weight Software

6.All structs are developed based on MVC-2 Architecture




What is difference between dependency look up and dependency injection?

Dependency Look Up:
If the resources of the application is explicitly sending time to search and get its dependent values from other resources of the application then it is called dependency look up
In dependecy look up resource perform “PULL” operator on other resources to get dependent values.
Advantage:
Resource can get only required dependent values.
Disadvantage:
Resource should spend time to search and get dependent values.


Dependency Injection:
if the underlying server software or framework software or container software or special resources of the application gathers dependent values and assigns them to resource of the application dynamically then this process is called “DEPENDENCY INJECTION”
Ex:the way jre/jvm executes constructor dynamically when object is created to assign certain values as initial (or) dependent values to object is called D.I
Advantage:
Resources need not to spend time to get dependent values.
Disadvantage:
Both necessary and unnecessary values will be injected.

Even Though Spring can be used to develop all logics of the all layers in mvc architecture project , as of now industry is using spring software only to develop Business logic of model layer.

From Spring 2.x software, Spring is having 6 modules.  They are

1.Spring Core
2.Spring DAO
3.Spring ORM
4.Spring JEE
5.Spring WEB
6.Spring AOP






No comments:

Post a Comment