Spring: the foundation for Grails

Engineering | Peter Ledbrook | June 08, 2010 | ...

In the SpringSource training course for Groovy & Grails, we highlight that Grails stands on the shoulders of giants. One of those giants is Spring. Without it, Grails simply wouldn't have been developed as quickly as it was. It probably wouldn't have the flexibility to integrate easily with enterprise Java systems either. Just look at the number of plugins available: many are based on Java libraries with Spring support.

In this post, I want to start by looking at how Grails uses Spring and then cover the various ways in which you can access that raw power and flexibility.

A child of Spring

You may not be aware of this, but when you create a Grails application you are also creating a Spring MVC one. Under the hood, Grails creates a variant of Spring MVC's DispatcherServlet and configures a bunch of beans to do the heavy lifting. Of course, this means that there is a Spring context underpinning your application - one that you have access to as you'll see later.

Here are some…

Using SpringSource Tool Suite 2.3.3.M1 with Roo and GWT

Engineering | Christian Dupuis | June 02, 2010 | ...

By now, most of you probably have heard about the announcements at Google I/O around Spring, Roo, STS and GWT. Ben and Rod covered this in their respective blog posts recently. If you missed the keynote I strongly recommend to watch the recording on YouTube to catch up (the relevant section starts at 1:09:00 into the recording).

Today I'd like to provide some detailed steps and instructions on how you can use Roo and STS to create your first GWT application.

Installation

Before we can fire up the Roo shell and start typing commands, we need to download and install all pre-requisites. Although a lot of…

What's a plugin-oriented architecture?

Engineering | Peter Ledbrook | June 01, 2010 | ...

Grails is a fantastic framework for developing web applications quickly and easily. You also have access to a plethora of plugins that provide features or make integration with other systems nice and easy. That's all good, but in this article I want to talk about what happens when your application grows and you start drowning in a sea of controllers, domain classes, and other files.

Separation of concerns

One of the most useful patterns in software architecture is called separation of concerns. The idea is that you group everything related to a particular feature or concern into a single, self-contained unit. The code in that unit should not take on any other responsibility. For example, the business logic of a web service should be in one class while the handling of SOAP messages should be in another: the business logic and SOAP handling are two different concerns.

The real beauty of this pattern is that you can aggregate these units into coarser-grained concerns, so you end up using the pattern at multiple levels. For example, say that the web service mentioned above…

SpringSource dm Server 2.0.2 is released today.

Engineering | Christopher Frost | May 27, 2010 | ...

The release fixes a few bugs, release notes available from JIRA. This release can be downloaded from the project page on SpringSource.org.

  • The kernel startup hard timeout limit has been increased to allow dm Server to run on slower machines.
  • Documented a restriction in the OSGi web container, Tomcat <context> elements are not supported.
  • Fix to the ServiceScoper class to close all input streams.
  • Added support to tolerate File.list returning null occasionally, this manifested as the pickup directory wiping itself occasionally for seemingly no reason.
  • Usage of @Configurable with ServerOsgiBundleXmlWebApplicationContext now works.

The project is being donated to the Eclipse Foundation as Virgo. We aim to ship a baseline release of Virgo in due course which will be functionally equivalent to dm Server 2.0. See the Virgo website for further information. Along with dm Server SpringSource will offer commercial support for Virgo.

Spring Insight 1.0.0.M3 Released

Engineering | Jon Travis | May 26, 2010 | ...

The Spring Insight team is proud to announce the release of Spring Insight 1.0.0.M3.  This release contains a ton of new enhancements to give you more productivity and get your application to production even faster.  Spring Insight is available as part of tc Server Developer Edition and SpringSource Tool Suite but you can snag the new developer release at http://springsource.org/insight.  Setup time will take you the usual 10 seconds.

Spring Insight 1.0.0.M3 Screencast

Speed Tracer

The most-publicized new feature is our integration with Google Speed Tracer, which was announced at last week's Google IO conference.  This innovative combination gives developers a full view into all the work performed in a web request --  from CSS styling and view rendering to JDBC queries and JSP render times.  It was a real thrill to work with Google's engineers to come up with some cutting-edge use of this technology.  You'll love this feature!  It's a seamless integration that's trivial to work with and gives you a great deal of visibility you've never had before.

Simpler UI

We've also added a lot of information to the application: throughput and error rate metrics, health zones, deeper visibility into Spring controllers, deeper JDBC support, application health and more.  This new information should not be overwhelming, however, because we have also invested a lot of time in simplicity, making our UI obvious and easy to navigate.

Development Kit

Finally, we published our Insight Development Kit (IDK).  We've heard from many users that they want the ability to customize their application in Insight or want to add additional metrics.  Insight now provides this capability with its @InsightOperation and @InsightEndPoint annotations as well as the IDK and tutorials for creating deeper plugins.  The IDK includes the source for all the plugins that come with Insight (Apache 2.0 licensed) as well as the IDK APIs -- great examples and instructions for writing your own application.

The Spring Insight team is cranking on the next release, our train is cruising down the track, and we can't wait to hear your feedback and suggestions.  Go grab the release off http://springsource.org/insight and leave us a comment in the community forums

Spring Python 1.1 book is published

Engineering | Greg L. Turnquist | May 24, 2010 | ...

The Spring Python 1.1 book is published! Spring Python takes the concepts of the Spring Framework and Spring Security, and applies them to the world of Python.

In this book, you will be writing code using dependency injection, aspect oriented programming, data access, transaction management, remoting and security. Later on in the first case study, you will be building a banking web app and see how using all these components in concert quickly meets your needs. In the second case study you will integrate Python and Java together as you build a flight reservation system.

The book is full of code…

More Grails 1.3 features

Engineering | Peter Ledbrook | May 24, 2010 | ...

Last week, I described how Grails now treats plugins like normal dependencies that can be pulled from Maven-compatible repositories. Although this was the big new feature for 1.3, it wasn't the only one. In this post, I'll look at some of the others, starting with a feature that I only recently found out about.

Named queries

GORM provides three distinct ways of performing database queries:
  • dynamic finders, e.g. Book.findByTitleAndAuthorLike(...);
  • criteria queries, which use a nice DSL; and
  • HQL, Hibernate's SQL-like query language.
These three features provide a potent mix of ease-of-use and power, providing you with the flexibility you need. And yet there's something missing.

Develop a non-trivial Grails application and you will soon realise that you often use the same queries again and again. What should you do? The copy-and-paste technique is simple but leaves you with major maintenance issues. You could write service methods for each of your common…

Spring Roo 1.1.0.M1 Released

Engineering | Ben Alex | May 19, 2010 | ...

I'm delighted to announce that we've just released Spring Roo 1.1.0.M1. Spring Roo is the fastest way for Java developers to build Spring-based applications in the Java programming language. With the Roo 1.1.0.M1 you can build working web applications - complete with a Google Web Toolkit (GWT) front end - in as little as 200 keystrokes! Plus as usual we've concurrently released a new version of SpringSource Tool Suite (STS 2.3.3.M1) which is optimised for the latest and greatest Roo goodies!

There are over 200 fixes, enhancements and new features since our 1.0.2 release three months ago. Some…

Springing Ahead Toward The Open PaaS

Engineering | Rod Johnson | May 19, 2010 | ...

A few weeks ago I tweeted that—incredibly—SpringSource was executing faster within VMware than as a startup. Today we announce another exciting development bearing this out.

Following our VMforce partnership with SaaS leader salesforce.com, we are today announcing a collaboration between VMware and Google, centering around the Spring programming model and SpringSource IDE and RAD tooling. Today’s announcement makes Spring the preferred programming model for Google App Engine. This is a tremendous endorsement of Spring as the best and most portable programming model for Java and opens up a new deployment opportunity for Spring developers. The demo in today’s keynote at Google I/O showcased the results from months of collaboration between SpringSource and Google engineers—most of which benefits Spring developers, regardless of where they wish to…

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all