Grails In The Wild
by Matthew Taylor on Oct 23, 2009
- 3,874 views
After developing Grails applications full-time for over a year, I've learned some useful tips, tricks, and common patterns. In this presentation, I'll share with you real world examples of how I've ...
After developing Grails applications full-time for over a year, I've learned some useful tips, tricks, and common patterns. In this presentation, I'll share with you real world examples of how I've used
Grails "In the Wild".
It includes details of how to do useful things with the basic tools of Grails, some advanced tricks and patterns, and helpful general rules of thumb to use during Grails development.
Accessibility
Categories
Upload Details
Uploaded via SlideShare as Apple Keynote
Usage Rights
© All Rights Reserved
Statistics
- Likes
- 6
- Downloads
- 104
- Comments
- 0
- Embed Views
- Views on SlideShare
- 3,505
- Total Views
- 3,874
You might also have different date formats used with JavaScript libraries, so you may need to have different format strings for those.
This could be helpful if you are expecting a certain date format from an input field on the client in order to parse it into a Date object.
You can include as many external config files like this from any location within your grails application into your Config.groovy rather easily. Having multiple files helps to keep things partitioned and keeps the main config uncluttered.
This is an excellent place for including something like a StringUtils class and mixing it into the String class.
By “progressive enhancement” I mean that as you add features to your application such as authentication, you’ll want to spend some time setting up bootstrap with roles and users. When you add new components like rules, settings, etc. you’ll also want to update it.
We’ll talk later about some ways to modify your domain classes as well. But can do metaprogramming to your domain classes or even your controllers and services in bootstrap as well.
And like I mentioned on the previous slide, you can mixin utility classes
I’m going to assume you have a basic knowledge of how to use templates, but the gist of it is that you can take a chunk out of any GSP you have, save it partially with a _ in front of it, and call the template while sending in a model for it to use. In this way we can render these templates not only from several different GSPs and domains, but from controllers as responses to HTTP requests.
So there is one template at work here be rendered several times. In the list page, we are rendering it on mouse click from the controller, and when we navigate to the show page, we render it again as a part of the entire page.
So how do we do this?
So there is one template at work here be rendered several times. In the list page, we are rendering it on mouse click from the controller, and when we navigate to the show page, we render it again as a part of the entire page.
So how do we do this?
So there is one template at work here be rendered several times. In the list page, we are rendering it on mouse click from the controller, and when we navigate to the show page, we render it again as a part of the entire page.
So how do we do this?
So there is one template at work here be rendered several times. In the list page, we are rendering it on mouse click from the controller, and when we navigate to the show page, we render it again as a part of the entire page.
So how do we do this?
So there is one template at work here be rendered several times. In the list page, we are rendering it on mouse click from the controller, and when we navigate to the show page, we render it again as a part of the entire page.
So how do we do this?
So there is one template at work here be rendered several times. In the list page, we are rendering it on mouse click from the controller, and when we navigate to the show page, we render it again as a part of the entire page.
So how do we do this?
So there is one template at work here be rendered several times. In the list page, we are rendering it on mouse click from the controller, and when we navigate to the show page, we render it again as a part of the entire page.
So how do we do this?
So there is one template at work here be rendered several times. In the list page, we are rendering it on mouse click from the controller, and when we navigate to the show page, we render it again as a part of the entire page.
So how do we do this?
So there is one template at work here be rendered several times. In the list page, we are rendering it on mouse click from the controller, and when we navigate to the show page, we render it again as a part of the entire page.
So how do we do this?
So there is one template at work here be rendered several times. In the list page, we are rendering it on mouse click from the controller, and when we navigate to the show page, we render it again as a part of the entire page.
So how do we do this?