Showing posts from July, 2017

Why Spring

Today we will talk about Spring framework. Though you will find numerous websites and blogging available on internet regarding spring, I am going to put some more insight on why spring was needed and how the spring framework works. The basic motive of spring development was dependency injection and simplified programming model using java-beans (simple POJO). So what is mean by dependency injection.?     Every class will define there dependency. And the spring container will provide you the same.     for eg. You went to restaurant , and asked for a coffee, burgers. Now there are two types how the order will be delivered,         1. Self service. (Service Locator Pattern)         2. Service by the Restaurant staff. (Dependency injection)         1. The Service Locator Pattern:          Now in the above example the Restaurant is the Spring application container who provide all types of services. You ask the Spring application container for one service and look for it yourself.