close

This week in Spring: April 26th, 2011


Another week, another great allotment of new content that - as usual - draws from the community and from SpringSource. The enthusiasm for CloudFoundry continues unabated this week, with some interesting content in this week’s roundup. For more content on CloudFoundry, you might consult the CloudFoundry.com and CloudFoundry.org sites. In particular, the slides from the Cloud user group held the day after the announcement are available here.


  1. Oliver Gierke has posted a blog on Advanced Spring Data JPA which explains how to use the features in the Spring Data JPA project that elevate the art of JPA programming, like the integration of the QueryDSL library. This post - and the library - speak to the ongoing, first-class support in the Spring frameworks for all data access technologies, be they RDBMS, NoSQL, or anything else.
  2. Peter Ledbrook, Grails Developer Advocate, has recently expanded on his original blog on using Grails and CloudFoundry. This blog provides a detailed look at using Grails' GORM support with the various data stores available on CloudFoundry. Check it out!
  3. Alex Popescu’s MyNoSQL portal, MyNoSQL, has some interesting comments about the NoSQL options supported in CloudFoundry. He comments that “From a storage perspective, Cloud Foundry is encouraging polyglot persistence right from the start offering access to a relational database (MySQL), a super-fast smart key-value store (Redis), and a popular document database (MongoDB).”


    This post - and indeed the entire site - is a very valuable resource for CloudFoundry users that want to exploit the NoSQL options, but don’t understand the use cases yet. There’s a lot of good content on both MongoDB and Redis, for example.

  4. Mark Thomas, Apache Tomcat 7 release manager and engineer, has written up a post on Apache Tomcat 7’s session fixation protection security feature on the TomcatExpert.com website. Keeping on top of the latest Tomcat security features is important if you are, like the majority of developers, using Tomcat (or hardened, ops-friendly derivatives like SpringSource’s tcServer) as a production server for your Java (and often Spring) applications. Additionally, Tomcat’s bundled with several application servers. Either way, knowing about Tomcat’s industry-leading features can only help.
  5. Costin Leau has announced the Spring GemFire 1.0.1 release, which incorporates bug fixes and promotes stability.
  6. <li>Just a reminder to our European community members, the S2G Forum Series will be held in <a href="http://www.springsource.com/events/s2gforum-5-26-2011-amsterdam">Amsterdam (May 26th)</a> and <a href="http://www.springsource.com/events/s2gforum-5-31-2011-london">London (May 31st)</a>. There will be tons of great sessions about Spring, Groovy and Grails as well as talks focused specifically on CloudFoundry, Tomcat and Gemfire so be sure to <a href="http://www.springsource.org/s2gforum2011">register for the event</a> closest to you. 
    </li>
    

  7. The Eclipse Virgo 2.1.1 and SpringSource dm Server 2.0.5 projects have just been released.
  8. Jon Brisbin has recently blogged about integrating RabbitMQ with Riak to build a highly scalable eventing model.
  9. Gordon Dickens is at it again! He’s written a blog post, Don’t Use the JmsTemplate in Spring! Once you get past the headline and read the post, I think you’ll agree it might be better titled “Don’t Use the JmsTemplate in Spring, Use Spring Integration!”


    It’s a great post and it captures the thought trail that leads people to Spring Integration: they like the simplicity and power of Spring’s JmsTemplate, but want to enjoy the same programming paradigm in other challenges.
  10. What’s in My Spring Context? Gordon Dickens writes what amounts to a conversation between him and the Spring ApplicationContext - the keeper of all beans. The Spring ApplicationContext is very powerful, and can be interrogated to understand the structure and shape of your object graph. Great post, with easy-to-use code!
  11. ThoughtWorks employee Mark Needham has written HTML encoding/escaping with StringTemplate and Spring MVC, which provides a recipe to write a custom view resolver in Spring MVC. Spring MVC’s strikes the nearly perfect balance between convenience and power in this case. Spring MVC, of course, has several good, pre-provided options for view resolution, but is flexible enough to support new ones.

  12. David Salter has written a post introducing deployment of a database-centric application to CloudFoundry. His example includes deployment tips and information on how to use Spring 3.1 profiles to let the application use the correct, environment-specific DataSource. Nice article!
  13. David Salter has written a follow up blog on migrating older Spring MVC Controller-hierarchy based applications to the annotation-centric model introduced in Spring MVC 2.5, four years ago. In this blog, he talks about converting form-processing controllers, of type FormController. Check it out! A fascinating read and it’s nice to see how much configuration and Java code just falls away in the new programming paradigm!
  14. Nicolas Frankel has written about his experiences using the CloudFoundry public cloud and project. He writes in terms of a developer that has used the Google App Engine, so it’s a particularly compelling story with lots of details.
Read more

Advanced Spring Data JPA - Specifications and Querydsl

In my last blog post I introduced the basic feature set of Spring Data JPA. In this post I’d like to dive into some more features and how they can help you simplify data access layer implementation even further. The Spring Data repository abstraction consists of an interface based programming model, some factory classes and a Spring namespace to easily configure the infrastructure. A typical repository interface looks something like this:

public interface CustomerRepository extends JpaRepository<Customer, Long> {

  Customer findByEmailAddress(String emailAddress);

  List<Customer> findByLastname(String lastname, Sort sort);

  Page<Customer> findByFirstname(String firstname, Pageable pageable);
}
Read more

Eventing Data with RabbitMQ and Riak

As new applications take advantage of the scalability benefits of message brokers like RabbitMQ and cloud-scale datastores like Riak, it’s inevitable that the two should become fast friends (the kind who actually talk to each other in person rather than the kind whose only contact is through Facebook).

So many of the applications we find ourselves writing these days have these two functions in the same application. Very often we want to update data as the result of a message or send a message as the result of updated data. Two new utilities facilitating RabbitMQ and Riak integration allow you to do either directly inside their respective servers.

Read more

Deeper into Grails & Cloud Foundry

In my previous post, I showed you how easy it is to deploy a Grails application to Cloud Foundry using the corresponding plugin. Hopefully that whetted your appetite and you are ready to look at a more complex Grails application that demonstrates the power of the GORM plugins and stretches the Cloud Foundry services. If you don’t have a Cloud Foundry account yet, please be patient. The response to the announcement has been phenomenal so it is going to take some time to work through the backlog of requests.

Read more

This week in Spring: April 19th, 2011

Welcome back to This Week in Spring. The enthusiasm for last week's Cloud Foundry announcement was outstanding and appears to be getting stronger! People all over the world have flooded the SpringSource and CloudFoundry forums, downloads pages and source repositories. What unprecedented activity!

Many of the different, powerful technologies coming out of SpringSource recently have been leading up to the Cloud Foundry release so I invite you to review some of the exciting stuff that's come out in the last few months that have become even more interesting in terms of the cloud and Cloud Foundry: Spring Gemfire, Spring AMQP, Spring 3.1 profiles, Spring 3.1 caching abstraction, Spring Data, Spring Integration support for NoSQL, and Spring Hadoop, vFabric Hyperic, vFabric RabbitMQ, and vFabric GemFire. Of course, for all of these technologies - the first, and best, tooling and development experience continues to be SpringSource Tool Suite and Spring Roo.

Read more

Spring Data Graph 1.0 with Neo4j support released today

This announcement post is a guest contribution by the developers of the Neo4j team that worked closely with SpringSource’s Spring Data team to provide the Spring Data Graph integration library.

Spring Data Graph Logo

For a friendly introduction to Spring Data Graph we’re hosting a free webinar with VMware presented by Neo Technology’s CEO Emil Eifrem on April 20 at two convenient times for the Americas and Europe. [Update: The webinar video is now available on youtube in the SpringSourceDev channel.]

Now that Spring is in the air, the Neo4j and Spring Data teams are happy that almost a year’s worth of work has produced our 1.0 version of the Spring Data Graph library. The Spring Data project aims to bring the convenient programming model of the Spring Framework to NOSQL databases. Spring Data Graph supports graph databases within Spring Data and includes support for Neo4j as its first supported implementation.

Read more

Using Cloud Foundry from STS

By now you probably heard about Cloud Foundry, the open PaaS from VMware that was announced yesterday; if not make sure to check out the recording of the webcast. Eventually you have already read earlier blog posts introducing the Spring support for Cloud Foundry, the add-on for Spring Roo and the Grails plug-in.

With this post I’d like to introduce the Eclipse-based support for Cloud Foundry that lets you manage your cloud deployments, including configuration of Services and service bindings, application scaling, access to file resources and much more.

Read more

One-step deployment with Grails and Cloud Foundry

A couple of years back, the co-founder of a startup spoke at the London Groovy and Grails User Group. I remember vividly how he said he dreamed of deploying a Grails application with “just one click”. With the announcement of the new Cloud Foundry service, his dream is nearly a reality for all Grails users. Now you not only get simple and rapid development with Grails, but also simple and rapid deployment to a cloud hosting provider.

So how do Grails and Cloud Foundry work together? As long time Grails users would expect, we have a plugin for that! To demonstrate how it works I’m going to walk you through deploying a sample application, Pet Clinic, to Cloud Foundry. It’s a simple application and you can see it in action on Cloud Foundry already.

Read more

Roo + Cloud Foundry = Productivity in the Cloud

Today marks an important day for developers, with the public beta release of Cloud Foundry, VMware’s open source Platform as a Service offering. Rod Johnson’s blog contains a lot of background details about this exciting announcement, and Mark Fisher’s post offers a first look at the service and how easily applications can move between a local environment and the cloud. As both Rod and Mark highlight today’s announcement is about enhancing and ensuring developer productivity.

In support of this new service and platform we are pleased to announce that we have integrated Cloud Foundry support into Spring Roo - Spring’s rapid application development tool for Java developers. Now you can take Roo’s productivity to the cloud and you don’t even have to leave the shell! There are dozens of commands to make it easy to work with Cloud Foundry, and of course you can build a new application and deploy it to Cloud Foundry in just a few minutes. Once you’ve logged in, it’s as simple as using the new “cloud foundry deploy” command and you’re done.

Read more

Cloud Foundry for Spring Developers

By now, many of you have probably seen the Cloud Foundry webinar and Rod’s blog from earlier today. I’d like to provide a quick follow-up that features a “hello-spring” sample application deployed in the cloud. Thanks to Cloud Foundry, there’s practically no learning curve at all.

Before we get started, let’s consider three goals that have driven Spring from day one:


  1. focus on simplicity and productivity to make developers lives easier

  2. support innovative technologies in a consistent way

  3. ensure portability of applications across deployment environments

Read more