Introduction to the Spring Framework By Nigusse A

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

Discussion Points Brief Introduction to Spring Framework Key Features Overview of the Spring Framework Vs. J 2 EE Spring DAO 2 03/01/2022

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 Java. Beans 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 3 03/01/2022

Spring Framework Key Features Core Spring: Inversion Control/Dependency Injection (Io. C/DI) Aspect Oriented Programming (AOP) Aspect: A modularization of a concern that cuts across multiple objects. 4 03/01/2022

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. 5 03/01/2022

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. 6 03/01/2022

Components of Spring Framework 7 03/01/2022

Components of the Spring Framework Core Container: -it contains the Bean. Factory which is the basis on which Spring DI is based. Application Context Module – The core module's Bean. Factory 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. 8 03/01/2022

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, i. BATIS, 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. 9 03/01/2022

Spring vs. EJB 3 10 03/01/2022

Summary Key Features of Spring Dependency Injection & AOP Components of the Spring Framework Comparison b/n Spring and EJB 3 11 03/01/2022
![References [1] Spring In Action By. Craig Walls (2007) Second Edition. [2] POJO Application References [1] Spring In Action By. Craig Walls (2007) Second Edition. [2] POJO Application](http://slidetodoc.com/presentation_image_h2/4a45e1104397b245eaaa87925a848075/image-12.jpg)
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, 2007 [3] Dependency Injection for Loose Coupling -The Code Project http: //www. codeproject. com/cs/design/Dependency. Injection. asp 12 03/01/2022
- Slides: 12