Spring Basics

Framework:
A framework is a collection of components that can used to build well organized applications.

Spring Framework:
Spring is a framework, because it provides components to build common parts of applications, such as data access support, MVC support, and many others.

The core of the Spring Framework is based on the principle of Inversion of Control (IoC). Applications that follow the IoC principle use configuration that describes the dependencies between its components. It is then up to the IoC framework to satisfy the configured dependencies. The “inversion” means that the application does not control its structure; it is up to the IoC framework to do that.

IoC:
IoC provides services through which a component can access its dependencies and services for interacting with the dependencies throughout their lives. In general, IoC can be decomposed into two subtypes: DI and dependency lookup

DI:
Dependency Injection (DI) in computer programming refers to the process of supplying an external dependency to a software component. It is a specific form of inversion of control where the concern being inverted is the process of obtaining the needed dependency.
Three types
1. interface injection
2. setter injection
3. constructor injection

Dependency Lookup:
It’s the reverse process of DI where a component must acquire a reference to a dependency, whereas with DI, the dependencies are literally injected into the component by the IoC container
two types are
1. Dependency pull
2. Contextualized dependency lookup (CDL

AOP:
Aspect-oriented programming (AOP) is one of the technologies of the moment in the programming space. AOP lets us to implement crosscutting logic—that is, logic that applies to many parts of your application—in a single place, and then have that logic automatically applied right across the application

there are two types of AOP

1. Static AOP, such as AspectJ.
2. Dynamic AOP, such as that in Spring, allows crosscutting logic to be applied arbitrarily to any other code at runtime


0 comments:

Post a Comment