2055854---grail's website dev

  • Upload
    rangna

  • View
    224

  • Download
    0

Embed Size (px)

Citation preview

  • 8/14/2019 2055854---grail's website dev.

    1/38

    Rapid Web Development for the Java Platform

    Presented at the Princeton Java Users GroupJune 5th, 2007

    1

  • 8/14/2019 2055854---grail's website dev.

    2/38

    This presentation is published under the Creative Commons Attribution Noncommercial Share

    Alike License Version 2.5. (Please see http://creativecommons.org/licenses/by-nc-sa/2.5/ forcomplete details.)

    You are free to reuse and modify this presentation under the following conditions. (Thanks toSteven Devijver for providing this excellent summary of the license terms.):

    You dont get compensated for providing this presentation (non-commercial).

    You dont get compensated for presenting this presentation in front of your audience (non-

    commercial). You are exempted from this condition if you are tutoring your colleagues.

    You do not charge members of your audience for a digital copy ofthis presentation.

    You are free to charge your audience for printed versions of this presentation or for themedia that contains this presentation, but only if you personally actually incur a non-

    recoverable cost.

    You keep and do not modify the content of this license slide in the presentation (sharealike).

    You attribute that Jason Rudolph is the original creator and maintainer of this presentation

    (attribution). If you modify the content and distribute or modify the content and show this presentation to

    an audience, you are required to send your modified file to [email protected].

    You have the right to call yourself co-author if you modify the content of this presentation in

    a non-trivial way.

    If you alter, transform, or build upon this work, you may distribute the resulting work onlyunder a license identical to this one (share alike).

    Creative Commons License

    2

    mailto:[email protected]:[email protected]:[email protected]:[email protected]://creativecommons.org/licenses/by-nc-sa/2.5/http://creativecommons.org/licenses/by-nc-sa/2.5/
  • 8/14/2019 2055854---grail's website dev.

    3/38

    Introduction

    Jason Rudolph

    Grails Committer

    Software Consultant

    Author

    3

  • 8/14/2019 2055854---grail's website dev.

    4/38

    Grails? Whats that?

    Hello, Productivity

    Painless ORM (Seriously)

    Validation Made Simple

    A New Point of View

    Cool (and Groovy) Features

    Test, Deploy, Profit!

    Agenda

    4

  • 8/14/2019 2055854---grail's website dev.

    5/38

    Rapid web application development

    Getting things done

    Having fun doing it

    Full-stack MVC framework

    Open source Runs on the JVM

    What is Grails?

    5

  • 8/14/2019 2055854---grail's website dev.

    6/38

    Develop your apps in Groovy

    Convention over configuration Opinionated software

    Sensible defaults

    Everything has a place

    DRY (Don't Repeat Yourself)

    What (else) is Grails?

    6

  • 8/14/2019 2055854---grail's website dev.

    7/38

    Rock-Solid Foundation

    7

  • 8/14/2019 2055854---grail's website dev.

    8/38

    Ready?

    Install JDK 1.4 (or higher)

    Set JAVA_HOME

    Set

    Download latest Grails release

    Set GRAILS_HOME

    Add $GRAILS_HOME/bin to your PATH

    Let's Get Started

    8

  • 8/14/2019 2055854---grail's website dev.

    9/38

    Hello, GrailsDemo

    9

  • 8/14/2019 2055854---grail's website dev.

    10/38

    WhatsInside?

    10

  • 8/14/2019 2055854---grail's website dev.

    11/38

    DemoInstant Gratification

    11

  • 8/14/2019 2055854---grail's website dev.

    12/38

    Zero-configuration persistencemanagement

    DAOs Dynamic domain class methods

    Grails ORM (GORM)

    save

    delete

    get

    list

    find

    findAll

    count

    etc.

    12

  • 8/14/2019 2055854---grail's website dev.

    13/38

    Relationship Counseling

    13

  • 8/14/2019 2055854---grail's website dev.

    14/38

    1:n Relationships

    14

  • 8/14/2019 2055854---grail's website dev.

    15/38

    Relationship CounselingDemo

    15

  • 8/14/2019 2055854---grail's website dev.

    16/38

    Wheres My Data?

    16

  • 8/14/2019 2055854---grail's website dev.

    17/38

    Be PersistentDemo

    17

  • 8/14/2019 2055854---grail's website dev.

    18/38

    Pre-packaged constraints

    Custom constraints

    Declaring Constraints

    blank

    creditcard

    email

    inList

    min

    max

    matches

    nullable

    range

    unique

    url

    etc.

    18

  • 8/14/2019 2055854---grail's website dev.

    19/38

    Show Some Constraint!Demo

    19

  • 8/14/2019 2055854---grail's website dev.

    20/38

    Fun with URLs

    http://localhost:8080/racetrack/race/show/2

    20

    http://localhost:8080/racetrack/race/show/2http://localhost:8080/racetrack/race/show/2
  • 8/14/2019 2055854---grail's website dev.

    21/38

    Fun with URLs

    http://localhost:8080/racetrack/race/show/2

    21

    http://localhost:8080/racetrack/race/show/2http://localhost:8080/racetrack/race/show/2
  • 8/14/2019 2055854---grail's website dev.

    22/38

    GSP

    22

  • 8/14/2019 2055854---grail's website dev.

    23/38

    GSP

    RaceController.groovy

    views/race/show.gsp

    23

  • 8/14/2019 2055854---grail's website dev.

    24/38

  • 8/14/2019 2055854---grail's website dev.

    25/38

    Get DynamicDemo

    25

  • 8/14/2019 2055854---grail's website dev.

    26/38

    Unit testing

    GroovyTestCase created for each class

    grails test-app executes all test cases

    Functional testing

    Canoo Web Test

    grails generate-webtest

    grails run-webtest

    Putting It to the Test

    26

  • 8/14/2019 2055854---grail's website dev.

    27/38

    Deploymentgrails war

    27

  • 8/14/2019 2055854---grail's website dev.

    28/38

    Services

    transactional

    non-transactional

    Java Integration (src/java)

    Rich (and Friendly) Tag Libraries

    Ajax

    Beyond the Finish Line

    28

  • 8/14/2019 2055854---grail's website dev.

    29/38

    Custom URL Mapping

    Alternate Domain Implementations

    Using Hibernate XML for legacy schemas

    EJB3 entity beans

    Command Objects for Forms

    Job Scheduling

    Layouts & CSS

    Still More to Explore

    29

  • 8/14/2019 2055854---grail's website dev.

    30/38

    Build rich clients

    Expose web services

    Secure your app

    Roll your own scaffolding

    Integrate a search engine

    Almost limitless possibilities

    grails.org/plugins

    30

  • 8/14/2019 2055854---grail's website dev.

    31/38

    Future releases (Pre 1.0)

    Support for JSP custom tag libraries in GSP

    Spring Web Flow

    Domain model generation from database schema

    JPA support

    grails.org/roadmap

    31

  • 8/14/2019 2055854---grail's website dev.

    32/38

    Oracle

    BEA

    Sun (JavaOne 2007)

    Important CompaniesTalking About Grails

    http://www.oracle.com/technology/pub/articles/grall-grails.html

    http://dev2dev.bea.com/pub/a/2006/10/introduction-groovy-grails.html

    http://www28.cplan.com/cc158/session_details.jsp?isid=286133&ilocation_id=158-1&ilanguage=english

    32

    http://www.oracle.com/technology/pub/articles/grall-grails.htmlhttp://www28.cplan.com/cc158/session_details.jsp?isid=286133&ilocation_id=158-1&ilanguage=englishhttp://www28.cplan.com/cc158/session_details.jsp?isid=286133&ilocation_id=158-1&ilanguage=englishhttp://www28.cplan.com/cc158/session_details.jsp?isid=286133&ilocation_id=158-1&ilanguage=englishhttp://www28.cplan.com/cc158/session_details.jsp?isid=286133&ilocation_id=158-1&ilanguage=englishhttp://www.oracle.com/technology/pub/articles/grall-grails.htmlhttp://www.oracle.com/technology/pub/articles/grall-grails.htmlhttp://www.oracle.com/technology/pub/articles/grall-grails.htmlhttp://www.oracle.com/technology/pub/articles/grall-grails.htmlhttp://www.oracle.com/technology/pub/articles/grall-grails.htmlhttp://www.oracle.com/technology/pub/articles/grall-grails.htmlhttp://www.oracle.com/technology/pub/articles/grall-grails.htmlhttp://www.oracle.com/technology/pub/articles/grall-grails.html
  • 8/14/2019 2055854---grail's website dev.

    33/38

    grails.org

    Downloads Latest release (0.5)

    Development snapshot (0.5.5)

    User guide, tutorials, screencasts, etc.

    Mailing lists (grails.org/mailing+lists)

    Resources

    33

  • 8/14/2019 2055854---grail's website dev.

    34/38

    aboutGroovy.com

    grails.org/grails+podcast

    groovyblogs.org

    Resources (contd)

    34

  • 8/14/2019 2055854---grail's website dev.

    35/38

    2007 No Fluff Just Stuff

    Atlantic Northeast Software Symposium

    August 10-12th

    Westin Princeton at Forrestal Village

    nofluffjuststuff.com/sh/2007-08-princeton

    35

    http://www.nofluffjuststuff.com/sh/2007-08-princetonhttp://www.nofluffjuststuff.com/sh/2007-08-princeton
  • 8/14/2019 2055854---grail's website dev.

    36/38

    Grails eXchange 2007

    October 17-19th

    Barbican, London, UK

    grails-exchange.com

    36

  • 8/14/2019 2055854---grail's website dev.

    37/38

    Books

    37

  • 8/14/2019 2055854---grail's website dev.

    38/38

    www.jasonrudolph.com

    [email protected]

    mailto:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]