Peter Ledbrook

Alumni
Blog posts by Peter Ledbrook

Countdown to Grails 2.0: User experience

Engineering | December 14, 2011 | ...

Welcome to this final Countdown to Grails 2.0 post: the final release is imminent! I'm not really going to say much here because some of the most interesting new features of Grails 2.0 are much better seen. For that reason, I've created a screencast so you can see exactly what awaits you when you install Grails 2.0 for the first time:

http://www.youtube.com/watch?v=KJMR0gB6NHk

The key aspects are:

  • a whole new interactive console;
  • better automatic class reloading, including support for domain classes and Java files;
  • enhanced error reporting;
  • new HTML 5 scaffolding; and
  • new test reports.

As shown in the screencast, the new interactive console comes with: auto-completion on commands; execution of external applications using "bang" (!) commands; a command history buffer; and easy access to test and dependency reports. This is backed up by a much improved reloading mechanism for Grails classes. You don't need to restart run-app

Countdown to Grails 2.0: Persistence

Engineering | December 05, 2011 | ...

It's been a while since the last Countdown blog post, but the release of 2.0.0.RC3 gives me a good reason to write another. In the last post, I focused on database migration and how we are standardising on the new Database Migration Plugin. I'll be continuing on the theme of persistence here and introducing several great new features, particularly around querying.

Miscellaneous

Let's start with some of the minor improvements. First, abstract domain classes are now treated as most people would expect: an abstract base domain class results in a table for it and its subclasses. For example, consider the…

RabbitMQ: Enabling Grails full text search on Cloud Foundry

Engineering | August 29, 2011 | ...

In my second blog about Grails and Cloud Foundry I introduced a variant of the Grails Twitter example that could be hosted on CloudFoundry.com At the time I mentioned that full text search using the Searchable plugin would limit you to a single application instance because the search indices would be unique to each instance. In other words, you might very easily get different search results depending on which application instance your browser is routed to.

I also said that one option for fixing this problem would be to synchronise the search indices across the instances. But that doesn't sound…

Using Micro Cloud Foundry from Grails

Engineering | August 24, 2011 | ...

Back in April, VMware introduced Cloud Foundry to the world and with it came super-simple application deployment for Grails developers. Fast forward several months and now another piece of the jigsaw is in place: Micro Cloud Foundry. You can now have your own Cloud Foundry instance for testing or any other use case. And of course, it's incredibly easy to use from Grails.

So what is Micro Cloud Foundry? The following screencast gives you a brief overview of the product and then takes you through the process of downloading, installing and configuring it. At the end, you get to see how you can…

Countdown to Grails 2.0: Database Migrations

Engineering | August 17, 2011 | ...

One of the many nice features of Grails is the way it will automatically create your database schema for you from your domain model. Admittedly it's a feature of Hibernate that Grails uses, but still, it helps you get started very quickly with database-driven web applications without having to worry about the database schema.

What happens once your application moves to production? During development, losing the data in between server runs isn't a big issue. But you can't just drop the database in production. So that rules out the "create" and "create-drop" values for the dbCreate data source…

Countdown to Grails 2.0: Static resources

Engineering | June 30, 2011 | ...

Web applications typically rely heavily on what we call static resources, such as Javascript, CSS and image files. In a Grails application, they are put into a project's web-app directory and then referenced from the HTML. For example,

<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">

will create a link to the file web-app/css/main.css. All very straightforward. You might even think that the current support is more than sufficient for anyone's needs. What else would you want to do?

That's a good point. The answer depends on the complexity of your application, but let's start with the example CSS link above. Why do we have to type out the <link rel="..." href=...>? Just by looking at the extension, we know that the resource is a CSS file. We also know that CSS files should be linked into an HTML page using the…

Countdown to Grails 2.0: Unit testing

Engineering | June 07, 2011 | ...

The first milestone of Grails 1.4 (now 2.0) has now been released and we are on the last stages of the journey towards 1.4 2.0 final. As we approach that point, I will be writing a series of blog posts that cover the various new features and changes that the 1.4 2.0 version brings. I'll be starting with the new testing support.

Since the beginning, Grails has provided three levels of testing support for developers: unit, integration, and functional. Unit tests had and still have the benefit of running independently of Grails, but they typically required a fair bit of extra work in the form of…

Deeper into Grails & Cloud Foundry

Engineering | April 21, 2011 | ...

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.

GrailsTwitter

Simple Twitter clones have become almost the standard for sample Grails applications, so it's no surprise that another version has been developed for Cloud Foundry. You can find the code on GitHub along with the other Cloud Foundry samples and you can also test out an instance of the application

One-step deployment with Grails and Cloud Foundry

Engineering | April 12, 2011 | ...

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

The future of functional web testing?

Engineering | August 28, 2010 | ...

The Groovy community is a productive bunch, which means there are a plethora of frameworks, libraries, and tools to make your life easier. The area of testing seems to be particularly fertile ground and I've recently been looking into a couple of tools that, when combined, promise a step change in your productivity when writing functional web tests.

Although my usual focus is Grails, you don't have to use Grails to reap the benefits of these tools: they will work with any web application and will integrate well with any Java-based project/build. As it happens they both have associated plugins…

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