• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Spring Framework
 

Spring Framework

on

  • 3,748 views

A presentation given my me on Spring in Aftek.

A presentation given my me on Spring in Aftek.

Statistics

Views

Total Views
3,748
Views on SlideShare
3,455
Embed Views
293

Actions

Likes
2
Downloads
156
Comments
2

25 Embeds 293

http://preetampalwe.blogspot.com 128
http://preetampalwe.blogspot.in 93
http://www.slideshare.net 23
http://preetampalwe.blogspot.co.uk 7
http://preetampalwe.blogspot.ca 6
http://preetampalwe.blogspot.pt 5
http://preetampalwe.blogspot.hk 4
http://preetampalwe.blogspot.com.au 3
http://preetampalwe.blogspot.sg 3
http://preetampalwe.blogspot.ch 2
http://www.lmodules.com 2
http://preetampalwe.blogspot.com.br 2
http://preetampalwe.blogspot.co.at 2
http://preetampalwe.blogspot.nl 2
http://preetampalwe.blogspot.hu 1
http://preetampalwe.blogspot.tw 1
http://preetampalwe.blogspot.cz 1
http://preetampalwe.blogspot.ro 1
http://preetampalwe.blogspot.it 1
http://preetampalwe.blogspot.com.ar 1
http://preetampalwe.blogspot.de 1
http://preetampalwe.blogspot.ae 1
http://preetampalwe.blogspot.no 1
http://preetampalwe.blogspot.com.es 1
http://preetampalwe.blogspot.kr 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • good ! thanks
    Are you sure you want to
    Your message goes here
    Processing…
  • good
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.
  • Tip: Add your own speaker notes here.

Spring Framework Spring Framework Presentation Transcript

  • Spring Framework Presented by Preetam Palwe Aftek Limited
  • Introduction
    • Spring is a open source application framework for Java (and .NET)
    • Replacement or addition to EJB
    • No “Reinventing the wheels” rather integrating with proven frameworks
    • Configurable using XML (or annotations) metadata
    • First version in 2002 by Rod Johnson (released with his book “Expert One-on-One J2EE Design and Development”)
    • VMware acquired SpringSource in 2009
  • Modules (Features)
    • Inversion of Control (IoC)
      • Managed objects
      • Dependency injection
    • Data access
      • OR mapping integration
      • JDBC templates
      • Transaction management
    • Aspect Oriented Programming (AOP)
    • Testing
    • MVC (and many more…)
  • Inversion of Control (IoC)
    • IoC container manages object’s lifecycle
    • Managed objects are called as beans!
    • Dependency injection via constructors, properties, factory methods
  • Data access
    • Integration with many data access frameworks JDBC, Hibernate, JPA etc
      • Resource management like connections etc
      • Uniform exception handling (using exception hierarchy)
      • Transaction management
        • JDBC transactions
        • OR mapping (Unit of Work) transactions
        • JTA transactions
        • Integration with messaging and caching systems
  • Data access (cont)
    • Template classes
      • Based on Template Method pattern
      • JDBC templates helps eliminate boilerplate code in DAOs
      • JMS templates
      • Templates for OR mapper technologies
  • Aspect Oriented Programming (AOP)
    • Separation of cross-cutting concerns
    • Increase in modularity
    • Own interception based AOP framework
    • Configured at runtime (no compilation step needed)
    • Same nomenclature as that of AspectJ (aspect, advice, pointcut etc)
    • Integration with AspectJ
    • Used for transaction management, security, JMX etc
  • Testing
    • Easy to unit test since everything is POJO
      • IoC helps (Spring bean factories, contexts can be setup outside the container)
      • No dependency on application server services like JNDI
    • Test framework like org.springframework.test package
      • Reuse business layer XML configuration
      • Cache container configuration like JDBC connection or Hibernate session factories
      • Test methods can have transactions (helpful for testing DAOs)
  • MVC
    • Spring has its own MVC framework similar to struts
      • Strategy interfaces based design
      • IoC helps easier unit testing
    • Integration with struts
    • Integration with Flex BlazeDS
  • Advantages
    • Effectively organize your middle tier objects (with/without EJB) (no need of service locators!)
    • Promotes programming to interfaces, rather than classes (helps to perform mock-object testing!)
    • Eliminate the proliferation of Singletons
    • Minimum or zero dependency on Spring APIs
    • Easy to unit test (no need of deployment for testing!)
    • Declarative transaction management using AOP (no need of heavy EJB container!)
    • Build applications using POJOs!
  • Case study: SomeProject
    • IoC
      • IoC container manage object lifecycle and dependency injection
      • IoC managed singletons
    • Programming for interfaces
      • Mock object injection of business layer classes enable unit testing of presentation tier delegate classes
      • Course grain business services exposed to client objects
  • Case study: SomeProject (cont)
    • Integration with JPA
      • JPA hides OR mapping framework like Hibernate
      • DI of PersistenceContext in beans
    • AOP
      • Declarative transaction management for service layer objects
    • Ease of unit testing
      • Unit testing of business layer POJOs using Spring TestContext framework
      • No need of application deployment for unit testing
  • Case study: SomeProject (cont)
    • Business logic portability
      • Zero dependency on Spring API
      • Zero dependency on Hibernate / TopLink API (JPA helps!)
      • JTA not needed and even heavy application server not needed (deployment in tomcat!)
  • References
    • http://en.wikipedia.org/wiki/Spring_Framework
    • http://www.springsource.org
    • Thank you!