Archive

Posts Tagged ‘springsource’

SpringSource Tool Suite Installation & Configuration

November 26, 2009 1 comment

 

SpringSource Tool Suite(STS) Installation & Configuration:

 

At the time of this post, the latest version available form SpringSource is STS 2.2.1. Since its built on top of Eclipse (version 3.5 – Galileo), you will need to have Java installed on your computer. Refer to Eclipse IDE category posts for details on this part. It requires JDK 5 and higher and is supported on Windows, Mac & Linux operating systems so far. I will be posting ‘Exploring Spring Framework’ series developed using STS, so this is a starter post for it. Moreover, its worth trying such a comprehensive Spring development tool which has been made available for free recently.

As such downloading and installing STS is straight forward. All you have to do is to visit the SpringSource STS  site and follow the instructions. Yet, here is step-by-step instructions and other relative information for doing it. 

 

Follow the steps below to download & install STS:

  • Before downloading STS, make sure that your system meets these pre-requisites. As you can see, you need to have JDK 5 or higher installed in your system. [Refer to Java Installation & Configuration post for details].

Read more…

Advertisements

Spring Framework Primer

November 20, 2009 Leave a comment

 

 

 

  

  

Spring Framework Primer 

The Spring Framework is an open source application framework, for the Java platform and also the .NET Framework (Spring.NET). The first version was written by Rod Johnson who released the framework with the publication of his book Expert One-on-One J2EE Design and Development in October 2002. The framework was first released under the Apache 2.0 license in June 2003. The Spring 1.2.6 framework won a Jolt productivity award and a JAX Innovation Award in 2006. The current Spring framework version is 3.0.

VMware acquired SpringSource for approximately $362 million on September 16, 2009.

Spring was created to address the complexity of enterprise application development. One of the chief advantages of the Spring framework is its layered architecture, which allows you to be selective about which of its components or modules you want to use for your application development. Unlike single-tier frameworks, such as Struts or Hibernate, Spring aims to help structure whole applications in a consistent, productive manner, pulling together best-of-breed single-tier frameworks to create a coherent architecture.

The core features of the Spring Framework can be used by any Java application, but there are extensions for building web applications on top of the Java Enterprise platform. Although the Spring Framework does not impose any specific programming model, it has become popular in the Java community as an alternative, replacement, or even addition to the Enterprise JavaBean (EJB) model.

 

Spring is unique for several reasons:

  • It addresses important areas that other popular frameworks don’t. Spring focuses around providing a way to manage your business objects.
  • Spring is comprehensive and modular (because of its modules). Spring has a layered architecture, meaning that you can choose to use just about any part of it in isolation, yet its architecture is internally consistent. So you get maximum value from your learning curve. For example: You might choose to use Spring only to simplify use of JDBC, or you might choose to use Spring to manage all your business objects. 
  • It’s easy to introduce Spring incrementally into existing projects.
  • Spring is designed from the ground up to help you write code that’s easy to test. Spring is an ideal framework for test driven projects.
  • Spring is an increasingly important integration technology, its role is recognized by vendors both large and small.
  • Spring also addresses most infrastructure concerns (cross-cutting concerns such as logging, security etc) of typical applications.

 

  

Architectural benefits of Spring:

Let’s look at some of the benefits Spring can bring to your project:

  • Spring can effectively organize your middle tier objects. Spring takes care of plumbing that would be left up to you if you use only Struts or any other framework that use J2EE APIs.
  • Spring’s configuration management services can be used in any architectural layer, in whatever runtime environment.
  • Spring can eliminate the increase of Singletons used in many projects. This is a major problem that reduces testability and object orientation.
  • Spring eliminates the need to use a variety of custom properties file formats, by handling configuration in a consistent way throughout the application.
  • Spring facilitates good programming practice by reducing the cost of programming to interfaces rather than classes.
  • Spring is designed so that applications built with it depend on as few of its APIs as possible. Most business objects in Spring applications have no dependency on Spring.
  • Applications built using Spring are very easy to test. For certain unit testing scenarios, the Spring Framework provides mock objects and testing support classes. Spring also provides unique “integration testing” functionality in the form of the Spring TestContext Framework and legacy JUnit 3.8 support classes that enable you to test your code quickly and easily, even while accessing a staging database.
  • Spring helps you solve problems though being a most lightweight possible infrastructure. Spring provides an alternative to EJB that’s appropriate for many applications. For example, Spring can use AOP to deliver declarative transaction management without using an EJB container; even without a JTA implementation.
  • Spring provides a consistent framework for data access, whether using JDBC or an O/R mapping product such as TopLink, Hibernate or a JPA or JDO implementation.

 

Spring is essentially a technology dedicated to enable building applications using Plain Old Java Objects (POJOs). It enables you to develop components as POJOs containing only your business logic, while the framework takes care of the many value adds you need while building enterprise applications — even in areas that you may not have considered when initially authoring the application. This goal requires a sophisticated framework, which conceals much complexity from the developer.

Since your business logic is abstracted from infrastructure concerns, it’s also likely to enjoy a longer life. As the business logic is abstracted from the infrastructure concerns, any changes to the inevitable infrastructure change (such as choice of application server) can be minimized. Thus Spring can enable you to implement the simplest possible solution to your problems. And that’s worth a lot.

 

What does Spring do?  Read more…