spring | Spring Framework
ExampleSpringisaframework,whichprovidesbunchofclasses,byusingthiswedontneedtowriteboilerplatelogicinourcode,soSpringprovidesanabstractlayeronJ2ee.ForExampleinSimpleJDBCApplicationprogrammerisresponsibleforLoadingthedriverclass Creatingtheconnection Creatingstatementobject Handlingtheexceptions Creatingquery Executingquery Closingtheconnection Whichistreatedasboilerplatecodeaseveryprogrammerwritethesamecode. Soforsimplicitytheframeworktakescareofboilerplatelogi...
ExampleSpring is a framework, which provides bunch of classes, by using this we dont need to write boiler plate logic in our code, so Spring provides an abstract layer on J2ee.
For Example in Simple JDBC Application programmer is responsible for
Loading the driver class Creating the connection Creating statement object Handling the exceptions Creating query Executing query Closing the connectionWhich is treated as boilerplate code as every programmer write the same code. So for simplicity the framework takes care of boilerplate logic and the programmer has to write only business logic. So by using Spring framework we can develop projects rapidly with minimum lines of code, without any bug, the development cost and time also reduced.
So Why to choose Spring as struts is thereStrut is a framework which provide solution to web aspects only and struts is invasive in nature. Spring has many feature...