SlideShare a Scribd company logo
1 of 13
Universal Groovy
JCConf 2016
吳欣展 pcbill
Isomorphic / Universal
Applications which run both client-side and server-side.
The backend and frontend share the same code.
Library (JAR)
Groovy 2.3+(for traits) to javascript ECMA 5
Apache 2 License
Converted code needs grooscript.js
Tools: gradle, grails, npm/bower
Grooscript
WHY?
You have all the Java tools and IDE’s
Don’t repeat code in 2 languages
Single development environment
Don’t learn another “to Javascript” tool
Static typed if you want to
Using Spock to test your codes
FUN !!!
LINKS
Website: http://grooscript.org
Documentation: http://grooscript.org/doc.html
Github: https://github.com/chiquitinxx/grooscript
Demos: https://github.com/chiquitinxx/grooscript-demos
Twitter @grooscript
Try live!: http://grooscript.org/conversions.html
Groovy
UI
component
def <-> var
Expando <->
Javascript object
[ ] <-> [ ]
{ } <-> function() { }
HTML
Builder
Javascript
form(id: 'addTodos') {
h3 'TODO'
ul {
todos.each {
li it
}
li {
input(type: 'text', id: 'actualTodo', value: actualTodo)
button {
yield "Add #${todos.size() + 1}"
}
}
}
}
Reactjs?
http://grooscript.org/react_example.html
Angularjs?
https://devsoap.com/writing-angularjs-applications-in-groovy/
Q & A

More Related Content

What's hot

Django On Jython (for Portland and Boulder Python user groups presentations)
Django On Jython (for Portland and Boulder Python user groups presentations)Django On Jython (for Portland and Boulder Python user groups presentations)
Django On Jython (for Portland and Boulder Python user groups presentations)
Leonardo Soto
 

What's hot (20)

(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi
 
공간정보 스터디 1주차
공간정보 스터디 1주차공간정보 스터디 1주차
공간정보 스터디 1주차
 
Jedi knight
Jedi knightJedi knight
Jedi knight
 
Building APIs using Go
Building APIs using GoBuilding APIs using Go
Building APIs using Go
 
Spring-batch Groovy y Gradle
Spring-batch Groovy y GradleSpring-batch Groovy y Gradle
Spring-batch Groovy y Gradle
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using Golang
 
MeteorJS - How to start
MeteorJS  -  How to startMeteorJS  -  How to start
MeteorJS - How to start
 
Django On Jython (for Portland and Boulder Python user groups presentations)
Django On Jython (for Portland and Boulder Python user groups presentations)Django On Jython (for Portland and Boulder Python user groups presentations)
Django On Jython (for Portland and Boulder Python user groups presentations)
 
Go lang
Go langGo lang
Go lang
 
Portable class library to .NET Standard Extension
Portable class library to .NET Standard ExtensionPortable class library to .NET Standard Extension
Portable class library to .NET Standard Extension
 
Gradle and Android Studio : Best of Friends
Gradle and Android Studio : Best of FriendsGradle and Android Studio : Best of Friends
Gradle and Android Studio : Best of Friends
 
Go, meet Lua
Go, meet LuaGo, meet Lua
Go, meet Lua
 
Chrome Extentions: From HelloWorld to Task note
Chrome Extentions: From HelloWorld to Task noteChrome Extentions: From HelloWorld to Task note
Chrome Extentions: From HelloWorld to Task note
 
A/B test your Android build setup with ASPoet
A/B test your Android build setup with ASPoetA/B test your Android build setup with ASPoet
A/B test your Android build setup with ASPoet
 
HOW TO EXTEND WEBPACK WITH YOUR OWN PLUGINS
HOW TO EXTEND WEBPACK WITH YOUR OWN PLUGINSHOW TO EXTEND WEBPACK WITH YOUR OWN PLUGINS
HOW TO EXTEND WEBPACK WITH YOUR OWN PLUGINS
 
Introduction to webGL
Introduction to webGLIntroduction to webGL
Introduction to webGL
 
Git: be social
Git: be socialGit: be social
Git: be social
 
Go for Mobile Games
Go for Mobile GamesGo for Mobile Games
Go for Mobile Games
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
 
Introduction of Lambda
Introduction of LambdaIntroduction of Lambda
Introduction of Lambda
 

Similar to Universal groovy

The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
Oleg Podsechin
 
Javascript in linux desktop (ICOS ver.)
Javascript in linux desktop (ICOS ver.)Javascript in linux desktop (ICOS ver.)
Javascript in linux desktop (ICOS ver.)
Yuren Ju
 
Javascript in Linux Desktop
Javascript in Linux DesktopJavascript in Linux Desktop
Javascript in Linux Desktop
Yuren Ju
 
Ratpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web AppsRatpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web Apps
James Williams
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
Fred Sauer
 
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx PluginGr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
Yasuharu Nakano
 

Similar to Universal groovy (20)

Grooscript gr8conf 2015
Grooscript gr8conf 2015Grooscript gr8conf 2015
Grooscript gr8conf 2015
 
Grooscript greach
Grooscript greachGrooscript greach
Grooscript greach
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
 
Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2
 
Aplicações realtime com gRPC
Aplicações realtime com gRPCAplicações realtime com gRPC
Aplicações realtime com gRPC
 
Boquet manager
Boquet managerBoquet manager
Boquet manager
 
Introduction to Groovy Monkey
Introduction to Groovy MonkeyIntroduction to Groovy Monkey
Introduction to Groovy Monkey
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
 
Ruby in the Browser - RubyConf 2011
Ruby in the Browser - RubyConf 2011Ruby in the Browser - RubyConf 2011
Ruby in the Browser - RubyConf 2011
 
Javascript in linux desktop (ICOS ver.)
Javascript in linux desktop (ICOS ver.)Javascript in linux desktop (ICOS ver.)
Javascript in linux desktop (ICOS ver.)
 
Groovy on the shell
Groovy on the shellGroovy on the shell
Groovy on the shell
 
Javascript in Linux Desktop
Javascript in Linux DesktopJavascript in Linux Desktop
Javascript in Linux Desktop
 
Mobile Web Apps: State of the Tools
 Mobile Web Apps: State of the Tools Mobile Web Apps: State of the Tools
Mobile Web Apps: State of the Tools
 
Ratpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web AppsRatpack - Classy and Compact Groovy Web Apps
Ratpack - Classy and Compact Groovy Web Apps
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
First Bucharest GTUG event 02 Mar 2010
First Bucharest GTUG event 02 Mar 2010First Bucharest GTUG event 02 Mar 2010
First Bucharest GTUG event 02 Mar 2010
 
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx PluginGr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
 
Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2
 

More from Shin-Jan Wu (7)

使用 Spring boot 快速打造 hateoas 應用
使用 Spring boot 快速打造 hateoas 應用使用 Spring boot 快速打造 hateoas 應用
使用 Spring boot 快速打造 hateoas 應用
 
Jcconf2014 roo and_grails
Jcconf2014 roo and_grailsJcconf2014 roo and_grails
Jcconf2014 roo and_grails
 
2008/11/28 NGC 說明會-Toti Base
2008/11/28 NGC 說明會-Toti Base2008/11/28 NGC 說明會-Toti Base
2008/11/28 NGC 說明會-Toti Base
 
I Sample introduction
I Sample introductionI Sample introduction
I Sample introduction
 
I Sample 20070904
I Sample 20070904I Sample 20070904
I Sample 20070904
 
I Sample 20070801
I Sample 20070801I Sample 20070801
I Sample 20070801
 
iSample's introduction
iSample's introductioniSample's introduction
iSample's introduction
 

Recently uploaded

Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
Kayode Fayemi
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
amilabibi1
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
David Celestin
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 

Recently uploaded (15)

lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of Drupal
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
Proofreading- Basics to Artificial Intelligence Integration - Presentation:Sl...
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdfSOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
SOLID WASTE MANAGEMENT SYSTEM OF FENI PAURASHAVA, BANGLADESH.pdf
 

Universal groovy