SlideShare a Scribd company logo
1 of 49
Download to read offline
Grails 3.0 Preview 
By Graeme Rocher 
© 2014 SpringOne 2GX. All rights reserved. Do not distribute without permission.
Agenda 
§ State of Nation 
§ What’s planned for Grails 2.4? 
§ What’s planned for Grails 3.0? 
§ Summary / Q & A
State of Nation 
§ Grails 2.4.3 most recent version 
§ Grails 2.3.x line at 2.3.9 
§ Hundreds of bugs fixed in the last 3 
months 
§ More than 1,100 plugins now for 
Grails
! 
Grails 2.4 
What’s new? 
2.4
Grails 2.4 
• Spring 4.0 Upgrade 
• Java 8 Support 
• Groovy 2.3 Upgrade 
• Improved @CompileStatic Support 
• Asset Pipeline Plugin 
• Moduralization of Codebase 
• Hibernate Goodies 
• GORM & GSP Standalone 
5 
32..04
Spring 4.0 / 4.1 
• Native GroovyBeanDefinitionReader 
(ported from BeanBuilder) 
– https://spring.io/blog/2014/03/03/groovy-bean- 
configuration-in-spring-framework-4 
• Spring Web Socket 
– http://grails.org/plugin/spring-websocket 
6
Groovy 2.3 
• Traits 
• Java 8 
• Implicit closure coercion 
• Lots more! 
• http://docs.codehaus.org/ 
display/GROOVY/Groovy 
+2.3+release+notes 
7
Other Notable Updates 
• Java 8 Support 
• Hibernate 4.3.5 now default 
• AspectJ 1.8 with Java 8 support 
• Eclipse Aether 1.0.0 
• Fewer Overall Dependencies 
8
Modularization 
9 
grails-web 
grails-web-mvc 
grails-web-sitemesh 
grails-web-common 
grails-web-servlet 
grails-web-gsp grails-web-jsp 
grails-core 
grails-encoder 
grails-project-api 
grails-validation
Asset Pipeline Plugin 
• Resources replaced with Asset 
Pipeline 
– https://github.com/bertramdev/asset-pipeline/ 
wiki/Why-asset-pipeline-over-grails- 
resources-plugin 
• Full documentation 
– http://bertramdev.github.io/asset-pipeline/ 
• Many thanks to David Estes! 
10
Standalone 
• GORM for Hibernate 4 in Spring Boot 
– https://spring.io/guides/gs/accessing-data-gorm/ 
• GORM for MongoDB in Spring Boot 
– https://spring.io/guides/gs/accessing-data-gorm-mongodb/ 
• GSP standalone 
– https://github.com/grails/grails-boot/tree/master/sample-apps/ 
gsp 
11
@GrailsCompileStatic 
• Grails-aware version of Groovy’s @CompileStatic 
12 
import 
grails.compiler.* 
! 
@GrailsCompileStatic 
class 
BookController 
{ 
… 
}
Maven-style Dependency Management 
• Use management block to declare managed dependencies 
13 
! 
management 
{ 
dependency 
"commons-­‐logging:commons-­‐ 
logging:1.1.3" 
}
Hibernate Subqueries 
• Perform nested “in” or “notIn” sub queries that span domain 
classes using where queries: 
14 
def 
employees 
= 
Employee.where 
{ 
region.continent 
in 
['APAC', 
"EMEA"] 
}.id() 
! 
def 
results 
= 
Sale.where 
{ 
employee 
in 
employees 
&& 
total 
> 
50000 
}.employee.list()
Hibernate Correlated Subqueries 
• Declare aliases using “def” for cross query references: 
15 
def 
query 
= 
Employee.where 
{ 
def 
em1 
= 
Employee 
exists 
Sale.where 
{ 
def 
s1 
= 
Sale 
def 
em2 
= 
employee 
return 
em2.id 
== 
em1.id 
}.id() 
} 
def 
results 
= 
query.list()
Hibernate Column Readers/Writers 
• Implement custom column readers and writers to transform 
data when written or read from the database. 
16 
Name 
{ 
String 
title 
static 
class 
mapping 
= 
{ 
title 
write:'UPPER(?)', 
read:'REPEAT(title, 
2)' 
} 
}
Hibernate 4 in Unit Tests (Coming Soon) 
• Test Hibernate 4 interaction in unit tests 
17 
import 
grails.test.mixin.hibernate.* 
! 
@TestMixin(HibernateTestMixin) 
class 
PersonSpec 
extends 
Specification{ 
void 
setupSpec() 
{ 
hibernateDomain([Person]) 
} 
… 
}
GORM for MongoDB 3.0 
• Support for MongoDB 2.6 
• GeoJSON type support 
• Maps of entities 
• Full Text Search 
• Projections using Aggregations 
• Size queries (sizeEq, sizeLt etc.) 
• Spring Boot 
– https://spring.io/guides/gs/accessing-data- 
gorm-mongodb/ 
18
New Maven Plugin 2.4.3 
• Upgraded to Maven 3.1+ 
• Rewritten to use Aether for dependency resolution as per 
recommendations 
• Can now be used with multiple versions of Grails: 
19 
<configuration> 
<grailsVersion>2.3.8</grailsVersion> 
</configuration>
Grails 2.4.x TODOs 
• Grails 2.4.4 - Out Soon 
• Spring Security Core 2.0 GA 
• Spring Web Flow Plugin Update 
• Bug Fixes 
20 
2.4
! 
Q & A 
Grails 2.4 
2.4
! 
The Future 
Grails 3.0 
3.0
Grails 3.0: Goals 
• Embrace Gradle 
• Abstract Packaging / Deployment 
• Reach outside the Servlet Container 
• App Profiles: Netty, Servlet, Batch, 
Hadoop 
• Deployment with run-app / runnable 
JARs 
• Extend the reach of Grails 
23 
33..00
Grails 3.0: Goals 
• Build on Spring Boot 
• Plugin System & Events 
• Support Multi Project Builds 
• Support Micro Services 
• Remove Bloat 
• Reduce Dependencies 
24 
33..00
Spring IO Platform Reprise 
25 
XD GRAILS 
Bootable, Minimal, Ops-Ready 
INTEGRATION BATCH BIG DATA WEB 
Jobs, Steps, Ingestion, Channels, Adapters, Export, Controllers, REST, 
SPRING CORE 
FRAMEWOR SECURIT GROOV REACTO 
DATA 
RELATIONA NON-BOOT 
IO 
IO
Spring IO Platform 
26 
Grails 
Spring IO Platform 
Spring XD 
Spring Foundation 
Apps 
Spring Boot 
3rd Party Dependencies
Spring IO & Grails 
• What does Spring IO bring to Grails? 
– Standardised dependency management 
– Published BOMs for use with Maven & Gradle 
– Foundational libraries 
– See more http://docs.spring.io/platform/docs/current/ 
reference/htmlsingle/ 
27 
dependencies 
{ 
compile 
'commons-­‐lang:commons-­‐lang' 
}
Gradle 
• Deprecate existing build system 
• Replace with Gradle build 
• Easier now everything is forked in 2.3.x 
• All the flexibility of a powerful build 
system 
• Separate build plugins can provide 
Gradle extensions 
28
Plugin Delineation 
29 
Grails.sh 
Static void main 
Gradle Build 
test-app 
console 
Forked Grails Runtime 
run-app shell 
Codegen 
Plugins 
Build Time 
Plugins 
Runtime 
Plugins
Gradle 
• Allow Micro or Monolith Applications 
• Multi-Project Plugin Architectures 
• Run individual sub projects 
• Or run as a whole 
30
! 
Demo 
Grails 3.0 
Gradle 
3.0
Spring Boot 
• Grails 3.0 to be built on Spring Boot 
• Boot to handle 
• Embedded servers 
• Runnable JARs 
• WAR packaging 
• Scripting / Micro Services 
32
Why Spring Boot? 
• Handles Fat JAR and embedding 
• Already supports different runtimes 
• Includes monitoring and health 
checks 
• Grails can take advantage of Boot 
auto configuration 
33
Boot Powered Micro Services 
34 
@Grab("com.h2database:h2:1.3.173") 
import 
grails.persistence.* 
! 
@Entity 
@Resource(uri='/books') 
class 
Book 
{ 
String 
title 
}
! 
Demo 
Grails 3.0 
Micro Services 
3.0
Deprecations / Removals 
• Servlet 2.5 support (no web.xml) 
• Gant & Current Build System 
• GDoc - Replaced by AsciiDoctor 
• Integration Tests - Replaced by more 
Mixins 
• Converters / Codecs plugins - 
Replaced by Groovy extensions 
• Filters - Replaced by new mechanism 
36
Servlet 3.0 only and no web.xml 
• Thanks to Spring Boot, new servlets and filters can just be 
Spring beans 
37 
! 
def 
doWithSpring 
= 
{ 
characterEncodingFilter( 
CharacterEncodingFilter) 
{ 
encoding 
='utf-­‐8' 
} 
}
Simplification 
• Removed 
– UrlMappingsFilter 
– GrailsDispatcherServlet 
– SimpleGrailsController 
– Sitemesh Filter 
38
Old Grails 2.x Flow 
39 
GrailsPageFilter UrlMappingsFilter 
GrailsDispatherServlet 
Decorate Request Forward Request 
GrailsController 
Delegate Request
Grails 3.0 Flow 
• GrailsDispatcherSerlvet 50 lines of code in 3.x, 
but 545 lines in 2.x 
40 
DispatcherServlet 
GrailsController 
Delegate Request
Benefits of Simplification 
• Less code to maintain 
• Better performance 
• Better integration with Spring 
• Fewer dependencies 
• commons-fileupload gone 
• No internal forwarding 
41
Evolution of Metaprogramming 
42 
Grails 1.x Grails 2.x Grails 3.x 
Runtime 
Metaprogramming 
(ExpandoMetaClass) 
Compile time 
Metaprogramming 
(AST Transforms) 
Traits & 
Transforms
Grails 3.0 & Groovy Traits 
• Most logic previously added via AST transforms will now be 
added by Traits 
– (Cases not possible as Trait done with transforms) 
43 
trait 
Controller 
{ 
… 
def 
withFormat(Closure 
callable) 
{ 
… 
} 
}
Application Profiles 
• Each profile will have distinct plugins, runtimes and 
packaging (JAR, WAR etc.) 
44 
! 
$ 
grails 
create-­‐app 
myapp 
-­‐-­‐profile=netty 
$ 
cd 
myapp 
$ 
grails 
package 
$ 
java 
-­‐jar 
target/myapp.jar 
!
Application Profiles 
• Extensible profiles with an API exposing structure 
• Profile specific commands (run, package, test) 
• Profile specific plugins 
• Profile specific project templates and file templates (code 
generators) backed by Git 
• Community maintained profiles and core profiles 
45
Profile Repository 
• All Profiles managed by git 
• Profiles checked out locally and periodically updated 
• Profiles wrap code generation infrastructure 
46 
$ 
grails 
create-­‐controller 
foo 
! 
Profile 
.getCurrentProfile() 
.getCommand('create-­‐controller') 
.execute( 
'foo' 
)
Grails 3.0: Challenges 
• Compatibility 
– Plugins 
– Build System 
• Modularization 
– Servlet API independence 
– Refactoring 
47 
3.0
! 
Q & A 
Grails 3.0 
3.0
Stay Connected. 
! 
! 
! 
! 
Web: grails.org 
StackOverflow: http://stackoverflow.com/tags/grails 
Twitter: twitter.com/grailsframework 
LinkedIn: http://linkedin.com/groups/Grails-User-Group-39757 
Google+: https://plus.google.com/communities/ 
109558563916416343008

More Related Content

What's hot

Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Provectus
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
GR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web FrameworkDaniel Woods
 
Continuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsContinuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsSunil Dalal
 
Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.Stfalcon Meetups
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDan Stine
 
Building Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksBuilding Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksMike Hugo
 
Spring Boot on Amazon Web Services with Spring Cloud AWS
Spring Boot on Amazon Web Services with Spring Cloud AWSSpring Boot on Amazon Web Services with Spring Cloud AWS
Spring Boot on Amazon Web Services with Spring Cloud AWSVMware Tanzu
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Martin Bergljung
 
Git.From thorns to the stars
Git.From thorns to the starsGit.From thorns to the stars
Git.From thorns to the starsStrannik_2013
 
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...VMware Tanzu
 
Building Web Apps in Ratpack
Building Web Apps in RatpackBuilding Web Apps in Ratpack
Building Web Apps in RatpackDaniel Woods
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVMRyan Cuprak
 
Dropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stackDropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stackJacek Furmankiewicz
 
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014Arun Gupta
 
Top 10 reasons to migrate to Gradle
Top 10 reasons to migrate to GradleTop 10 reasons to migrate to Gradle
Top 10 reasons to migrate to GradleStrannik_2013
 

What's hot (20)

Gradle
GradleGradle
Gradle
 
Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
GR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting Grails
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
Continuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsContinuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applications
 
Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.
 
GR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug inGR8Conf 2011: Grails, how to plug in
GR8Conf 2011: Grails, how to plug in
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and Liquibase
 
Building Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksBuilding Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And Tricks
 
Spring Boot on Amazon Web Services with Spring Cloud AWS
Spring Boot on Amazon Web Services with Spring Cloud AWSSpring Boot on Amazon Web Services with Spring Cloud AWS
Spring Boot on Amazon Web Services with Spring Cloud AWS
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
 
Git.From thorns to the stars
Git.From thorns to the starsGit.From thorns to the stars
Git.From thorns to the stars
 
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
The Making of the Oracle R2DBC Driver and How to Take Your Code from Synchron...
 
Building Web Apps in Ratpack
Building Web Apps in RatpackBuilding Web Apps in Ratpack
Building Web Apps in Ratpack
 
Polygot Java EE on the GraalVM
Polygot Java EE on the GraalVMPolygot Java EE on the GraalVM
Polygot Java EE on the GraalVM
 
Building with Gradle
Building with GradleBuilding with Gradle
Building with Gradle
 
Dropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stackDropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stack
 
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
 
Top 10 reasons to migrate to Gradle
Top 10 reasons to migrate to GradleTop 10 reasons to migrate to Gradle
Top 10 reasons to migrate to Gradle
 

Similar to Grails 3.0 Preview

Gr8Conf 2016 - What's new in Grails 3
Gr8Conf 2016 - What's new in Grails 3Gr8Conf 2016 - What's new in Grails 3
Gr8Conf 2016 - What's new in Grails 3graemerocher
 
Fast web development using groovy on grails
Fast web development using groovy on grailsFast web development using groovy on grails
Fast web development using groovy on grailsAnshuman Biswal
 
Dropwizard and Groovy
Dropwizard and GroovyDropwizard and Groovy
Dropwizard and Groovytomaslin
 
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB MeetupMariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB MeetupColin Charles
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDAleksandr Maklakov
 
Digdag Updates 2020 July
Digdag Updates 2020 JulyDigdag Updates 2020 July
Digdag Updates 2020 JulyYou Yamagata
 
Groovy In the Cloud
Groovy In the CloudGroovy In the Cloud
Groovy In the CloudJim Driscoll
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache UsergridDavid M. Johnson
 
Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019graemerocher
 
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius SchumacherOSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius SchumacherNETWAYS
 
Extjs3.4 Migration Notes
Extjs3.4 Migration NotesExtjs3.4 Migration Notes
Extjs3.4 Migration NotesSimoAmi
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Markus Eisele
 
Introduction to Grails 2013
Introduction to Grails 2013Introduction to Grails 2013
Introduction to Grails 2013Gavin Hogan
 
GR8CONF Contributing Back To Grails
GR8CONF Contributing Back To GrailsGR8CONF Contributing Back To Grails
GR8CONF Contributing Back To Grailsbobbywarner
 
Mastering Grails 3 Plugins - GR8Conf US 2016
Mastering Grails 3 Plugins - GR8Conf US 2016Mastering Grails 3 Plugins - GR8Conf US 2016
Mastering Grails 3 Plugins - GR8Conf US 2016Alvaro Sanchez-Mariscal
 
Performance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverPerformance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverBlazeMeter
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and ActivatorKevin Webber
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGroup
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAppDynamics
 
GraalVM and Oracle's Documentation Trends.pdf
GraalVM and Oracle's Documentation Trends.pdfGraalVM and Oracle's Documentation Trends.pdf
GraalVM and Oracle's Documentation Trends.pdfohupalo
 

Similar to Grails 3.0 Preview (20)

Gr8Conf 2016 - What's new in Grails 3
Gr8Conf 2016 - What's new in Grails 3Gr8Conf 2016 - What's new in Grails 3
Gr8Conf 2016 - What's new in Grails 3
 
Fast web development using groovy on grails
Fast web development using groovy on grailsFast web development using groovy on grails
Fast web development using groovy on grails
 
Dropwizard and Groovy
Dropwizard and GroovyDropwizard and Groovy
Dropwizard and Groovy
 
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB MeetupMariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLD
 
Digdag Updates 2020 July
Digdag Updates 2020 JulyDigdag Updates 2020 July
Digdag Updates 2020 July
 
Groovy In the Cloud
Groovy In the CloudGroovy In the Cloud
Groovy In the Cloud
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019
 
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius SchumacherOSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
OSDC 2018 | Highly Available Cloud Foundry on Kubernetes by Cornelius Schumacher
 
Extjs3.4 Migration Notes
Extjs3.4 Migration NotesExtjs3.4 Migration Notes
Extjs3.4 Migration Notes
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Introduction to Grails 2013
Introduction to Grails 2013Introduction to Grails 2013
Introduction to Grails 2013
 
GR8CONF Contributing Back To Grails
GR8CONF Contributing Back To GrailsGR8CONF Contributing Back To Grails
GR8CONF Contributing Back To Grails
 
Mastering Grails 3 Plugins - GR8Conf US 2016
Mastering Grails 3 Plugins - GR8Conf US 2016Mastering Grails 3 Plugins - GR8Conf US 2016
Mastering Grails 3 Plugins - GR8Conf US 2016
 
Performance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverPerformance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & Webdriver
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 
GraalVM and Oracle's Documentation Trends.pdf
GraalVM and Oracle's Documentation Trends.pdfGraalVM and Oracle's Documentation Trends.pdf
GraalVM and Oracle's Documentation Trends.pdf
 

More from graemerocher

Micronaut: Evolving Java for the Microservices and Serverless Era
Micronaut: Evolving Java for the Microservices and Serverless EraMicronaut: Evolving Java for the Microservices and Serverless Era
Micronaut: Evolving Java for the Microservices and Serverless Eragraemerocher
 
Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019graemerocher
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019graemerocher
 
Grails 4 and Micronaut at Devnexus 2019
Grails 4 and Micronaut at Devnexus 2019Grails 4 and Micronaut at Devnexus 2019
Grails 4 and Micronaut at Devnexus 2019graemerocher
 
Micronaut and the Power of Ahead of Time Compilation - Devnexus 2019
Micronaut and the Power of Ahead of Time Compilation - Devnexus 2019Micronaut and the Power of Ahead of Time Compilation - Devnexus 2019
Micronaut and the Power of Ahead of Time Compilation - Devnexus 2019graemerocher
 
Micronaut Deep Dive - Devnexus 2019
Micronaut Deep Dive - Devnexus 2019Micronaut Deep Dive - Devnexus 2019
Micronaut Deep Dive - Devnexus 2019graemerocher
 
Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018graemerocher
 

More from graemerocher (7)

Micronaut: Evolving Java for the Microservices and Serverless Era
Micronaut: Evolving Java for the Microservices and Serverless EraMicronaut: Evolving Java for the Microservices and Serverless Era
Micronaut: Evolving Java for the Microservices and Serverless Era
 
Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019
 
Grails 4 and Micronaut at Devnexus 2019
Grails 4 and Micronaut at Devnexus 2019Grails 4 and Micronaut at Devnexus 2019
Grails 4 and Micronaut at Devnexus 2019
 
Micronaut and the Power of Ahead of Time Compilation - Devnexus 2019
Micronaut and the Power of Ahead of Time Compilation - Devnexus 2019Micronaut and the Power of Ahead of Time Compilation - Devnexus 2019
Micronaut and the Power of Ahead of Time Compilation - Devnexus 2019
 
Micronaut Deep Dive - Devnexus 2019
Micronaut Deep Dive - Devnexus 2019Micronaut Deep Dive - Devnexus 2019
Micronaut Deep Dive - Devnexus 2019
 
Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018
 

Recently uploaded

Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 

Recently uploaded (20)

Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 

Grails 3.0 Preview

  • 1. Grails 3.0 Preview By Graeme Rocher © 2014 SpringOne 2GX. All rights reserved. Do not distribute without permission.
  • 2. Agenda § State of Nation § What’s planned for Grails 2.4? § What’s planned for Grails 3.0? § Summary / Q & A
  • 3. State of Nation § Grails 2.4.3 most recent version § Grails 2.3.x line at 2.3.9 § Hundreds of bugs fixed in the last 3 months § More than 1,100 plugins now for Grails
  • 4. ! Grails 2.4 What’s new? 2.4
  • 5. Grails 2.4 • Spring 4.0 Upgrade • Java 8 Support • Groovy 2.3 Upgrade • Improved @CompileStatic Support • Asset Pipeline Plugin • Moduralization of Codebase • Hibernate Goodies • GORM & GSP Standalone 5 32..04
  • 6. Spring 4.0 / 4.1 • Native GroovyBeanDefinitionReader (ported from BeanBuilder) – https://spring.io/blog/2014/03/03/groovy-bean- configuration-in-spring-framework-4 • Spring Web Socket – http://grails.org/plugin/spring-websocket 6
  • 7. Groovy 2.3 • Traits • Java 8 • Implicit closure coercion • Lots more! • http://docs.codehaus.org/ display/GROOVY/Groovy +2.3+release+notes 7
  • 8. Other Notable Updates • Java 8 Support • Hibernate 4.3.5 now default • AspectJ 1.8 with Java 8 support • Eclipse Aether 1.0.0 • Fewer Overall Dependencies 8
  • 9. Modularization 9 grails-web grails-web-mvc grails-web-sitemesh grails-web-common grails-web-servlet grails-web-gsp grails-web-jsp grails-core grails-encoder grails-project-api grails-validation
  • 10. Asset Pipeline Plugin • Resources replaced with Asset Pipeline – https://github.com/bertramdev/asset-pipeline/ wiki/Why-asset-pipeline-over-grails- resources-plugin • Full documentation – http://bertramdev.github.io/asset-pipeline/ • Many thanks to David Estes! 10
  • 11. Standalone • GORM for Hibernate 4 in Spring Boot – https://spring.io/guides/gs/accessing-data-gorm/ • GORM for MongoDB in Spring Boot – https://spring.io/guides/gs/accessing-data-gorm-mongodb/ • GSP standalone – https://github.com/grails/grails-boot/tree/master/sample-apps/ gsp 11
  • 12. @GrailsCompileStatic • Grails-aware version of Groovy’s @CompileStatic 12 import grails.compiler.* ! @GrailsCompileStatic class BookController { … }
  • 13. Maven-style Dependency Management • Use management block to declare managed dependencies 13 ! management { dependency "commons-­‐logging:commons-­‐ logging:1.1.3" }
  • 14. Hibernate Subqueries • Perform nested “in” or “notIn” sub queries that span domain classes using where queries: 14 def employees = Employee.where { region.continent in ['APAC', "EMEA"] }.id() ! def results = Sale.where { employee in employees && total > 50000 }.employee.list()
  • 15. Hibernate Correlated Subqueries • Declare aliases using “def” for cross query references: 15 def query = Employee.where { def em1 = Employee exists Sale.where { def s1 = Sale def em2 = employee return em2.id == em1.id }.id() } def results = query.list()
  • 16. Hibernate Column Readers/Writers • Implement custom column readers and writers to transform data when written or read from the database. 16 Name { String title static class mapping = { title write:'UPPER(?)', read:'REPEAT(title, 2)' } }
  • 17. Hibernate 4 in Unit Tests (Coming Soon) • Test Hibernate 4 interaction in unit tests 17 import grails.test.mixin.hibernate.* ! @TestMixin(HibernateTestMixin) class PersonSpec extends Specification{ void setupSpec() { hibernateDomain([Person]) } … }
  • 18. GORM for MongoDB 3.0 • Support for MongoDB 2.6 • GeoJSON type support • Maps of entities • Full Text Search • Projections using Aggregations • Size queries (sizeEq, sizeLt etc.) • Spring Boot – https://spring.io/guides/gs/accessing-data- gorm-mongodb/ 18
  • 19. New Maven Plugin 2.4.3 • Upgraded to Maven 3.1+ • Rewritten to use Aether for dependency resolution as per recommendations • Can now be used with multiple versions of Grails: 19 <configuration> <grailsVersion>2.3.8</grailsVersion> </configuration>
  • 20. Grails 2.4.x TODOs • Grails 2.4.4 - Out Soon • Spring Security Core 2.0 GA • Spring Web Flow Plugin Update • Bug Fixes 20 2.4
  • 21. ! Q & A Grails 2.4 2.4
  • 22. ! The Future Grails 3.0 3.0
  • 23. Grails 3.0: Goals • Embrace Gradle • Abstract Packaging / Deployment • Reach outside the Servlet Container • App Profiles: Netty, Servlet, Batch, Hadoop • Deployment with run-app / runnable JARs • Extend the reach of Grails 23 33..00
  • 24. Grails 3.0: Goals • Build on Spring Boot • Plugin System & Events • Support Multi Project Builds • Support Micro Services • Remove Bloat • Reduce Dependencies 24 33..00
  • 25. Spring IO Platform Reprise 25 XD GRAILS Bootable, Minimal, Ops-Ready INTEGRATION BATCH BIG DATA WEB Jobs, Steps, Ingestion, Channels, Adapters, Export, Controllers, REST, SPRING CORE FRAMEWOR SECURIT GROOV REACTO DATA RELATIONA NON-BOOT IO IO
  • 26. Spring IO Platform 26 Grails Spring IO Platform Spring XD Spring Foundation Apps Spring Boot 3rd Party Dependencies
  • 27. Spring IO & Grails • What does Spring IO bring to Grails? – Standardised dependency management – Published BOMs for use with Maven & Gradle – Foundational libraries – See more http://docs.spring.io/platform/docs/current/ reference/htmlsingle/ 27 dependencies { compile 'commons-­‐lang:commons-­‐lang' }
  • 28. Gradle • Deprecate existing build system • Replace with Gradle build • Easier now everything is forked in 2.3.x • All the flexibility of a powerful build system • Separate build plugins can provide Gradle extensions 28
  • 29. Plugin Delineation 29 Grails.sh Static void main Gradle Build test-app console Forked Grails Runtime run-app shell Codegen Plugins Build Time Plugins Runtime Plugins
  • 30. Gradle • Allow Micro or Monolith Applications • Multi-Project Plugin Architectures • Run individual sub projects • Or run as a whole 30
  • 31. ! Demo Grails 3.0 Gradle 3.0
  • 32. Spring Boot • Grails 3.0 to be built on Spring Boot • Boot to handle • Embedded servers • Runnable JARs • WAR packaging • Scripting / Micro Services 32
  • 33. Why Spring Boot? • Handles Fat JAR and embedding • Already supports different runtimes • Includes monitoring and health checks • Grails can take advantage of Boot auto configuration 33
  • 34. Boot Powered Micro Services 34 @Grab("com.h2database:h2:1.3.173") import grails.persistence.* ! @Entity @Resource(uri='/books') class Book { String title }
  • 35. ! Demo Grails 3.0 Micro Services 3.0
  • 36. Deprecations / Removals • Servlet 2.5 support (no web.xml) • Gant & Current Build System • GDoc - Replaced by AsciiDoctor • Integration Tests - Replaced by more Mixins • Converters / Codecs plugins - Replaced by Groovy extensions • Filters - Replaced by new mechanism 36
  • 37. Servlet 3.0 only and no web.xml • Thanks to Spring Boot, new servlets and filters can just be Spring beans 37 ! def doWithSpring = { characterEncodingFilter( CharacterEncodingFilter) { encoding ='utf-­‐8' } }
  • 38. Simplification • Removed – UrlMappingsFilter – GrailsDispatcherServlet – SimpleGrailsController – Sitemesh Filter 38
  • 39. Old Grails 2.x Flow 39 GrailsPageFilter UrlMappingsFilter GrailsDispatherServlet Decorate Request Forward Request GrailsController Delegate Request
  • 40. Grails 3.0 Flow • GrailsDispatcherSerlvet 50 lines of code in 3.x, but 545 lines in 2.x 40 DispatcherServlet GrailsController Delegate Request
  • 41. Benefits of Simplification • Less code to maintain • Better performance • Better integration with Spring • Fewer dependencies • commons-fileupload gone • No internal forwarding 41
  • 42. Evolution of Metaprogramming 42 Grails 1.x Grails 2.x Grails 3.x Runtime Metaprogramming (ExpandoMetaClass) Compile time Metaprogramming (AST Transforms) Traits & Transforms
  • 43. Grails 3.0 & Groovy Traits • Most logic previously added via AST transforms will now be added by Traits – (Cases not possible as Trait done with transforms) 43 trait Controller { … def withFormat(Closure callable) { … } }
  • 44. Application Profiles • Each profile will have distinct plugins, runtimes and packaging (JAR, WAR etc.) 44 ! $ grails create-­‐app myapp -­‐-­‐profile=netty $ cd myapp $ grails package $ java -­‐jar target/myapp.jar !
  • 45. Application Profiles • Extensible profiles with an API exposing structure • Profile specific commands (run, package, test) • Profile specific plugins • Profile specific project templates and file templates (code generators) backed by Git • Community maintained profiles and core profiles 45
  • 46. Profile Repository • All Profiles managed by git • Profiles checked out locally and periodically updated • Profiles wrap code generation infrastructure 46 $ grails create-­‐controller foo ! Profile .getCurrentProfile() .getCommand('create-­‐controller') .execute( 'foo' )
  • 47. Grails 3.0: Challenges • Compatibility – Plugins – Build System • Modularization – Servlet API independence – Refactoring 47 3.0
  • 48. ! Q & A Grails 3.0 3.0
  • 49. Stay Connected. ! ! ! ! Web: grails.org StackOverflow: http://stackoverflow.com/tags/grails Twitter: twitter.com/grailsframework LinkedIn: http://linkedin.com/groups/Grails-User-Group-39757 Google+: https://plus.google.com/communities/ 109558563916416343008