Thursday, 13 April 2017

Spring Framework

Spring Framework

The Spring Framework is an open source application framework for the Java platform which aims to make J2EE development easier. Spring framework offers a lot of freedom to Java developers yet provides well-documented and easy to use solutions for common practices in the industry.

Spring is a glue framework that gives an easy way of configuring and resolving dependencies throughout the J2EE stack. The core features of the Spring Framework can be used in developing any Java application, but there are extensions for building web applications on top of the Java EE platform. Spring framework targets to make J2EE development easier to use and promote good programming practice by enabling a POJO-based programming model.

Goals of Spring Framework
          Reduce glue code/plumbing work
        Spring Framework takes lot of load off the programmer by providing dependencies when required and by using AOP.
          Externalize dependencies
        Dependencies are described in a separate file (xml) rather than mixing it with the business logic code itself. This gives a better control over the application.
          Manage dependencies at a single place
        Dependencies can be managed better due to this.
          Improve testability
        Actual code can easily be replaced by a stub for testing purposes.
          Foster good application design
        Since the actual implementation sits behind the interfaces, it fosters good application design.
        Spring offers integration points with several other frameworks. So, you do not have to write them yourself.
        Programmers are free to choose the modules that suit their application. Spring has a well layered architecture of 7 modules:
          Spring Core
          Spring Context
          Spring AOP
          Spring DAO
          Spring ORM
          Spring WebFlow
          Spring Web MVC

Spring Framework

Features of Spring Framework

        Objects in a Spring-enabled application often have no dependencies on Spring specific classes. It’s jar file is just over 2.5 MB.
        Provides support to not only J2EE applications but also to stand alone applications
          Inversion of Control (IoC) and Dependency Injection
        The core of the Spring Framework is based on the principle of IoC. Applications that follow the IoC principle use configuration that describes the dependencies between its components.
        Ioc or to be more descriptive, Dependency Injection aims to offer a simpler mechanism for providing components dependencies.
        Aspect Oriented Programming can be used to separate cross-cutting concerns from business logic. These concerns, then can be applied to many parts of the application. Logging and security are typical examples of such concerns.
          Pojo based programming
        Spring based applications need not extend/implement any spring specific classes. It leads to a simpler yet extensible programming model.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...