• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Grails 101
 

Grails 101

on

  • 2,063 views

Grails Introduction Slides

Grails Introduction Slides

Statistics

Views

Total Views
2,063
Views on SlideShare
677
Embed Views
1,386

Actions

Likes
1
Downloads
27
Comments
0

39 Embeds 1,386

http://limcheekin.blogspot.com 734
http://limcheekin.blogspot.in 118
http://limcheekin.blogspot.de 72
http://limcheekin.blogspot.com.es 39
http://limcheekin.blogspot.fr 38
http://limcheekin.blogspot.com.br 27
http://limcheekin.blogspot.co.uk 27
http://limcheekin.blogspot.it 27
http://limcheekin.blogspot.nl 24
http://limcheekin.blogspot.se 21
http://limcheekin.blogspot.ch 21
http://limcheekin.blogspot.kr 20
http://limcheekin.blogspot.ca 19
http://limcheekin.blogspot.sg 19
http://limcheekin.blogspot.com.au 17
http://limcheekin.blogspot.tw 17
http://limcheekin.blogspot.com.ar 15
http://feeds.feedburner.com 14
http://limcheekin.blogspot.fi 10
http://limcheekin.blogspot.co.at 10
http://limcheekin.blogspot.jp 10
http://limcheekin.blogspot.be 9
http://limcheekin.blogspot.dk 9
http://limcheekin.blogspot.mx 9
http://limcheekin.blogspot.cz 8
http://limcheekin.blogspot.hk 8
http://limcheekin.blogspot.co.il 7
http://limcheekin.blogspot.ro 7
http://limcheekin.blogspot.ru 6
http://limcheekin.blogspot.ie 5
http://limcheekin.blogspot.hu 3
http://limcheekin.blogspot.sk 3
http://limcheekin.blogspot.no 3
http://limcheekin.blogspot.pt 3
http://limcheekin.blogspot.gr 3
http://loofie15.kassuri.com 1
http://limcheekin.blogspot.co.nz 1
http://translate.googleusercontent.com 1
http://limcheekin.blogspot.com.tr 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Grails 101 Grails 101 Presentation Transcript

    • Grails 101 Lim Chee Kin limcheekin@vobject.com http://limcheekin.blogspot.com
    • About Me● Moderator of the Malaysia Groovy and Grails User Group● Involved in Grails development since version 0.6 and developed 15 Grails plugins to date● 10+ years experience in software development and solution consulting for Java EE platform● Experience spans across various industries, including retail sector, telecommunication, heath care and financial services industry.● Experienced in many frameworks and web technologies, including Java EE, SpringFramework, Hibernate, Groovy, Grails Framework, Web Services, JQuery, JQuery UI
    • Why Grails●●● To practice agile development process you need an agile framework.
    • Inside Grails● Seamless integration of ...● Groovy ● Tomcat● Java ● Ant● SpringFramework ● Maven● Hibernate ● Log4J● Java EE ● H2 Database● Sitemesh ● Quartz● JQuery ● ... many more
    • Best Practices Support● Convention over Configuration standard directory structure● Dependency Injection SpringFramework● Model domain class View GSP Controller groovy class● Test Automation JUnit, Spock● Modularization plugin system● Code Generation scaffolding● Fast Development Cycle dynamic reloading
    • Running Grails App in 5 minutes● Step 1: grails create-app addressbook●● Step 2: grails create-domain-class Person●● Step 3: grails generate-all Person●● Step 4: grails run-app
    • Step 1: grails create-app addressbook● Created Grails Application at /opt/dev/ws/addressbook
    • Step 1: grails create-app addressbook /addressbook● application.properties● grails-app/conf/ --> location of configuration artifacts● grails-app/conf/hibernate --> optional hibernate config● grails-app/conf/spring --> optional spring config● grails-app/controllers/ --> location of controller artifacts● grails-app/domain/ --> location of domain classes● grails-app/i18n/ --> location of message bundles for i18n● grails-app/services/ --> location of services● grails-app/taglib/ --> location of tag libraries● grails-app/utils/ --> location of grails specific utility classes● grails-app/views/ --> location of views● grails-app/views/layouts --> location of layouts● lib/ --> jar files not available via installed plugins● scripts/ --> scripts● src/groovy --> optional; location for Groovy source files (of types other than those in grails-app/*)● src/java --> optional; location for Java source files● test/ --> test classes● web-app/ --> css, images, etc, etc, etc.
    • Step 2: grails create-domain-class Person● Created file grails-app/domain/addressbook/Person.groovy Created file test/unit/addressbook/PersonTests.groovy●● class Person {● String firstName● String lastName● Date dateOfBirth● Integer age●● static constraints = {● firstName(nullable:true, maxSize:60)● lastName(nullable:true, maxSize:30)● dateOfBirth(nullable:true, maxSize:10)● age(nullable:true)● }● }
    • Step 3: grails generate-all Person● Finished generation for domain class addressbook.Person
    • Step 4: grails run-appServer running. Browse to http://localhost:8080/addressbook
    • Step 4: grails run-app
    • Step 4: grails run-app
    • My Open Source Grails Plugins● I contributed 15 Grails plugins out of 826 (13 Aug 2012), including:● Grails Activiti Plugin● http://code.google.com/p/grails-activiti-plugin/● Grails Form Builder Plugin● http://code.google.com/p/grails-form-builder-plugin/● JQuery Validation UI Plugin● http://grails.org/plugin/jquery-validation-ui● Mahout Recommender Plugin● https://github.com/limcheekin/mahout-recommender● Find out more at http://goo.gl/VPVrd
    • Q&A