SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Downloaden Sie, um offline zu lesen
GRAILS
Peter Maas ~ Works at Finalist IT
Group. 70% Developer, 25% Architect
and 5% CTO Board. Experience
includes Java/JEE, Spring, Hibernate,
i B a t i s , J S F, S t r u t s , M M B a s e.
Passionate about scripting languages
for the JVM like Groovy and JRuby.
So, what is Grails?
    In its' essence Grails is an MVC action-based webframework


· CoC: convention over configuration

· DRY: don't repeat yourself

· TDD: test driven development

· Combines advantages of frameworks like
        RoR/Django/Turbogears with proven Java technology
GROOVY ≠ GRUBY
 GRAILS ≠ RAILS
uses defacto &
                                                                 proven frameworks
                                          Quartz


           Webflow



                               Spring
                                                   Acegi




                    Groovy


SiteMesh


                                                       Compass
                                         Gorm                         Lucene




                             Hibernate
Key Advantages

· Lowers the steep learningcurve of the Java platform

· Brings (back) both productivity and pleasure of development

· Lets you build applications in an incremental/iterative way

· Allows you to scale your application in complexity and infrastructure
DEMO




                          Battle
 Registration                              Presentation
                    1 name          1
                *                       * name
name
                      description
email                                     description
                      date
Domain classes
                                                                                                              class Registration {
 class Battle {                                                 class Presentation {
                                                                                                                     String name
        String name                                                    String name
                                                                                                                     String email
        String description                                             String description
                                                                                                                                                       Criteria
                                                                                                                     Battle battle
        Date date                                                      Battle battle
                                                                                                                     static belongsTo = [Battle]
        static hasMany =                                               static belongsTo = [Battle]
                                                                                                                                                         def listByRegistration = {
 [presentations:Presentation,registrations:Registration]
                                                                                                                                                           def c = Battle.createCriteria()
                                                                                                                     static constraints = {
                                                                                                                                                           def results = c{
        static constraints = {                                         static constraints = {
                                                                                                                             name(blank: false)
                                                                                                                                                             registrations{
                name(blank: false)                                             name(blank: false)
                                                                                                                             email(blank: false,
                                                                                                                                                               like(quot;namequot;,quot;%${params.name}%quot;)
                description(blank: false)                                      description(blank: false)
                                                                                                                                    email: true)
                                                                                                                                                             }
                date(nullable: false)                                          battle(nullable: false)
                                                                                                                             battle(nullable: false)
                                                                                                                                                             order(quot;datequot;,quot;descquot;)
        }                                                              }
                                                                                                                     }
                                                                                                                                                            }
        def String toString(){                                         def String toString() {
                                                                                                                     def String toString() {
                                                                                                                                                          render(view:'list',model:[battleList: results])
                return name                                                    return name
                                                                                                                             return name
                                                                                                                                                         }
        }                                                              }
                                                                                                                     }
 }                                                              }
                                                                                                              }


                                                                                                           g:textArea
Bootstrap
 Battle b =
  new Battle(name: quot;Battle of the Geeks 2007quot;, description: quot;Finalists BOTG 2007quot;, date: new Date())          <g:textArea name=quot;myFieldquot; value=quot;myValuequot; rows=quot;5quot; cols=quot;40quot;/>
 b.save()

 [quot;CMScquot;, quot;Guicequot;,quot;Grailsquot;,quot;Mulequot;].each{
                                                                                                           Spring config
       Presentation p =
        new Presentation(name: quot;${it} presentationquot;, description: quot;presentation about ${it}quot;, battle: b)
       p.save()
 }
                                                                                                              <bean id=quot;textileParserquot; class=quot;com.plink.plextile.TextParserquot;/>


Taglib                                                                 Render AS
 import com.plink.plextile.*;
                                                                          import grails.converters.*
 class TextileTagLib {
                                                                          ...
        TextParser textileParser
                                                                          def showXML = {
        def renderTextile = { attrs ->
                                                                                 Battle b = Battle.get( params.id)
               out << textileParser.parseTextile(attrs.value, true)
                                                                                 render b as XML
        }
                                                                          }
 }

Weitere ähnliche Inhalte

Kürzlich hochgeladen

Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
amitlee9823
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
dlhescort
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
lizamodels9
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
lizamodels9
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Dipal Arora
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Kürzlich hochgeladen (20)

RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Phases of negotiation .pptx
 Phases of negotiation .pptx Phases of negotiation .pptx
Phases of negotiation .pptx
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
Business Model Canvas (BMC)- A new venture concept
Business Model Canvas (BMC)-  A new venture conceptBusiness Model Canvas (BMC)-  A new venture concept
Business Model Canvas (BMC)- A new venture concept
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 

Empfohlen

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Grails @ Battle of the Geeks 2007

  • 2. Peter Maas ~ Works at Finalist IT Group. 70% Developer, 25% Architect and 5% CTO Board. Experience includes Java/JEE, Spring, Hibernate, i B a t i s , J S F, S t r u t s , M M B a s e. Passionate about scripting languages for the JVM like Groovy and JRuby.
  • 3. So, what is Grails? In its' essence Grails is an MVC action-based webframework · CoC: convention over configuration · DRY: don't repeat yourself · TDD: test driven development · Combines advantages of frameworks like RoR/Django/Turbogears with proven Java technology
  • 4. GROOVY ≠ GRUBY GRAILS ≠ RAILS
  • 5. uses defacto & proven frameworks Quartz Webflow Spring Acegi Groovy SiteMesh Compass Gorm Lucene Hibernate
  • 6. Key Advantages · Lowers the steep learningcurve of the Java platform · Brings (back) both productivity and pleasure of development · Lets you build applications in an incremental/iterative way · Allows you to scale your application in complexity and infrastructure
  • 7. DEMO Battle Registration Presentation 1 name 1 * * name name description email description date
  • 8. Domain classes class Registration { class Battle { class Presentation { String name String name String name String email String description String description Criteria Battle battle Date date Battle battle static belongsTo = [Battle] static hasMany = static belongsTo = [Battle] def listByRegistration = { [presentations:Presentation,registrations:Registration] def c = Battle.createCriteria() static constraints = { def results = c{ static constraints = { static constraints = { name(blank: false) registrations{ name(blank: false) name(blank: false) email(blank: false, like(quot;namequot;,quot;%${params.name}%quot;) description(blank: false) description(blank: false) email: true) } date(nullable: false) battle(nullable: false) battle(nullable: false) order(quot;datequot;,quot;descquot;) } } } } def String toString(){ def String toString() { def String toString() { render(view:'list',model:[battleList: results]) return name return name return name } } } } } } } g:textArea Bootstrap Battle b = new Battle(name: quot;Battle of the Geeks 2007quot;, description: quot;Finalists BOTG 2007quot;, date: new Date()) <g:textArea name=quot;myFieldquot; value=quot;myValuequot; rows=quot;5quot; cols=quot;40quot;/> b.save() [quot;CMScquot;, quot;Guicequot;,quot;Grailsquot;,quot;Mulequot;].each{ Spring config Presentation p = new Presentation(name: quot;${it} presentationquot;, description: quot;presentation about ${it}quot;, battle: b) p.save() } <bean id=quot;textileParserquot; class=quot;com.plink.plextile.TextParserquot;/> Taglib Render AS import com.plink.plextile.*; import grails.converters.* class TextileTagLib { ... TextParser textileParser def showXML = { def renderTextile = { attrs -> Battle b = Battle.get( params.id) out << textileParser.parseTextile(attrs.value, true) render b as XML } } }