Spring framework & inversion of control
Upcoming SlideShare
Loading in...5
×
 

Spring framework & inversion of control

on

  • 371 views

 

Statistics

Views

Total Views
371
Views on SlideShare
371
Embed Views
0

Actions

Likes
0
Downloads
9
Comments
0

0 Embeds 0

No embeds

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
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Spring framework & inversion of control Spring framework & inversion of control Presentation Transcript

  • Spring Framework & Inversion of Control By Nazim Sitmanbetov
  • Preconditions  Keep calm  Sit back  Relax
  • Inversion of Control  OOP principle, not design pattern  One of View slide
  • Principle in OOP  Modules depend on abstractions  Low level modules do not depend on high level modules View slide
  • Modules depend on abstractions Bad Good
  • Low level modules do not depend on high level modules Bad Tip: Avoid cyclic dependencies Good
  • IoC implementations  Factory Method  Service Locator  Dependency Injection (DI)
  • Factory Method
  • Service Locator
  • Dependency Injection  Allow client of module to set dependency Module Client
  • Achievement unlocked
  • Framework  Java  Light-weight  Open Source
  • What means Light-Weight?  No container requirements  Quick start  Application easy-to-test
  • Spring & IoC  Dependency Injection  Service Locator
  • Spring & Dependency Injection XML Based Configuration mcdonalds-with-kazatin.xml Java Program
  • Spring & Service Locator Annotation Based mcdonalds-locator.xml
  • Spring & Service Locator
  • Dependency Injection vs Service Locator DI Service Locator • Imperative • Can be used with existing classes • Declarative • Need to modify existing classes
  • Spring components
  • Time to cook