Some Facts About Spring Framework

... by Semir in ArchitectureApril 18, 2019 5

Spring is the most popular application development framework for enterprise Java. Millions of developers use Spring to create high performing, easily testable, re-usable code without any lock-in.

In early 2004, Martin Fowler asked the readers of his site: when talking about Inversion of Control: "the question is, what aspect of control are [they] inverting?" Fowler then suggested renaming the principle (or at least giving it a more self-explanatory name), and started to use the term Dependency Injection.

training@intellibitz.com (Spring Background)

Here are some of the facts about spring framework:

  • Used for creating Website and web service using Java programming language
  • Good support for connecting and working with databases
  • Supports Dependence Injection (i.e. if you have one Java object that depends on another object you can inject the second Java object into the first using XML or Java configuration).
  • Supports Aspect Oriented Programming (AOP), where you could create aspects that could add functionality to your existing class.

It could be used for organizing java code using either XML files or Java annotations in order to bullet together your java code.

Spring Framework: provides a comprehensive programming and configuration model for modern Java-based enterprise applications on any kind of deployment platform.

Infrastructural support at the application level: which involves “plumbing” of enterprise application so that teams can focus on application level business logic, without the unnecessary ties to specific deployment environments.


Features

Dependency Injection: It is also known as Inversion of Control (IOC), is a software design pattern in which one or more dependencies (or services) are injected, or passed by reference, into a dependent object (or client) and are made part of the client's state.

The pattern separates the creation of a client's dependencies from its own behaviour, which allows program designs to be loosely coupled and to follow the dependency inversion and single responsibility principles. It directly contrasts the service locator pattern, which allows clients to know about the system they use to find dependencies.

Software components (Clients), are often a part of a set of collaborating components which depend upon other components (Services) to successfully complete their intended purpose. In many scenarios, they need to know “which” components to communicate with, “where” to locate them, and “how” to communicate with them. When the way such services can be accessed is changed, such changes can potentially require the source of lot of clients to be changed.

The conventional approach till a few years ago was to separate the interface from the implementation. The factory pattern even allowed for hiding the complexity of instantiation. However the mechanism to “locate” the services was often left to the clients. Moreover some parts of the software also needed to be aware of the dependencies between the various services themselves and thus implicitly had to work out the appropriate sequencing of such component initialization, and had to track and manage their life cycles.

As an example, while the J2EE specification uses JNDI as a mechanism to standardize the mechanism of locating object references, such implementations often require a lot of code change when say the clients need to work in much simpler environments where say JNDI is not available.

A dependency can be a jar file or a whole lot of a project, it could also be a whole lot of Archetypes that in turn could pull a lot of jar files.

Summary

The Spring Web MVC framework provides Model-View-Controller (MVC) architecture and reay components that can be used to in the development of flexible and loosely coupled web application.

The Data Access framework enable integration to multiple different data objects through it provides like ORM, JDBC and JMS.



Leave a comment

SemirIbrahim