Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to the Spring Framework By: Nigusse A. Duguma Kansas State university Department of Computer Science Nov 20, 2007.

Similar presentations


Presentation on theme: "Introduction to the Spring Framework By: Nigusse A. Duguma Kansas State university Department of Computer Science Nov 20, 2007."— Presentation transcript:

1 Introduction to the Spring Framework By: Nigusse A. Duguma Kansas State university Department of Computer Science Nov 20, 2007

2 By: Nigusse A. Duguma Nov 20, 2007 2 Discussion Points Brief Introduction to Spring Spring Framework Key Features Overview of the Spring Framework Spring Framework Vs. J2EE Spring DAO

3 By: Nigusse A. Duguma Nov 20, 2007 3 What is Spring? An open source framework created by Rod Johnson. created to address the complexity of enterprise application development  It makes it possible plain JavaBeans to achieve things that were previously only possible with EJBs.  Simplicity, testability, and loose coupling Spring is a framework that helps to develop loosely coupled application code. "Everything should be made as simple as possible, but not simpler." Einstine

4 By: Nigusse A. Duguma Nov 20, 2007 4 Spring Framework Key Features Core Spring: Inversion Control/Dependency Injection (IoC/DI)‏ Aspect Oriented Programming (AOP)‏  Aspect: A modularization of a concern that cuts across multiple objects.

5 By: Nigusse A. Duguma Nov 20, 2007 5 Dependency Injection Objects are passively given their dependencies instead of creating or looking for dependent objects for them selves.  Instead of an object looking up dependencies from a container, the container gives the dependencies to the object at instantiation with out being asked. Primary approaches to implementing DI:  Constructor injection and  Setter injection.

6 By: Nigusse A. Duguma Nov 20, 2007 6 Aspect Oriented Programming Application objects do what they are supposed to do  perform business logic -nothing more  They are not responsible for other system concerns, such as logging or transaction support Aspect: A modularization of a concern that cuts across multiple objects.

7 By: Nigusse A. Duguma Nov 20, 2007 7 Components of Spring Framework AOP ORM DAO JMXJCX JMS Web Context Portlet MVC Remoti ng MVC Core

8 By: Nigusse A. Duguma Nov 20, 2007 8 Components of the Spring Framework Core Container: - it contains the BeanFactory which is the basis on which Spring DI is based. Application Context Module – The core module's BeanFactory makes Spring a Container, but the Context module is what makes it a Framework. AOP Module – serves as the basis for developing your own Aspects for your Spring enabled application. JDBC abstraction and the DAO- this module uses the Spring's AOP module to provide transaction management services for the objects in a spring application.

9 By: Nigusse A. Duguma Nov 20, 2007 9 Cont. (Spring Framework)‏ ORM (Object Relational Mapping) Module –  builds on the DAO support, providing way to build DAO for several ORM solutions.  Spring provides hooks into several popular ORM frameworks including Hibernate,iBATIS,SQL Maps, Java Persistence API, Java Data Objects. The Spring MVC Framework  Spring comes with its own MVC framework that promotes loose coupling techniques in the web layer of an application.

10 By: Nigusse A. Duguma Nov 20, 2007 10 Spring vs. EJB3

11 By: Nigusse A. Duguma Nov 20, 2007 11 Summary Key Features of Spring  Dependency Injection & AOP Components of the Spring Framework Comparison b/n Spring and EJB3

12 By: Nigusse A. Duguma Nov 20, 2007 12 References [1] Spring In Action By. Craig Walls (2007) Second Edition. [2] POJO Application Frameworks: Spring Vs. EJB 3.0 by Michael Juntao Yuan http://www.onjava.com/lpt/a/5996 accessed on Nov 5,2007http://www.onjava.com/lpt/a/5996 [3] Dependency Injection for Loose Coupling -The Code Project http://www.codeproject.com/cs/design/DependencyInjection.asp http://www.codeproject.com/cs/design/DependencyInjection.asp


Download ppt "Introduction to the Spring Framework By: Nigusse A. Duguma Kansas State university Department of Computer Science Nov 20, 2007."

Similar presentations


Ads by Google