Grails in Action
Peter Ledbrook, Glen Smith
- 576 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Grails in Action
Peter Ledbrook, Glen Smith
About This Book
Summary Grails in Action, Second Edition is a comprehensive introduction to Grails 2 focused on making you super-productive fast. In this totally revised new edition, you'll master Grails 2.3 core skills as you apply TDD techniques to developing a full-scale Twitter clone. Along the way you'll learn the latest single-page web app UI techniques, work with NoSQL backends, integrate with enterprise messaging, and implement a complete RESTful API for your services. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology It may be time for you to stop reconfiguring, rewriting, and recompiling your Java web apps. Grails, a Groovy-powered web framework, hides all that busy work so you can concentrate on what your applications do, not how they're built. In addition to its famously intuitive dev environment and seamless integration with Spring and Hibernate, the new Grails 2.3 adds improved REST support, better protection against attacks from the web, and better dependency resolution. About the Book Grails in Action, Second Edition is a comprehensive introduction to Grails 2. In this totally revised edition you'll master Grails as you apply TDD techniques to a full-scale example (a Twitter clone). Along the way you'll learn single-page web app techniques, work with NoSQL back ends, integrate with enterprise messaging, implement a RESTful API... and more.No Java or Groovy knowledge is required. Some web development and OOP experience is helpful. What's Inside
- Covers Grails 2.3 from the ground up
- Agile delivery and testing using Spock
- How to use and manage plugins
- Tips and tricks from the trenches
About the Authors There's no substitute for experience: Glen Smith and Peter Ledbrook have been fixtures in the Grails community, contributing code, blogging, and speaking at conferences worldwide, since Grails 0.2. Table of Contents
PART 1 INTRODUCING GRAILS
- Grails in a hurry
- The Groovy essentials
- PART 2 CORE GRAILS
- Modeling the domain 63
- Creating the initial UI
- Retrieving the data you need
- Controlling application flow
- Services and data binding
- Developing tasty forms, views, and layouts
- PART 3 EVERYDAY GRAILS
- Building reliable applications
- Using plugins: just add water
- Protecting your application
- Exposing your app to other programs
- Single-page web applications (and other UI stuff)
- Understanding Spring and transactions
- PART 4 ADVANCED GRAILS
- Understanding events, messaging, and scheduling
- NoSQL and Grails
- Beyond compile, test, run
- Grails in the cloud
- BONUS ONLINE CHAPTERS
- Advanced GORM kung fu
- Developing plugins
Frequently asked questions
Information
Part 1. Introducing Grails
Chapter 1. Grails in a hurry . . .
- What is Grails?
- Core Grails philosophy
- Grails installation
- Key components of a Grails application
- Your first Grails applicationâdeveloping and deploying it
1.1. Introducing Grails
1.1.1. Why Grails changed the game
1.1.2. Seven big ideas
Figure 1.1. The Grails ecosystem is a powerful confluence of people, ideas, and technology.
Big idea #1: convention over configuration
- Add a controller class called ShopController with an action called order, and Grails will expose it as a URL of /yourapp/shop/order.
- Place your view files in a directory called /views/shop/order, and Grails will link everything for you without a single line of configuration.
- Create a new domain class called Customer, and Grails will automatically create a table called customer in your database.
- Add fields to your Customer object, and Grails will automatically create the necessary fields in your customer table on the fly (including the right data types based...