An Introduction To Building Groovy Web Applications With Grails - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

An Introduction To Building Groovy Web Applications With Grails

Description:

... those apps in the sweet-spot. Fun, Fun, Fun. What ... Famous people love Grails. This presentation includes a number of quotes from your favorite well knowns ... – PowerPoint PPT presentation

Number of Views:451
Avg rating:3.0/5.0
Slides: 19
Provided by: jeff254
Category:

less

Transcript and Presenter's Notes

Title: An Introduction To Building Groovy Web Applications With Grails


1
  • An Introduction To Building Groovy Web
    Applications With Grails

Jeff Brown brown_j_at_ociweb.com Principal
Software Engineer Object Computing
Inc. http//www.ociweb.com/
2
Groovy Party Tricks
  • Groovy-isms for the unenlightened
  • Everything is an object
  • GStrings
  • Named parameter lists
  • We dont need no stinking setters and getters
  • Markup the easy way

A 3 minute crash course with demos on some of the
features in Groovy that Java developers will find
fun and interesting
3
What Is Grails?
  • Full stack MVC framework for web apps
  • Exploits the awesome power of Groovy
  • Leverages proven staples
  • Hibernate
  • Spring
  • Sitemesh
  • Excellent for those apps in the sweet-spot
  • Fun, Fun, Fun

4
What About The Celebrities?
  • Famous people love Grails
  • This presentation includes a number of quotes
    from your favorite well knowns
  • Dont dig it just because they do
  • Just dig it!

5
A True Visionary
  • coding by convention

Imagine no config files. Its easy if you
try. No action mappings. Man, that Grails is
going to be fly.
In a rare moment of clarity, Yoko convinced John
to remove this verse from Imagine since Grails
hadnt been invented yet.
6
Wet Your Grails Whistle
  • Lets take a lightning fast first look

From Nothing To CRUD In 2 Minutes
7
Is That All There Is To It?
Holy productivity Bat Man! What are we going to
do with all the free time?
  • Is that all I can do?
  • I need to build real applications!

8
Grails Commands
  • Ant is doing some heavy lifting
  • generate-controller
  • generate-views
  • generate-all
  • run-app
  • war
  • create-app
  • create-controller
  • create-service
  • create-domain-class
  • create-job

9
Scaffolding
  • Dynamic
  • It is all just magic
  • Generated
  • Generated code may be a good starting point

10
Domain Classes
  • The M
  • Stick to the POGO
  • Let the controller do the controlling
  • Let the view do the viewing
  • May define validation constraints

11
Controllers
  • The C
  • Traffic cop
  • Defining actions
  • Navigating to the view

12
Views
  • The V
  • Groovy Server Pages (GSP)
  • Custom Tag Libraries
  • Sitemesh

13
Tag Libraries
  • Provided tags
  • Logical, Iterative, Ajax, Form, etc
  • Custom tags
  • No config files
  • Leave those TLDs behind
  • It is all Groovy

14
Should I Miss My TLD Files?
I pity the fool who has to maintain all of those
TLD files.
15
Hey Dude, Where Is My Data?
  • DataSource.groovy
  • DevelopmentDataSource.groovy
  • ProductionDataSource.groovy
  • TestDataSource.groovy
  • HSQL DB
  • In memory db is great for evolving schema during
    development
  • ApplicationBootStrap.groovy

16
GORM
  • Groovy Object Relational Mapping
  • Hibernate under the covers
  • JPA support slated for 0.4
  • No need to manage mapping files
  • You still can if the need arises
  • Can map Java classes

17
Dynamic Domain Class Methods
  • findBy
  • Person.findByLastName(Brown)
  • Person.findByLastNameAndFirstName(Brown,
    Jeff)
  • findWhere
  • Person.findWhere(lastNameBrown,
    firstNameJeff)
  • Etc

18
The End
Thank you, thank you very much.
Write a Comment
User Comments (0)
About PowerShow.com