Bryan
Bryan

Reputation: 3009

Spring Framework in simple terms

I've done some research on this, but still only have a vague understanding of it at best. Can anyone who is knowledgable on this give me a simple (or as simple as possible) description that someone with a basic understanding of programming could understand? Thanks for any help.

Upvotes: 10

Views: 7085

Answers (2)

Tomasz Nurkiewicz
Tomasz Nurkiewicz

Reputation: 340733

Spring was built on top of the idea of dependency injection and inversion of control. In normal words - instead of having a bunch of classes creating each other and passing each other from one place to another you have a bag of beans. Each bean declares its dependencies (what services do I need to work?) and Spring container resolves this requirements by automatically and automagically wiring everything together.

You have a Service that says (through XML, annotations, constructor signature...) I need DAO interface to work! and Spring is kind enough to find some bean that implements that interface, create it first and pass where it is required.

On that foundation multiple other services were provided (mostly in terms of data access and AOP), but the injection is the core concept.

Upvotes: 17

dash1e
dash1e

Reputation: 7807

If you want a quick and simple explanation then I can tell you that the heart of the Spring framework is the Inversion of control (IoC).

Naturally is reductive talk about Spring in 3 lines, but understand the IoC and you understand Spring. Everything is build around it in Spring.

Upvotes: 1

Related Questions