Archive

Posts Tagged ‘Spring Framework’

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

SpringSource Tool Suite

November 24, 2009 Leave a comment

 

What is SpringSource Tool Suite (STS)?

SpringSource Tool Suite has been a much awaited release from Spring Source. Interface21 (builders of Spring Framework) had partnered with Tasktop Technologies (builders of Eclipse Mylyn) to develop Spring Tool Suite, with the goal of reducing complexity in Java development and maintenance.  Mylyn is an open source Eclipse project (task-focused UI for Eclipse that reduces information overload and makes multi-tasking easy) while Spring is a popular open source framework for enterprise Java.  Built on Eclipse and Mylyn, Spring Tool Suite simplifies the large aggregation of tools used to develop complex enterprise Java applications.

This suite includes Spring IDE, the AspectJ Development Tools (AJDT), AspectJ, and Mylyn to create a task-focused approach to the development of Spring-powered enterprise applications. When Integrated development environments (IDEs) are used for large enterprise applications, they flood developers with tens of thousands of artifacts, wasting productive time by forcing developers to constantly find and identify the information relevant to the task at hand. In addition, the enterprise developer’s IDE consists of many tools that do not provide a unified workflow. While the Spring Framework and Portfolio projects already integrate many key technologies at the framework and library level, there is currently no tool solution that provides Mylyn’s task focus, tool integration, and workflow streamlining benefits to enterprise application developers. Building on the existing success of Eclipse, Mylyn and Spring IDE, the Spring Tool Suite will simplify the complexity dramtically.

 

Spring Source Quotes: 

SpringSource Tool Suite™ (STS) provides the best Eclipse-powered development environment for building Spring-powered enterprise applications. STS includes tools for all of the latest enterprise Java and Spring based technologies as well as the most advanced tooling available for enterprise OSGi development. STS supports application targeting to local, virtual and cloud-based servers and provides built in support for SpringSource dm Server and tc Server. SpringSource Tool Suite is freely available for development and internal business operations use with no time limits.

 

What’s available in STS? Read more…

Things to know about Spring Download, Installation & Configuration

November 23, 2009 Leave a comment

 

 

Things to know about download/installation/configuration of Spring Framework:

 

The Spring Framework and container is packaged in several JAR files. Spring is a library(.jar files) of classes that will be packaged with and used by your Spring-enabled applications. Installing Spring involves adding one or more JAR files to your application’s classpath. It does not have an executable runtime. Therefore, Spring is more similar to a library like Jakarta Commons than an application server like JBoss.

How you make Spring available to your application’s classpath will vary depending on how you build and run your application. You may choose to add the Spring JAR files to your system’s classpath or to a project classpath in your favorite IDE (as we will see in the post on configuring Spring Framework with Eclipse). If you’re building your application using Ant or Maven, be certain to include Spring in your build’s dependencies so that it will be included in the project’s target deployment.

 

Downloading Spring:

There’s plenty of additional materials in Spring’s full distribution, including Spring’s API documentation, examples, and the full source code for the Spring Framework. Therefore, the first thing you’ll want to do is to download the full Spring distribution. Refer to Spring Framework Installation & Configuration post. When downloading Spring, you will have 2 main choices: you can either download a Spring distribution that comes with its own dependencies or you can download a distribution that contains only the Spring JAR files. Even though the former is a much larger download, its better to download the one that comes with dependencies so that you won’t have to hunt down other JAR files that your application needs.

 

Exploring the Spring distribution:

Once you’ve downloaded the distribution, unzip it to a directory on your local machine. The Spring distribution is organized within the directory structure described in the table below. Several of these directories contain the Spring source code. The aspectj/,mock/, src/, and tiger/ directories contain the source code that makes up the Spring Framework itself. Meanwhile, the test/ directory contains the unit tests used to test Spring Framework. Although it’s not essential to using Spring, you may want to venture around in these directories to see how Spring does its stuff.

 

 

The Spring developers are extremely talented coders and there will be probably a little something to learn by reviewing their code. The docs/ directory contains two important pieces of documentation. The reference document is an overview of the entire Spring Framework. Also, the JavaDocs for the entire Spring Framework can be found under docs/—you’ll probably want to add this as a bookmark in your web browser, because you’ll refer to it often. The samples/ directory contains a handful of sample Spring applications. Of particular note are the petclinic and jpetstore examples. Both of these applications highlight many important elements of the Spring framework.

 

Building your classpath: Read more…

Spring Download & Installation

November 23, 2009 Leave a comment

 

 

Spring Framework Download & Installation: 

 

At the time of this post, the latest Spring Framework release available to download is Spring Framework 3.0.0.RC2, which is a development release. Previous releases are also available for download such as Spring Framework 2.5.6.SEC01 which is the current production release. All you have to do is navigate to http://www.springsource.org/download, chose and download the Spring Framework release that you want to work with.

Since our posts on Exploring Spring Framework will be based on Spring Framework 2.5 production release, we will see the download and instruction steps for this release. Steps should be the same no matter what release you chose.

 

Download Instructions:

1. Navigate to http://www.springsource.org/download site, here you can download the Spring Framework release from the Spring Downloads section:

 

spring download home

 

2. Once clicking on the download link, you will be presented with community / enterprise download of Spring Framework. Chose the community download option: Read more…

Spring Framework Introduction

November 20, 2009 Leave a comment

 

Chapter 2: Introduction to Spring

 

Spring Framework:

The Spring framework is a comprehensive layered Java/Java EE application platform. It was created to address the complexity of enterprise application development. The Spring Framework takes best practices and design patterns that have been proven over the years, codifies these patterns as first class objects that can be integrated into applications. Spring makes it possible to use plain-vanilla Java Beans (POJOs) to achieve things that were previously only possible with EJBs.

 

Spring includes:

  • An IOC lightweight container
  • AOP functionality
  • Abstraction layer for JDBC / transaction management                    
  • ORM integration layer
  • Web integration layer
  • A flexible MVC web application framework 

 

Spring is not only an application framework, it also serves as a platform for several open source projects that are based on the core Spring Framework project such as Spring IDE, Spring Security, Spring Web Flow, Spring Web Services, Spring Rich Client,  Spring Batch, Spring Modules, Spring Dynamic Modules, Spring Integration, Spring LDAP, Spring JavaConfig, Spring .NET, Spring BeanDoc.

 

Spring’s features:

Framework:

Spring makes it possible to develop and maintain complex applications using simple components. In Spring, application objects are configured declaratively typically in an XML file. Spring also provides much infrastructure functionality (transaction management, integration, etc.), leaving only the development of application logic to you.

 

Lightweight:

Spring is lightweight in terms of both size and overhead. Spring Framework can be distributed in a single JAR file that weighs just over 2.5 MB and the processing overhead required by Spring is negligible. Spring is non intrusive in a way that the objects in a Spring-enabled application often have no dependencies on Spring-specific classes.

 

Container:

Spring provides a container which contains and manages the lifecycle and configuration of application objects. In Spring, you can declare how each of application objects should be created, how they should be configured, and how they should be associated with each other.

 

Dependency Injection:

Spring promotes loose coupling through dependency injection (DI). When DI is applied, objects are passively given their dependencies instead of looking for dependencies themselves. You can think of DI as JNDI in reverse — instead of an object looking up for dependencies from a container, the container gives the dependencies to the object at its instantiation without waiting to be asked.

 

Aspect-oriented:

Spring comes with rich support for aspect-oriented programming (AOP) that enables separating application business logic from system services (such as auditing, transaction management, logging etc). Application objects do what they’re supposed to do i.e., perform business logic — and nothing more. They are not responsible for or even be aware of other system concerns, such as logging or transactional support.

 

Spring Framework Architecture: Read more…