From Tight to Loose Coupling with Spring IoC (Inversion of Control)
https://github.com/jalbertomr/SpringIoC.git
Highly Coupled Classes
To Run other Class is needed modify Classes
Decoupling a little using Interface
To change the game just change the new Class for GamingConsole game variable.
Decoupling using sprinc IoC
Creating Context from Spring to use the beans. (Ctrl+1 to create new local variable).
Is proposed the names, between them context.
There in no needed to use new to instantiate any class, Spring IoC do the job for you.
Specifying where packages to find the beans.
No hay comentarios:
Publicar un comentario