"Mastering Grails hasn't yet covered TDD because the series has concentrated until now on ways to take advantage of core Grails functionality. There's a modest bit of value in testing infrastructure code (that is, code that you didn't write), but in practice I rarely do it. I trust Grails to render my POGOs to XML correctly, or save my Trip to the database when I call trip.save(). The real value proposition of testing comes into play when you are validating your own custom code. If you write a complex algorithm, you should also have one or more complementary unit tests to prove that the algorithm does what it says it does. In this article, you'll see how Grails enables and encourages you to test your application."
"This article shows the power of Grails through the practical example of building a blog application. It does not cover Groovy in any depth, rather, it providing explanations only of the particular Groovy syntax that is used in the example. Simply put, Groovy can make calls to Java classes directly, so if you put your Groovy code in the right place, Grails does the rest."
"Getting Out There with RSS The blog from Build Your First Grails Project allows users to create posts and leave comments on posts. Now it needs an RSS feed to tell people about updates to the blog. Groovy provides an extremely simple mechanism called builders for constructing node-based structures, such as XML. A Groovy builder is a class that intercepts closure calls on it and builds up a node tree internally that represents the calls that have been made on it."
"When it comes to RESTful Web services, it's as important to understand the why as much as the how. Roy Fielding's doctoral dissertation (see Resources) ? the source of the REST acronym ? outlines two approaches to Web services: one that's service-oriented and another that's resource-oriented. Before I show you the code to implement your own RESTful resource-oriented architecture (ROA), I'll clarify the differences between these two design philosophies, and I'll discuss the two competing definitions of REST in popular usage. As your reward for taking in all the talk in the first part of this article, you'll find plenty of Grails code later on."
"To inaugurate the Mastering Grails series, this article introduces you to the Grails framework, shows you how to install it, and walks you through building your first Grails application: a trip planner that you'll continue working on in subsequent installments in this series."
"The Grails Object Relational Mapping (GORM) API is one of the centerpieces of the Grails Web framework. In "GORM: Funny name, serious technology," you were introduced to the basics of GORM, including simple one-to-many relationships. Later, in "Many-to-many relationships with a dollop of Ajax," you used GORM to model increasingly sophisticated class relationships. Now you'll see how the "ORM" in GORM has the flexibility to deal with table and column names in your legacy databases that don't follow standard GORM naming conventions."
"If you've been following along in the Mastering Grails series, you're ready to start making the now-familiar trip planner application mobile-phone friendly. Create a file named testwml.gsp in the trip planner application's web-app directory and type the code in Listing 1, which is some static WML:"
"Building a Web site is a study in event-driven, reactive development. Your application sits idle, anxiously waiting for the user to send in a request. It passes back the response and then goes back to sleep until the next call. In addition to the traditional Web life cycle of HTTP requests and responses, Grails provides a number of custom touch points where you can tap into the event model and provide behavior of your own."
"By this point in the Mastering Grails series, you should have a fairly good idea how domain classes, controllers, and Groovy Server Pages (GSPs) all work together in a coordinated manner. They facilitate basic Create/Retrieve/Update/Delete (CRUD) operations on a single datatype. This geocoding service seems to go a bit beyond the scope of simple Grails Object Relational Mapping (GORM) transformations from relational database records to POGOs (plain old Groovy objects). Also, the service will most likely be used by more than one method. Both save and update will need to geocode the IATA code, as you'll see in just a moment. Grails gives you a place to store commonly used methods that transcend any single domain class: services."
"Welcome to the second year of Mastering Grails. As I promised in the last article of 2008, with the new year comes a new application. Goodbye Trip Planner, hello blog publishing system."
"This month, I'll round out the MVC triptych with a discussion of Grails views. Views (as you might guess) are stored in the grails-app/views directory. But there's much more to the view story than the intuitively obvious directory name. I'll talk about Groovy Server Pages (GSP) and give you pointers to many alternative view options. You'll learn about the standard Grails tag libraries (TagLibs) and find out how easy it is to create your own TagLib. You'll see how to fight the ongoing battle for DRYness (see Resources) by factoring common fragments of GSP code into their own partial templates. Finally, you'll learn how to tweak the default templates for scaffolded views, thereby balancing the convenience of automatically created views with the desire to move beyond a Grails application's default look-and-feel."
"I'm often asked if I think that Grails is enterprise-ready. The short answer is yes. But the long answer I typically give is: "Only if you feel that Spring and Hibernate (the underlying technologies that Grails is based on) are ready. Only if you feel that Tomcat or JBoss (or the Java Enterprise Edition (Java EE) application server you are using) is ready. Only if you feel that MySQL or PostgreSQL (or the database that you are using) is ready. Only if you feel that Java programming is enterprise-ready.""