Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Spring, IoC and DI

Presentation about Spring framework (Core module), Inversion of Control and Dependency Injection.
by

Jonatan Ivanov

on 19 June 2016

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Spring, IoC and DI

Spring - IoC The main idea behind IoC as a concept is that component dependencies, lifecycle events, and configuration reside outside of the components themselves. Spring Core is an IoC framework. Inversion of Control is a Design Pattern. Hollywood Principle: „Don’t call us, we’ll call you” Dependency Injection
Configuration Injection
Lifecycle Management Dependency
Injection create();
init();
destroy();
[...](); Lifecycle e.g.: Config e.g.: db.host
db.port
db.name
[...] Magic http://catb.org/esr/jargon/html/magic-story.html http://springsource.org http://martinfowler.com/articles/injection.html Demo Dependency Non-Injection ... and Injection public class Example {
private IDatabase myDatabase;

public Example() {
myDatabase = new DatabaseImpl();
}

public void DoStuff() {
...
myDatabase.GetData();
...
}
} public class Example {
private IDatabase myDatabase;

public Example(IDatabase useThisDatabaseInstead) {
myDatabase = useThisDatabaseInstead;
}

public void DoStuff() {
...
myDatabase.GetData();
...
}
}
Full transcript