91-9990449935 0120-4256464 |
Spring TutorialThis spring tutorial provides in-depth concepts of Spring Framework with simplified examples. It was developed by Rod Johnson in 2003. Spring framework makes the easy development of JavaEE application. It is helpful for beginners and experienced persons. Spring FrameworkSpring is a lightweight framework. It can be thought of as a framework of frameworks because it provides support to various frameworks such as Struts, Hibernate, Tapestry, EJB, JSF etc. The framework, in broader sense, can be defined as a structure where we find solution of the various technical problems. The Spring framework comprises several modules such as IOC, AOP, DAO, Context, ORM, WEB MVC etc. We will learn these modules in next page. Let's understand the IOC and Dependency Injection first. Inversion Of Control (IOC) and Dependency InjectionThese are the design patterns that are used to remove dependency from the programming code. They make the code easier to test and maintain. Let's understand this with the following code: In such case, there is dependency between the Employee and Address (tight coupling). In the Inversion of Control scenario, we do this something like this: Thus, IOC makes the code loosely coupled. In such case, there is no need to modify the code if our logic is moved to new environment. In Spring framework, IOC container is responsible to inject the dependency. We provide metadata to the IOC container either by XML file or annotation. Advantage of Dependency Injection
Advantages of Spring FrameworkThere are many advantages of Spring Framework. They are as follows: 1) Predefined TemplatesSpring framework provides templates for JDBC, Hibernate, JPA etc. technologies. So there is no need to write too much code. It hides the basic steps of these technologies. Let's take the example of JdbcTemplate, you don't need to write the code for exception handling, creating connection, creating statement, committing transaction, closing connection etc. You need to write the code of executing query only. Thus, it save a lot of JDBC code. 2) Loose CouplingThe Spring applications are loosely coupled because of dependency injection. 3) Easy to testThe Dependency Injection makes easier to test the application. The EJB or Struts application require server to run the application but Spring framework doesn't require server. 4) LightweightSpring framework is lightweight because of its POJO implementation. The Spring Framework doesn't force the programmer to inherit any class or implement any interface. That is why it is said non-invasive. 5) Fast DevelopmentThe Dependency Injection feature of Spring Framework and it support to various frameworks makes the easy development of JavaEE application. 6) Powerful abstractionIt provides powerful abstraction to JavaEE specifications such as JMS, JDBC, JPA and JTA. 7) Declarative supportIt provides declarative support for caching, validation, transactions and formatting. Topics of Spring FrameworkThe topics of Spring Framework covered by trainingtrains is given below. Basics of SpringSpring Modules TutorialSteps to create Spring Application Tutorial Spring Application in Myeclipse IDE Spring Application in Eclipse IDE Tutorial IOC Container Dependency Injection in SpringConstructor InjectionInjecting Dependent Object Constructor Injection with collection Constructor Injection with collection having dependent object Constructor Injection with Map Constructor Injection with Map having dependent object Inheriting Bean Setter Injection Setter Injection with Dependent Object Setter Injection with Collection Setter Injection with Collection having dependent object Setter Injection with Map Setter Injection with Map having dependent object Constructor Injection vs Setter Injection Spring AOP TutorialSpring AOP TutorialSpring1.2 AOP DTD Examples Spring AspectJ Annotation Examples Spring AspectJ XML Configuration Examples Spring Jdbc TutorialJdbcTemplate ExamplePreparedStatement ResultSetExtractor RowMapper NamedParameterJdbcTemplate class SimpleJdbcTemplate class Spring with ORM FrameworksSpring with ORM FrameworksSpring with Hibernate Spring with JPA Spring Expression Language (SpEL)SpEL ExamplesOperators in SpEL variable in SpEL Spring MVC TutorialSpring MVC TutorialSpring MVC Multiple Controller Example Spring MVC Login Example Spring MVC Tiles ExampleSpring MVC Tiles ExampleRemoting in SpringRemoting in Spring FrameworkSpring and Rmi Integration Spring Remoting by HTTP Invoker Example Spring Remoting by Hessian Example Spring Remoting by Burlap Example Spring with OXM frameworksSpring and JAXB IntegrationSpring with Xstream Spring with Castor Spring with Java MailSpring with Java Mail tutorialLet's see the simple example of Spring Java mail. Web Integration in SpringSpring and Struts 2 IntegrationLogin Example with Spring and Struts 2 Integration Reference Linkshttp://www.springsource.org/http://en.wikipedia.org/wiki/Spring_Framework
Next TopicSpring Modules
|