Gr8Conf 2016 - What's new in Grails 3

Post on 08-Jan-2017

585 views 0 download

Transcript of Gr8Conf 2016 - What's new in Grails 3

What’s new in Grails?

Graeme Rocher Grails Project Lead @graemerocher rocherg@ociweb.com

Grails 3 Status Update• Grails 3.1.8 current release of 3.x

line

• Grails 3.0.x and 2.x in maintenance mode

• Grails 2.x plugins being migrated (the good ones)

New Plugin Portal• Thanks to the Agile Orbit crew!

slack-signup.grails.org

Grails 3 Recap

• New architecture - Spring Boot, Gradle, Profiles

• Same philosophy - Conventions, DRY, Plugins

3.0

Application Profiles

• Not just web applications

• REST APIs, SPA, Big Data, Micro Services

• The world has changed!

• Expand Grails’ reach

Grails 3 Feature Recap

• Grails 3.0.x a solid base for the future

• Foundational components stable

• Great time to jump into plugin development

• Improvements coming all the time!

Then came Grails 3.1

• Spring Boot 1.3, Spring 4.2

• Massive improvements to profiles

• REST (Web API) Profile

• AngularJS Profile

• GORM 5

Announcing Grails 3.2• RxGORM

• MongoDB 3.0 RX driver support

• RxGORM REST client

• GORM Multi Tenancy

• GORM for Neo4j 3.x / Bolt support

• AngularJS scaffolding

• Further refinements to REST support

Profile Improvements

• New Gradle Plugins

• Now just JAR files

• A Profile for creating Profiles!

• Extensibility

The REST Profile

• Easy creation of REST APIs

• Easy customisability with JSON views

• Security support with spring-security-rest

• Integration unit and functional testing

The REST Profile• Profile specific commands:

• create-domain-resource - creates an @Resource domain

• create-restful-controller - Creates a RestfulController

• Default commands provide focused templates

JSON Views

• Statically compiled, extensible JSON views:

json.person{name"bob"}

{"person":{"name":"bob"}}

DEMO - JSON Views

JSON Views• Restoring the V in MVC

• Fast, flexible and expressive

• Pre-compilation for production environments

• Grails 3.2: Template inheritance, global templates, HAL pagination and more

• Find out more http://views.grails.org/1.1.x

The AngularJS Profile

• Extends the REST profile

• Adds project setup for AngularJS

• Code generation for AngularJS

• Grails 3.2: AngularJS scaffolding

The AngularJS Profile• Profile specific commands:

• create-ng-controller - Creates an AngularJS controller

• create-ng-service - Creates an AngularJS service

• Default commands provide focused templates

DEMO - Angular Scaffolding

GORM 5 Suite

• GORM Reborn - Trait based

• Hibernate 5

• MongoDB 3

• Neo4j 2.3

• Cassandra

3.0

GORM 5 - Hibernate

• Support for Hibernate 3, 4 and 5 (and 5.1)

• Completely rewritten and based on traits

• Grails 2, Grails 3, Spring Boot or Standalone

GORM 5 - MongoDB

• Rewritten for MongoDB 3.x driver

• Uses codecs to avoid Document to Object conversion (much faster)

• Grails 2, Grails 3, Spring Boot or Standalone

GORM 5 - Neo4j• Rewritten for Neo4j 2.3.x

• Robust Cypher and Transaction support

• Embedded, REST & HA modes supported

• Grails 2, Grails 3, Spring Boot or Standalone

Announcing GORM 6 Suite

• RxGORM

• MongoDB RX Support

• RxGORM REST Client

• Neo4j 3.x / Bolt Driver

• Native Multi Tenancy

3.0

RxGORM

• GORM for RxJava

• Reactive

• Stateless

• Non-Blocking

• Lightweight

3.0

DEMO - RxGORM

Summary

• Big plans in the future for profiles and the Grails platform

• Grails evolving to tackle new challenges

• The Grails community and plugin ecosystem as important as ever

Q & A

Thank You! Graeme Rocher rocherg@ociweb.com ociweb.com/grails

Come speak to the OCI Grails Team!

Web: grails.org StackOverflow: http://stackoverflow.com/tags/grails

Slack: http://slack-signup.grails.org Twitter: @grailsframework