Your SlideShare is downloading. ×
Spring framework
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Spring framework

600
views

Published on

Published in: Technology, Education

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
600
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
19
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Spring Framework Sean Melody November 2, 2011
  • 2. Introduction – Spring training?
  • 3. What is the Spring Framework?
    • Originally created by Rod Johnson as an alternative to J2EE / EJB
    • 4. Interface21 / Springsource now owned by VMWare
    • 5. Apache 2.0 Licensed
    • 6. Rich ecosystem of tools, frameworks and patterns
    • 7. Widely adopted in Java community
    • 8. Strong forum and large knowledge base on Stackoverflow.com
  • 9. Life before Spring
  • 10. The Spring Ecosystem
    • Spring – core
    • 11. Security
    • 12. Web / MVC
    • 13. Aspect Oriented Programming (AOP)
    • 14. Transaction Management
    • 15. Springsource Tool Suite
    • 16. Spring social
  • 23. Core Principles
    • Inversion of Control
      • Dependency Injection
    • Standards compliance a secondary goal
    • 24. Test first
    • 25. Avoid coupling to Spring framework
    • 26. Cross cutting concerns through simplified AOP
    • 27. Convention over Configuration
  • 28. Examples We're using Spring in SLI every day! Here's how: API Security, IoC container, Test Ingestion IoC container, Test DAL Spring Data, IoC Container, Test Databrowser Spring MVC, IoC, Test
  • 29. Inversion of Control (IoC)
      Component scanning
      • Bean stereotypes
      • 30. Auto-wiring
    • ApplicationContextAware
    • 31. @PostConstruct
      Java: @Service public class SchoolRepositoryService implements SchoolService { @Autowired SchoolRepository schoolRepository;
      XML:
    • <context:component-scan base-package=&quot;net.wgen&quot; />
    • 32. <context:annotation-config />
  • 33. Spring Data
    • Repository pattern in the DAL abstracts implementation of OR/M from service and ingestion layers
    • 34. Allows for swap-out of persistence technology if needed
    • 35. Eliminates boilerplate code that exists in many JPA / Hibernate projects by proxying DAOs.
      db.xml: <jpa:repositories base-package=&quot;net.wgen.sli.repository&quot; />
  • 36. Security
    • API module has in-memory authentication example in securityContext.xml
    • 37. Leverages the security namespace
    • 38. More usage of Spring Security's permission evaluation coming in Sprint 3
  • 39. Spring FAQ
    • Q: Can Spring help me decouple infrastructure concerns from my business logic?
      • A: Yes, that's the core use case around using the IoC container
    • Q: Can Spring help me eliminate repetitive code?
      • A: Runtime proxying, dependency injection, and AOP are solutions
    • Q: Can Spring help me isolate layers during unit test time?
      • A: Yes, use different application contexts that mock out external dependencies
    • Q: Can Spring help me with my Christmas shopping or cooking my potluck dish?
      • A: No, sorry.
  • 40. References
    • http://www.martinfowler.com/articles/injection.html
    • 41. http://www.springsource.org/