SlideShare a Scribd company logo
Cool Web Apps with Grails, Groovy and Next-Gen Scripting Languages William Grosso Twofish
Abstract ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Actual Talk ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Outline ,[object Object],[object Object],[object Object],[object Object],[object Object]
Outline ,[object Object],[object Object],[object Object],[object Object],[object Object]
Who Am I?
Opinionated Talk ,[object Object],[object Object],[object Object],[object Object],[object Object],And these are my opinions, not necessarily Twofish’s
This all started in July ,[object Object],[object Object],[object Object],[object Object]
Up and running for >3 months without any attention from me
Outline ,[object Object],[object Object],[object Object],[object Object],[object Object]
In 2003 …  ,[object Object],[object Object],[object Object],[object Object]
That Talk Began With …. ,[object Object],[object Object],[object Object],[object Object]
My 2003 Big Bold Claim ,[object Object],[object Object],[object Object]
Supporting Communities ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
I Was Right ,[object Object],[object Object],[object Object]
Outline ,[object Object],[object Object],[object Object],[object Object],[object Object]
But I Wasn’t Completely Right JVM Platform Libraries and  Application Frameworks Your App / Your Web App Your Libraries Your Prototypes Down here, Java, super clear semantics, WORA etcetera win Hmm. Community properties probably only matter for largish things that you share or keep and reuse for a long time. Maybe we can do better than Java?
Lots of people having similar thoughts. The JVM is robust enough, and the platform is robust enough, and … that people are starting to seriously layer languages on top.
Short list of “interesting” languages: Jython JRuby Scala Groovy Kawa Clojure PHP NetRexx (??)
Completely a sidenote: If you’re curious about programming language design, this is the single best  site on the web
Closures have been THE hot topic in commercial language design
Odersky’s claim: closures + first class  containers + super strong typing are the bees knees
Complexity is bad. Java is near the edge of the cliff. 4.5M PDF and a Tiny Thumbnail? For Generics? Ruby has a similar problem (more later)
Desiderata for the Tiers JVM Platform Libraries and  Application Frameworks Your App Your Libraries Your Prototypes Strong typing Absolutely clear semantics Minimal evolution of language None of the other stuff is necessary Looks like Java Clear, readable code Non-verbose language Complete integration with Java First class containers Closures Great XML support  Rapid Prototyping  (REPL) Metaobject Protocol
Only Groovy Makes the Short List ,[object Object],[object Object],[object Object],[object Object],[object Object]
 
Looks Like Java Go read the code examples It’s easy
Let’s Look at Concurrency Not Java def? 1 .. 8  sleep 30 But … it’s close
Complete Integration with Java ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
import groovy.swing.*; import java.awt.*; import javax.swing.*; class Model extends Observable { static CURRENCY = ["USD", "EURO", "YEN"] private Map rates = new HashMap() private long value void initialize(initialRates) { (0..CURRENCY.size() - 1).each { setRate(CURRENCY[it], initialRates[it]) } } // setting rate for currency void setRate(currency, f) { rates.put(currency, f); setChanged(); notifyObservers(currency); } // setting new value for currency void setValue(currency, double newValue) { value = Math.round(newValue / rates[currency]); setChanged(); notifyObservers(null); } // getter for value for particular currency def getValue(currency) { value * rates[currency] } } class RateView extends JTextField implements Observer { private Model model; private currency; public void setModel(Model model) { this.model?.removeObserver(this) this.model = model model.addObserver(this) } public void update(Observable o, Object currency) { if (this.currency == currency) text = String.format("%15.2f", model.rates[currency]) } } class ValueView extends JTextField implements Observer { private Model model private currency public void setModel(Model model) { this.model?.removeObserver(this) this.model = model model.addObserver(this) } public void update(Observable o, Object currency) { if (currency == null || this.currency == currency) text = String.format("%15.2f", model.getValue(this.currency)); } }
swing = new SwingBuilder() model = new Model() frame = swing.frame(title: "Groovy SwingBuilder MVC Demo", layout: new GridLayout(4, 3), size: [300, 150], defaultCloseOperation: WindowConstants.EXIT_ON_CLOSE) { label("currency") label("rate") label("value") for (c in Model.CURRENCY) { label(c) widget(new RateView(), model: model, currency: c, action: swing.action(closure: { event -> event.source.model.setRate(event.source.currency, event.source.text.toDouble()); })) widget(new ValueView(), model: model, currency: c, action: swing.action(closure: {event -> event.source.model.setValue(event.source.currency, event.source.text.toDouble()); })) } } frame.show() model.initialize([1.0, 0.83, 0.56]);
 
 
First Class Containers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
weekMap = [ "Su" : "Sunday", "Mo" : "Monday", "Tu" : "Tuesday", "We" : "Wednesday", "Th" : "Thursday", "Fr" : "Friday", "Sa" : "Saturday" ] weekMap.each() { key, value -> println "${key} == ${value}" }
Gafter’s Def’n of Closure ,[object Object],[object Object],[object Object]
In Practice ,[object Object],[object Object],[object Object],def foo = { a,b,c -> bunch of code} foo(“e”, “f”, “g”)
Inner Classes are Close! ,[object Object],[object Object],[object Object],[object Object]
Don’t believe me?  Neal likes Java  a LOT more than I do
XML Support ,[object Object],def CAR_RECORDS = ''' <records> <car name='HSV Maloo' make='Holden' year='2006'> <country>Australia</country> <record type='speed'>Production Pickup Truck with speed of 271kph</record> </car> <car name='P50' make='Peel' year='1962'> <country>Isle of Man</country> <record type='size'>Smallest Street-Legal Car at 99cm wide and 59 kg in weight</record> </car> <car name='Royale' make='Bugatti' year='1931'> <country>France</country> <record type='price'>Most Valuable Car at $15 million</record> </car> </records> ''' def records = new XmlSlurper().parseText(CAR_RECORDS) def allRecords = records.car println allRecords.size() println records.car[0].name() println records.car[0].@year println records.car[0].country
XML Support II ,[object Object],[object Object]
Rapid Prototyping: Scripts, Shell and Console ,[object Object],[object Object],[object Object],[object Object],[object Object]
Metaobject Protocol ,[object Object],[object Object]
MetaObject Protocols: The Point ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],OPINIONS VARY AS TO WHETHER ALLOWING THIS  SORT OF THING IS A GOOD  IDEA!!!!
Chris will talk more about GORM later on
Builders ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What’s Martin Fowler been doing since the refactoring book anyway?
 
How to Build a Builder ,[object Object],[object Object],[object Object],protected abstract Object createNode(Object name) protected abstract Object createNode(Object name, Map attributes) protected abstract Object createNode(Object name, Map attributes, Object value) protected abstract Object createNode(Object name, Object value)  protected abstract void setParent(Object parent, Object child)  Groovy is designed to work with Java.
MarkupBuilder import groovy.xml.MarkupBuilder  def writer = new StringWriter()  def xml = new MarkupBuilder(writer) xml.records() {  car(name:'HSV Maloo', make:'Holden', year:2006) {  country('Australia')  record(type:'speed', 'Production Pickup Truck with speed of 271kph')  }  car(name:'P50', make:'Peel', year:1962) {  country('Isle of Man')  record(type:'size', 'Smallest Street-Legal Car at 99cm wide and 59 kg in weight')  }  car(name:'Royale', make:'Bugatti', year:1931) {  country('France')  record(type:'price', 'Most Valuable Car at $15 million')  }  }  println writer.toString()
Outline ,[object Object],[object Object],[object Object],[object Object],[object Object]
Rails as a Thunderbolt ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Rails guys invented the “movie to demo the framework” idea and their movies are still WOW OH WOW GOOD
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],PHP: 8 Java: 7 .NET: 2 Perl: 2 Ruby: 1
In 4 years, Rails has made very impressive strides. Market leader in the “early stage startup” category.
Issues with Ruby ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Backwards compatibility is not a huge priority
Backwards compatibility is not a huge priority
This is scary
Of course, Java is mostly developed by Sun ….
This is from a Ruby guy who doesn’t like JRuby very much …
Issues with Rails ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Grails is “Groovy on Rails” ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pieces / Parts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],More on these later
GORM ,[object Object]
Plugins and Extensability ,[object Object],[object Object]
SWAG Estimate: About ¾ of plugins are mentioned here (BIRT, for example, is not)
Outline ,[object Object],[object Object],[object Object],[object Object],[object Object]
Twofish Model TFEL TFEL DB TFEL DB ,[object Object],[object Object],[object Object],[object Object],[object Object],PS ,[object Object],[object Object],[object Object],[object Object]
<<IntelliJ>>
Annoyances (Love Mashup) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Plugins (Love Mashup) ,[object Object],[object Object],[object Object]
Annoyances (Twofish) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Plugins (Twofish) ,[object Object],[object Object],[object Object]
Additional Reading
This is a great series of articles. Whenever anyone tells you a technology is going to be big, ask yourself: WWTT?
 
 

More Related Content

What's hot

25 php interview questions – codementor
25 php interview questions – codementor25 php interview questions – codementor
25 php interview questions – codementor
Arc & Codementor
 
Introduction to Java Scripting
Introduction to Java ScriptingIntroduction to Java Scripting
Introduction to Java Scripting
fantasticdigitaltools
 
Clojure
ClojureClojure
Clojure
bloomYa Group
 
Az ve Öz Kotlin - Beyza KOYULMUS
 Az ve Öz Kotlin - Beyza KOYULMUS Az ve Öz Kotlin - Beyza KOYULMUS
Az ve Öz Kotlin - Beyza KOYULMUS
BeyzaKOYULMUS
 
Type Script Conceitos de ts para projetos front-end React - por ruben marcus
Type Script   Conceitos de ts para projetos front-end React - por ruben marcusType Script   Conceitos de ts para projetos front-end React - por ruben marcus
Type Script Conceitos de ts para projetos front-end React - por ruben marcus
Ruben Marcus Luz Paschoarelli
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broersedpc
 
A class action
A class actionA class action
A class action
Luciano Colosio
 
Switch case looping
Switch case loopingSwitch case looping
Switch case looping
Cherimay Batallones
 
Feelin' Groovy: An Afternoon of Reflexive Metaprogramming
Feelin' Groovy: An Afternoon of Reflexive MetaprogrammingFeelin' Groovy: An Afternoon of Reflexive Metaprogramming
Feelin' Groovy: An Afternoon of Reflexive Metaprogramming
Matt Stine
 
SLOID Share
SLOID ShareSLOID Share
SLOID Share
ssuser05c065
 
Grooming with Groovy
Grooming with GroovyGrooming with Groovy
Grooming with Groovy
Dhaval Dalal
 
Common design patterns in php
Common design patterns in phpCommon design patterns in php
Common design patterns in php
David Stockton
 
Mark asoi ppt
Mark asoi pptMark asoi ppt
Mark asoi pptmark-asoi
 
Plomino
Plomino Plomino
Plomino
Makina Corpus
 
WordCamp US: Clean Code
WordCamp US: Clean CodeWordCamp US: Clean Code
WordCamp US: Clean Code
mtoppa
 
PHP Doesn't Suck
PHP Doesn't SuckPHP Doesn't Suck
PHP Doesn't Suck
John Hobbs
 
Kotlin vs Java • Bapusaheb Patil • TechieAid Talk
Kotlin vs Java • Bapusaheb Patil • TechieAid TalkKotlin vs Java • Bapusaheb Patil • TechieAid Talk
Kotlin vs Java • Bapusaheb Patil • TechieAid Talk
Bapusaheb Patil
 
What is the best programming language for beginner?
What is the best programming language for beginner?What is the best programming language for beginner?
What is the best programming language for beginner?
Designveloper
 
Introjs10.5.17SD
Introjs10.5.17SDIntrojs10.5.17SD
Introjs10.5.17SD
Thinkful
 

What's hot (19)

25 php interview questions – codementor
25 php interview questions – codementor25 php interview questions – codementor
25 php interview questions – codementor
 
Introduction to Java Scripting
Introduction to Java ScriptingIntroduction to Java Scripting
Introduction to Java Scripting
 
Clojure
ClojureClojure
Clojure
 
Az ve Öz Kotlin - Beyza KOYULMUS
 Az ve Öz Kotlin - Beyza KOYULMUS Az ve Öz Kotlin - Beyza KOYULMUS
Az ve Öz Kotlin - Beyza KOYULMUS
 
Type Script Conceitos de ts para projetos front-end React - por ruben marcus
Type Script   Conceitos de ts para projetos front-end React - por ruben marcusType Script   Conceitos de ts para projetos front-end React - por ruben marcus
Type Script Conceitos de ts para projetos front-end React - por ruben marcus
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broerse
 
A class action
A class actionA class action
A class action
 
Switch case looping
Switch case loopingSwitch case looping
Switch case looping
 
Feelin' Groovy: An Afternoon of Reflexive Metaprogramming
Feelin' Groovy: An Afternoon of Reflexive MetaprogrammingFeelin' Groovy: An Afternoon of Reflexive Metaprogramming
Feelin' Groovy: An Afternoon of Reflexive Metaprogramming
 
SLOID Share
SLOID ShareSLOID Share
SLOID Share
 
Grooming with Groovy
Grooming with GroovyGrooming with Groovy
Grooming with Groovy
 
Common design patterns in php
Common design patterns in phpCommon design patterns in php
Common design patterns in php
 
Mark asoi ppt
Mark asoi pptMark asoi ppt
Mark asoi ppt
 
Plomino
Plomino Plomino
Plomino
 
WordCamp US: Clean Code
WordCamp US: Clean CodeWordCamp US: Clean Code
WordCamp US: Clean Code
 
PHP Doesn't Suck
PHP Doesn't SuckPHP Doesn't Suck
PHP Doesn't Suck
 
Kotlin vs Java • Bapusaheb Patil • TechieAid Talk
Kotlin vs Java • Bapusaheb Patil • TechieAid TalkKotlin vs Java • Bapusaheb Patil • TechieAid Talk
Kotlin vs Java • Bapusaheb Patil • TechieAid Talk
 
What is the best programming language for beginner?
What is the best programming language for beginner?What is the best programming language for beginner?
What is the best programming language for beginner?
 
Introjs10.5.17SD
Introjs10.5.17SDIntrojs10.5.17SD
Introjs10.5.17SD
 

Similar to Groovy And Grails

Languages used by web app development services remotestac x
Languages used by web app development services  remotestac xLanguages used by web app development services  remotestac x
Languages used by web app development services remotestac x
Remote Stacx
 
C# and java comparing programming languages
C# and java  comparing programming languagesC# and java  comparing programming languages
C# and java comparing programming languages
Shishir Roy
 
JavaScript Miller Columns
JavaScript Miller ColumnsJavaScript Miller Columns
JavaScript Miller Columns
Jonathan Fine
 
Javascript beginner-handbook
Javascript beginner-handbookJavascript beginner-handbook
Javascript beginner-handbook
Faina Fridman
 
javascript-beginner-handbook.pdf
javascript-beginner-handbook.pdfjavascript-beginner-handbook.pdf
javascript-beginner-handbook.pdf
RaviKumar76265
 
JavaScript nicht nur für Programmierer: Einblicke in die weltweit am meisten ...
JavaScript nicht nur für Programmierer: Einblicke in die weltweit am meisten ...JavaScript nicht nur für Programmierer: Einblicke in die weltweit am meisten ...
JavaScript nicht nur für Programmierer: Einblicke in die weltweit am meisten ...
Peter Hecker
 
Step by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For BeginnersStep by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For Beginners
calltutors
 
Awesome free resources for learning javascript
Awesome free resources for learning javascriptAwesome free resources for learning javascript
Awesome free resources for learning javascript
Designveloper
 
Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
Salahaddin University-Erbil
 
Why don't you Groovy?
Why don't you Groovy?Why don't you Groovy?
Why don't you Groovy?
Orest Ivasiv
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworks
Yuri Visser
 
Six reasons to learn JavaScript
Six reasons to learn JavaScriptSix reasons to learn JavaScript
Six reasons to learn JavaScript
Otto Kekäläinen
 
Alvin gunawan aw_english
Alvin gunawan aw_englishAlvin gunawan aw_english
Alvin gunawan aw_english
AlvinGunawan6
 
Java And Community Support
Java And Community SupportJava And Community Support
Java And Community Support
William Grosso
 
React js basics
React js basicsReact js basics
React js basics
Maulik Shah
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
vmadan89
 
Dynamic Languages on the JVM
Dynamic Languages on the JVMDynamic Languages on the JVM
Dynamic Languages on the JVMelliando dias
 
Glenn Vanderburg — Learning to love JavaScript
Glenn Vanderburg — Learning to love JavaScriptGlenn Vanderburg — Learning to love JavaScript
Glenn Vanderburg — Learning to love JavaScriptatr2006
 
Bledar Gjocaj - Java open source
Bledar Gjocaj - Java open sourceBledar Gjocaj - Java open source
Bledar Gjocaj - Java open source
Open Labs Albania
 

Similar to Groovy And Grails (20)

Languages used by web app development services remotestac x
Languages used by web app development services  remotestac xLanguages used by web app development services  remotestac x
Languages used by web app development services remotestac x
 
C# and java comparing programming languages
C# and java  comparing programming languagesC# and java  comparing programming languages
C# and java comparing programming languages
 
JavaScript Miller Columns
JavaScript Miller ColumnsJavaScript Miller Columns
JavaScript Miller Columns
 
Javascript beginner-handbook
Javascript beginner-handbookJavascript beginner-handbook
Javascript beginner-handbook
 
javascript-beginner-handbook.pdf
javascript-beginner-handbook.pdfjavascript-beginner-handbook.pdf
javascript-beginner-handbook.pdf
 
JavaScript nicht nur für Programmierer: Einblicke in die weltweit am meisten ...
JavaScript nicht nur für Programmierer: Einblicke in die weltweit am meisten ...JavaScript nicht nur für Programmierer: Einblicke in die weltweit am meisten ...
JavaScript nicht nur für Programmierer: Einblicke in die weltweit am meisten ...
 
Step by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For BeginnersStep by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For Beginners
 
Awesome free resources for learning javascript
Awesome free resources for learning javascriptAwesome free resources for learning javascript
Awesome free resources for learning javascript
 
Java for C++ programers
Java for C++ programersJava for C++ programers
Java for C++ programers
 
Why don't you Groovy?
Why don't you Groovy?Why don't you Groovy?
Why don't you Groovy?
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworks
 
Six reasons to learn JavaScript
Six reasons to learn JavaScriptSix reasons to learn JavaScript
Six reasons to learn JavaScript
 
Alvin gunawan aw_english
Alvin gunawan aw_englishAlvin gunawan aw_english
Alvin gunawan aw_english
 
Java And Community Support
Java And Community SupportJava And Community Support
Java And Community Support
 
React js basics
React js basicsReact js basics
React js basics
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
 
All of Javascript
All of JavascriptAll of Javascript
All of Javascript
 
Dynamic Languages on the JVM
Dynamic Languages on the JVMDynamic Languages on the JVM
Dynamic Languages on the JVM
 
Glenn Vanderburg — Learning to love JavaScript
Glenn Vanderburg — Learning to love JavaScriptGlenn Vanderburg — Learning to love JavaScript
Glenn Vanderburg — Learning to love JavaScript
 
Bledar Gjocaj - Java open source
Bledar Gjocaj - Java open sourceBledar Gjocaj - Java open source
Bledar Gjocaj - Java open source
 

More from William Grosso

Slot Widgets
Slot WidgetsSlot Widgets
Slot Widgets
William Grosso
 
Formal Aspects of Protege
Formal Aspects of ProtegeFormal Aspects of Protege
Formal Aspects of Protege
William Grosso
 
Knowing How People Are Playing Your Game Gives You the Winning Hand
Knowing How People Are Playing Your Game Gives You the Winning HandKnowing How People Are Playing Your Game Gives You the Winning Hand
Knowing How People Are Playing Your Game Gives You the Winning Hand
William Grosso
 
Tales from the Platform Trade
Tales from the Platform TradeTales from the Platform Trade
Tales from the Platform Trade
William Grosso
 
Maxims for Multiplayer Games
Maxims for Multiplayer GamesMaxims for Multiplayer Games
Maxims for Multiplayer Games
William Grosso
 
Crafting an Analytics Strategy
Crafting an Analytics StrategyCrafting an Analytics Strategy
Crafting an Analytics Strategy
William Grosso
 
UCSC Talk on Building Startups
UCSC Talk on Building StartupsUCSC Talk on Building Startups
UCSC Talk on Building Startups
William Grosso
 
On the Startup Team
On the Startup TeamOn the Startup Team
On the Startup Team
William Grosso
 
Scientific revenue unreasonable effectiveness of data
Scientific revenue unreasonable effectiveness of dataScientific revenue unreasonable effectiveness of data
Scientific revenue unreasonable effectiveness of data
William Grosso
 
Taking Virtual Economies to the Next Level
Taking Virtual Economies to the Next LevelTaking Virtual Economies to the Next Level
Taking Virtual Economies to the Next Level
William Grosso
 
Managing a Virtual Economy
Managing a Virtual EconomyManaging a Virtual Economy
Managing a Virtual Economy
William Grosso
 
Applying Retail Strategies to Item Merchandising
Applying Retail Strategies to Item MerchandisingApplying Retail Strategies to Item Merchandising
Applying Retail Strategies to Item Merchandising
William Grosso
 
Managing a Virtual Economy
Managing a Virtual EconomyManaging a Virtual Economy
Managing a Virtual Economy
William Grosso
 
Virtual Worlds and Real Metrics:
Virtual Worlds and Real Metrics:Virtual Worlds and Real Metrics:
Virtual Worlds and Real Metrics:
William Grosso
 
The Evolving Architecture
The Evolving ArchitectureThe Evolving Architecture
The Evolving Architecture
William Grosso
 

More from William Grosso (15)

Slot Widgets
Slot WidgetsSlot Widgets
Slot Widgets
 
Formal Aspects of Protege
Formal Aspects of ProtegeFormal Aspects of Protege
Formal Aspects of Protege
 
Knowing How People Are Playing Your Game Gives You the Winning Hand
Knowing How People Are Playing Your Game Gives You the Winning HandKnowing How People Are Playing Your Game Gives You the Winning Hand
Knowing How People Are Playing Your Game Gives You the Winning Hand
 
Tales from the Platform Trade
Tales from the Platform TradeTales from the Platform Trade
Tales from the Platform Trade
 
Maxims for Multiplayer Games
Maxims for Multiplayer GamesMaxims for Multiplayer Games
Maxims for Multiplayer Games
 
Crafting an Analytics Strategy
Crafting an Analytics StrategyCrafting an Analytics Strategy
Crafting an Analytics Strategy
 
UCSC Talk on Building Startups
UCSC Talk on Building StartupsUCSC Talk on Building Startups
UCSC Talk on Building Startups
 
On the Startup Team
On the Startup TeamOn the Startup Team
On the Startup Team
 
Scientific revenue unreasonable effectiveness of data
Scientific revenue unreasonable effectiveness of dataScientific revenue unreasonable effectiveness of data
Scientific revenue unreasonable effectiveness of data
 
Taking Virtual Economies to the Next Level
Taking Virtual Economies to the Next LevelTaking Virtual Economies to the Next Level
Taking Virtual Economies to the Next Level
 
Managing a Virtual Economy
Managing a Virtual EconomyManaging a Virtual Economy
Managing a Virtual Economy
 
Applying Retail Strategies to Item Merchandising
Applying Retail Strategies to Item MerchandisingApplying Retail Strategies to Item Merchandising
Applying Retail Strategies to Item Merchandising
 
Managing a Virtual Economy
Managing a Virtual EconomyManaging a Virtual Economy
Managing a Virtual Economy
 
Virtual Worlds and Real Metrics:
Virtual Worlds and Real Metrics:Virtual Worlds and Real Metrics:
Virtual Worlds and Real Metrics:
 
The Evolving Architecture
The Evolving ArchitectureThe Evolving Architecture
The Evolving Architecture
 

Recently uploaded

Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 

Recently uploaded (20)

Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 

Groovy And Grails

  • 1. Cool Web Apps with Grails, Groovy and Next-Gen Scripting Languages William Grosso Twofish
  • 2.
  • 3.
  • 4.
  • 5.
  • 7.
  • 8.
  • 9. Up and running for >3 months without any attention from me
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. But I Wasn’t Completely Right JVM Platform Libraries and Application Frameworks Your App / Your Web App Your Libraries Your Prototypes Down here, Java, super clear semantics, WORA etcetera win Hmm. Community properties probably only matter for largish things that you share or keep and reuse for a long time. Maybe we can do better than Java?
  • 18. Lots of people having similar thoughts. The JVM is robust enough, and the platform is robust enough, and … that people are starting to seriously layer languages on top.
  • 19. Short list of “interesting” languages: Jython JRuby Scala Groovy Kawa Clojure PHP NetRexx (??)
  • 20. Completely a sidenote: If you’re curious about programming language design, this is the single best site on the web
  • 21. Closures have been THE hot topic in commercial language design
  • 22. Odersky’s claim: closures + first class containers + super strong typing are the bees knees
  • 23. Complexity is bad. Java is near the edge of the cliff. 4.5M PDF and a Tiny Thumbnail? For Generics? Ruby has a similar problem (more later)
  • 24. Desiderata for the Tiers JVM Platform Libraries and Application Frameworks Your App Your Libraries Your Prototypes Strong typing Absolutely clear semantics Minimal evolution of language None of the other stuff is necessary Looks like Java Clear, readable code Non-verbose language Complete integration with Java First class containers Closures Great XML support Rapid Prototyping (REPL) Metaobject Protocol
  • 25.
  • 26.  
  • 27. Looks Like Java Go read the code examples It’s easy
  • 28. Let’s Look at Concurrency Not Java def? 1 .. 8 sleep 30 But … it’s close
  • 29.
  • 30. import groovy.swing.*; import java.awt.*; import javax.swing.*; class Model extends Observable { static CURRENCY = [&quot;USD&quot;, &quot;EURO&quot;, &quot;YEN&quot;] private Map rates = new HashMap() private long value void initialize(initialRates) { (0..CURRENCY.size() - 1).each { setRate(CURRENCY[it], initialRates[it]) } } // setting rate for currency void setRate(currency, f) { rates.put(currency, f); setChanged(); notifyObservers(currency); } // setting new value for currency void setValue(currency, double newValue) { value = Math.round(newValue / rates[currency]); setChanged(); notifyObservers(null); } // getter for value for particular currency def getValue(currency) { value * rates[currency] } } class RateView extends JTextField implements Observer { private Model model; private currency; public void setModel(Model model) { this.model?.removeObserver(this) this.model = model model.addObserver(this) } public void update(Observable o, Object currency) { if (this.currency == currency) text = String.format(&quot;%15.2f&quot;, model.rates[currency]) } } class ValueView extends JTextField implements Observer { private Model model private currency public void setModel(Model model) { this.model?.removeObserver(this) this.model = model model.addObserver(this) } public void update(Observable o, Object currency) { if (currency == null || this.currency == currency) text = String.format(&quot;%15.2f&quot;, model.getValue(this.currency)); } }
  • 31. swing = new SwingBuilder() model = new Model() frame = swing.frame(title: &quot;Groovy SwingBuilder MVC Demo&quot;, layout: new GridLayout(4, 3), size: [300, 150], defaultCloseOperation: WindowConstants.EXIT_ON_CLOSE) { label(&quot;currency&quot;) label(&quot;rate&quot;) label(&quot;value&quot;) for (c in Model.CURRENCY) { label(c) widget(new RateView(), model: model, currency: c, action: swing.action(closure: { event -> event.source.model.setRate(event.source.currency, event.source.text.toDouble()); })) widget(new ValueView(), model: model, currency: c, action: swing.action(closure: {event -> event.source.model.setValue(event.source.currency, event.source.text.toDouble()); })) } } frame.show() model.initialize([1.0, 0.83, 0.56]);
  • 32.  
  • 33.  
  • 34.
  • 35. weekMap = [ &quot;Su&quot; : &quot;Sunday&quot;, &quot;Mo&quot; : &quot;Monday&quot;, &quot;Tu&quot; : &quot;Tuesday&quot;, &quot;We&quot; : &quot;Wednesday&quot;, &quot;Th&quot; : &quot;Thursday&quot;, &quot;Fr&quot; : &quot;Friday&quot;, &quot;Sa&quot; : &quot;Saturday&quot; ] weekMap.each() { key, value -> println &quot;${key} == ${value}&quot; }
  • 36.
  • 37.
  • 38.
  • 39. Don’t believe me? Neal likes Java a LOT more than I do
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45. Chris will talk more about GORM later on
  • 46.
  • 47. What’s Martin Fowler been doing since the refactoring book anyway?
  • 48.  
  • 49.
  • 50. MarkupBuilder import groovy.xml.MarkupBuilder def writer = new StringWriter() def xml = new MarkupBuilder(writer) xml.records() { car(name:'HSV Maloo', make:'Holden', year:2006) { country('Australia') record(type:'speed', 'Production Pickup Truck with speed of 271kph') } car(name:'P50', make:'Peel', year:1962) { country('Isle of Man') record(type:'size', 'Smallest Street-Legal Car at 99cm wide and 59 kg in weight') } car(name:'Royale', make:'Bugatti', year:1931) { country('France') record(type:'price', 'Most Valuable Car at $15 million') } } println writer.toString()
  • 51.
  • 52.
  • 53. The Rails guys invented the “movie to demo the framework” idea and their movies are still WOW OH WOW GOOD
  • 54.
  • 55. In 4 years, Rails has made very impressive strides. Market leader in the “early stage startup” category.
  • 56.
  • 57. Backwards compatibility is not a huge priority
  • 58. Backwards compatibility is not a huge priority
  • 60. Of course, Java is mostly developed by Sun ….
  • 61. This is from a Ruby guy who doesn’t like JRuby very much …
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67. SWAG Estimate: About ¾ of plugins are mentioned here (BIRT, for example, is not)
  • 68.
  • 69.
  • 71.
  • 72.
  • 73.
  • 74.
  • 76. This is a great series of articles. Whenever anyone tells you a technology is going to be big, ask yourself: WWTT?
  • 77.  
  • 78.