IoC promove the loose coupling, It minimizes the
amount of code, it make easy to test application since
you dont need JNDI, it uses dependency injection
Dependency Injection
Is a technique that says that you don't create your
object, but you have to describe how they should be
created. You don't connect your components but you describe them
Container
Is the basic Spring
module that provide all
functionalities to
Springs applications
BeanFactory
Is an implementation
of Factory pattern
Annotations:
Sirve para construir una jerarquia de clases, encapsular la logica de creacion al cliente, y el cliente trabaja con una referencia
ApplicationContext: Is a subinterfaz
of bean factory it provides extra
functionalities as handle resources
and internationalisation
Spring Bean
they are the objects that form the backbone of your
application those objects are handle by the spring
container, you configure them for xml, annotations or
java configurations
Scopes
Global session
Return a new instance for global Http session
is common in portlets applications
Singleton
The container create only one bean and
store it in cache and when the application
try to get this bean the container return the
same instance
Prototype
Return a new instance each
time it requested
Session
Return a new instance
per http session
Request
Return a new instance
each per http request
Bean wiring
You can wiring beans between
them without construct args or
properties