SlideShare a Scribd company logo
Creating applications
with Grails, Angular JS
and Spring Security
Álvaro Sánchez-Mariscal
Álvaro Sánchez-Mariscal
Software Engineer
Grails Development Team
@alvaro_sanchez
sanchezmariscala@ociweb.com
Creating applications with Grails, Angular JS and Spring Security
OCI is the new home of Grails
More at ociweb.com/grails
Grails 3 update
Grails 3 status update
• v3.1.4 is the latest stable version.
• v3.2 is the current development version.
• Older versions:
• v3.0.15 for 3.0.x line.
• v2.5.4 for 2.5.x line.
Grails 3.0 recap
• New architecture.
• Spring Boot, Gradle, profiles.
• Same philosophy.
• Conventions, DRY, plugins.
Grails 3.1 recap
• Spring Boot 1.3, Spring 4.2.
• Massive improvements to profiles.
• Packaging and publishing.
• REST and Angular JS profile.
• JSON views.
• GORM 5.
Grails 3.1 recap
• GORM 5.
• Hibernate 3, 4 and 5.
• MongoDB 3
• Neo4j 2.3
• Cassandra
What’s coming in Grails 3.2?
• GORM 6.
• GORM REST Client.
• Non-blocking GORM API.
• MongoDB 3.0 Async driver support.
• GORM Multi Tenancy Support.
• AngularJS scaffolding.
• Dynamic and static.
… and in Grails 3.3
• Netty-based Profile.
• Low memory footprint, non-blocking.
• Support for controllers, REST, GORM and
Angular JS.
• PostgreSQL Async Support.
• Lightweight GORM-SQL abstraction.
Upcoming conferences
• Greach 2016.
• Madrid, Spain. April 8-9.
• http://greachconf.com
Upcoming conferences
• GR8Conf EU 2016.
• Copenhagen, Denmark. June 1-3.
• http://gr8conf.eu
Upcoming conferences
• G3 Summit.
• Fort Lauderdale, Florida, USA.
• Nov 28 - Dec 1, 2016.
• https://g3summit.com
Join the community
slack-signup.grails.org
Creating REST
API’s with Grails
The REST Profile
• Targeted at building REST applications.
• REST Specific plugins and commands.
• No GSP, asset pipeline, UI plugins.
• JSON / Markup views instead.
The REST Profile
• Profile specific commands:
• create-domain-resource - creates an
@Resource domain
• create-restful-controller - creates a
RestfulController
The REST Profile
• Statically compiled, extensible JSON views:
json.person	{	
		name	"bob"	
}	
{"person":{"name":"bob"}}
Create the project
$ grails create-app -profile rest-api
-features hibernate,json-views todo
| Application created at /tmp/todo
REST Domain class
package com.example



import grails.rest.Resource



@Resource(uri = '/todos', formats = ['json'])

class Todo {



String description

boolean completed



}
RESTful Controller
package com.example



import grails.rest.RestfulController



class TodoController extends RestfulController {



static responseFormats = ['json']



TodoController() {

super(Todo)

}



def pending() {

respond Todo.findAllByCompleted(false), view: 'index'

}

}
URL Mappings
“/todos"(resources:"todo")
"/pending"(controller: 'todo', action: 'pending')

JSON View
import com.example.Todo



model {

Todo todo

}



json {

hal.links(todo)

id todo.id

description todo.description

completed todo.completed

}
Working with the
Angular JS profile
The Angular JS Profile
• Extends the REST profile.
• Adds project setup for AngularJS.
• Code generation for AngularJS.
• Scaffolding coming soon.
The Angular JS Profile
• Profile specific commands:
• create-ng-controller
• create-ng-service	
• create-ng-domain	
• create-ng-directive	
• create-ng-component	
• create-ng-module
Create the project
$ grails create-app -profile angular
-features hibernate,json-views todo
| Application created at /tmp/todo
Adding Security with
Spring Security REST
Spring Security REST
• Compatibility layer over Spring Security Core.
• Login and logout REST endpoints.
• Token validation filter.
• Stateless by default, with JWT (signed and encrypted)
• Memcached, Redis, GORM and Grails Cache token storages.
• Implicit grant support through 3rd party providers.
• RFC 6750 Bearer Token support.
Create the project
$ grails create-app -profile angular
-features hibernate,json-views,security todo
| Application created at /tmp/todo
Dziękuję bardzo!
Álvaro Sánchez-Mariscal

More Related Content

What's hot (20)

PDF
Mastering Grails 3 Plugins - G3 Summit 2016
Alvaro Sanchez-Mariscal
 
PDF
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
Alvaro Sanchez-Mariscal
 
PDF
Using React with Grails 3
Zachary Klein
 
PDF
Gr8Conf 2016 - GORM Inside and Out
graemerocher
 
PPT
Introduction To Grails
Christopher Bartling
 
KEY
Capybara
Mona Soni
 
PDF
Gr8Conf 2016 - What's new in Grails 3
graemerocher
 
PDF
Getting Started With Angular
Stormpath
 
PDF
Creating RESTful API’s with Grails and Spring Security
Alvaro Sanchez-Mariscal
 
PDF
JHipster
Yuen-Kuei Hsueh
 
PPT
Introduction to Grails
Hiten Pratap Singh
 
PDF
Swagger UI
Walaa Hamdy Assy
 
PDF
Simple REST-APIs with Dropwizard and Swagger
LeanIX GmbH
 
PDF
Fastest to Mobile with Scalatra + Swagger
Tony Tam
 
PDF
Icinga 2 - Apify them all at Icinga Camp Amsterdam 2016
Icinga
 
PPTX
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Maarten Balliauw
 
PPTX
Monitoring as Code - Ignite
Icinga
 
PDF
Maarten Balliauw "Indexing and searching NuGet.org with Azure Functions and S...
Fwdays
 
PDF
How to generate a REST CXF3 application from Swagger ApacheConEU 2016
johannes_fiala
 
Mastering Grails 3 Plugins - G3 Summit 2016
Alvaro Sanchez-Mariscal
 
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
Alvaro Sanchez-Mariscal
 
Using React with Grails 3
Zachary Klein
 
Gr8Conf 2016 - GORM Inside and Out
graemerocher
 
Introduction To Grails
Christopher Bartling
 
Capybara
Mona Soni
 
Gr8Conf 2016 - What's new in Grails 3
graemerocher
 
Getting Started With Angular
Stormpath
 
Creating RESTful API’s with Grails and Spring Security
Alvaro Sanchez-Mariscal
 
JHipster
Yuen-Kuei Hsueh
 
Introduction to Grails
Hiten Pratap Singh
 
Swagger UI
Walaa Hamdy Assy
 
Simple REST-APIs with Dropwizard and Swagger
LeanIX GmbH
 
Fastest to Mobile with Scalatra + Swagger
Tony Tam
 
Icinga 2 - Apify them all at Icinga Camp Amsterdam 2016
Icinga
 
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Maarten Balliauw
 
Monitoring as Code - Ignite
Icinga
 
Maarten Balliauw "Indexing and searching NuGet.org with Azure Functions and S...
Fwdays
 
How to generate a REST CXF3 application from Swagger ApacheConEU 2016
johannes_fiala
 

Viewers also liked (16)

PDF
Introducción a Yii2
Леонардо Ильяньеса
 
PPTX
Palestra yii2
João Bosco de Barros Filho
 
PPTX
Yii2
Noveo
 
ODP
Скриптовой язык Groovy и его применение в рамках разработки ПО
Fedor Malyshkin
 
PDF
Iniciando com Yii Framework - Volmar Machado da Silva Neto (Rede Pampa de Com...
Tchelinux
 
PPTX
Framework Yii
Juliane Silva
 
PPTX
Arquitetura ARM - Raspberry Pi
Juliane Silva
 
PDF
Framework Yii
Leonardo Ribeiro
 
PPTX
Grails with swagger
NexThoughts Technologies
 
PDF
Introduction to thymeleaf
NexThoughts Technologies
 
ODP
Java Spring MVC Framework with AngularJS by Google and HTML5
Tuna Tore
 
PDF
Grafico diario del dax perfomance index para el 07 08-2013
Experiencia Trading
 
PDF
Kid IT. Юлія Тарасова.
innaborysenko
 
DOC
Ajay S Telavane_Resume
Ajay Telavane
 
PPT
الانحدارالخطي البسيط
Shahid Shalabi
 
PPTX
Five Easy Ways to Relax
MaidPro Kansas City
 
Yii2
Noveo
 
Скриптовой язык Groovy и его применение в рамках разработки ПО
Fedor Malyshkin
 
Iniciando com Yii Framework - Volmar Machado da Silva Neto (Rede Pampa de Com...
Tchelinux
 
Framework Yii
Juliane Silva
 
Arquitetura ARM - Raspberry Pi
Juliane Silva
 
Framework Yii
Leonardo Ribeiro
 
Grails with swagger
NexThoughts Technologies
 
Introduction to thymeleaf
NexThoughts Technologies
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Tuna Tore
 
Grafico diario del dax perfomance index para el 07 08-2013
Experiencia Trading
 
Kid IT. Юлія Тарасова.
innaborysenko
 
Ajay S Telavane_Resume
Ajay Telavane
 
الانحدارالخطي البسيط
Shahid Shalabi
 
Five Easy Ways to Relax
MaidPro Kansas City
 
Ad

Similar to Creating applications with Grails, Angular JS and Spring Security (20)

PDF
Grails 3.0 Preview
graemerocher
 
PPTX
Grails Advanced
Saurabh Dixit
 
PPTX
Spring Northwest Usergroup Grails Presentation
ajevans
 
PPTX
Single-page applications and Grails
Alvaro Sanchez-Mariscal
 
PDF
Greach 2014 - Road to Grails 3.0
graemerocher
 
PPT
JavaOne 2008 - TS-5764 - Grails in Depth
Guillaume Laforge
 
PDF
Developing SPI applications using Grails and AngularJS
Alvaro Sanchez-Mariscal
 
PPTX
Introduction to Grails 2013
Gavin Hogan
 
PPTX
Building a scalable API with Grails
Tanausu Cerdeña
 
PDF
Grails 101
David Jacobs
 
ODP
Groovy and Grails intro
Miguel Pastor
 
PDF
Groovy grailstutorial
Rasmita Patra
 
PDF
Groovy - Grails as a modern scripting language for Web applications
IndicThreads
 
PDF
Coders Workshop: API First Mobile Development Featuring Angular and Node
Apigee | Google Cloud
 
PDF
Future of Grails
Daniel Woods
 
PDF
Grails Launchpad - From Ground Zero to Orbit
Zachary Klein
 
PDF
Grails 101
Lim Kin
 
PDF
Philip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik
 
PPT
Fast web development using groovy on grails
Anshuman Biswal
 
PPT
GROOVY ON GRAILS
Ziya Askerov
 
Grails 3.0 Preview
graemerocher
 
Grails Advanced
Saurabh Dixit
 
Spring Northwest Usergroup Grails Presentation
ajevans
 
Single-page applications and Grails
Alvaro Sanchez-Mariscal
 
Greach 2014 - Road to Grails 3.0
graemerocher
 
JavaOne 2008 - TS-5764 - Grails in Depth
Guillaume Laforge
 
Developing SPI applications using Grails and AngularJS
Alvaro Sanchez-Mariscal
 
Introduction to Grails 2013
Gavin Hogan
 
Building a scalable API with Grails
Tanausu Cerdeña
 
Grails 101
David Jacobs
 
Groovy and Grails intro
Miguel Pastor
 
Groovy grailstutorial
Rasmita Patra
 
Groovy - Grails as a modern scripting language for Web applications
IndicThreads
 
Coders Workshop: API First Mobile Development Featuring Angular and Node
Apigee | Google Cloud
 
Future of Grails
Daniel Woods
 
Grails Launchpad - From Ground Zero to Orbit
Zachary Klein
 
Grails 101
Lim Kin
 
Philip Stehlik at TechTalks.ph - Intro to Groovy and Grails
Philip Stehlik
 
Fast web development using groovy on grails
Anshuman Biswal
 
GROOVY ON GRAILS
Ziya Askerov
 
Ad

More from Alvaro Sanchez-Mariscal (20)

PDF
Serverless functions with Micronaut
Alvaro Sanchez-Mariscal
 
PDF
Asynchronous and event-driven Grails applications
Alvaro Sanchez-Mariscal
 
PDF
6 things you need to know about GORM 6
Alvaro Sanchez-Mariscal
 
PDF
Reactive microservices with Micronaut - GR8Conf EU 2018
Alvaro Sanchez-Mariscal
 
PDF
Reactive microservices with Micronaut - Greach 2018
Alvaro Sanchez-Mariscal
 
PDF
Practical Spring Cloud
Alvaro Sanchez-Mariscal
 
PDF
Efficient HTTP applications on the JVM with Ratpack - JDD 2015
Alvaro Sanchez-Mariscal
 
PDF
Stateless authentication with OAuth 2 and JWT - JavaZone 2015
Alvaro Sanchez-Mariscal
 
PDF
Stateless authentication for microservices - GR8Conf 2015
Alvaro Sanchez-Mariscal
 
PDF
Ratpack 101 - GR8Conf 2015
Alvaro Sanchez-Mariscal
 
PDF
Ratpack 101 - GeeCON 2015
Alvaro Sanchez-Mariscal
 
PDF
Stateless authentication for microservices - Spring I/O 2015
Alvaro Sanchez-Mariscal
 
PDF
Stateless authentication for microservices - Greach 2015
Alvaro Sanchez-Mariscal
 
PDF
Stateless authentication for microservices applications - JavaLand 2015
Alvaro Sanchez-Mariscal
 
PDF
Stateless authentication for microservices
Alvaro Sanchez-Mariscal
 
PDF
Stateless token-based authentication for pure front-end applications
Alvaro Sanchez-Mariscal
 
PDF
Workshop: Creating RESTful API’s with Grails and Spring Security (GR8Conf 2014)
Alvaro Sanchez-Mariscal
 
PDF
Embrace the frontend revolution
Alvaro Sanchez-Mariscal
 
PDF
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
Alvaro Sanchez-Mariscal
 
PDF
DevQA: make your testers happier with Groovy, Spock and Geb
Alvaro Sanchez-Mariscal
 
Serverless functions with Micronaut
Alvaro Sanchez-Mariscal
 
Asynchronous and event-driven Grails applications
Alvaro Sanchez-Mariscal
 
6 things you need to know about GORM 6
Alvaro Sanchez-Mariscal
 
Reactive microservices with Micronaut - GR8Conf EU 2018
Alvaro Sanchez-Mariscal
 
Reactive microservices with Micronaut - Greach 2018
Alvaro Sanchez-Mariscal
 
Practical Spring Cloud
Alvaro Sanchez-Mariscal
 
Efficient HTTP applications on the JVM with Ratpack - JDD 2015
Alvaro Sanchez-Mariscal
 
Stateless authentication with OAuth 2 and JWT - JavaZone 2015
Alvaro Sanchez-Mariscal
 
Stateless authentication for microservices - GR8Conf 2015
Alvaro Sanchez-Mariscal
 
Ratpack 101 - GR8Conf 2015
Alvaro Sanchez-Mariscal
 
Ratpack 101 - GeeCON 2015
Alvaro Sanchez-Mariscal
 
Stateless authentication for microservices - Spring I/O 2015
Alvaro Sanchez-Mariscal
 
Stateless authentication for microservices - Greach 2015
Alvaro Sanchez-Mariscal
 
Stateless authentication for microservices applications - JavaLand 2015
Alvaro Sanchez-Mariscal
 
Stateless authentication for microservices
Alvaro Sanchez-Mariscal
 
Stateless token-based authentication for pure front-end applications
Alvaro Sanchez-Mariscal
 
Workshop: Creating RESTful API’s with Grails and Spring Security (GR8Conf 2014)
Alvaro Sanchez-Mariscal
 
Embrace the frontend revolution
Alvaro Sanchez-Mariscal
 
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
Alvaro Sanchez-Mariscal
 
DevQA: make your testers happier with Groovy, Spock and Geb
Alvaro Sanchez-Mariscal
 

Recently uploaded (20)

PDF
The Rise of Sustainable Mobile App Solutions by New York Development Firms
ostechnologies16
 
PDF
IObit Uninstaller Pro 14.3.1.8 Crack for Windows Latest
utfefguu
 
PPTX
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
 
PPTX
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
 
PDF
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
 
PPTX
For my supp to finally picking supp that work
necas19388
 
PDF
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
PPTX
IDM Crack with Internet Download Manager 6.42 Build 41 [Latest 2025]
pcprocore
 
PPTX
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 
PPTX
IObit Driver Booster Pro 12.4-12.5 license keys 2025-2026
chaudhryakashoo065
 
PDF
What Is an Internal Quality Audit and Why It Matters for Your QMS
BizPortals365
 
PPTX
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
dheeodoo
 
PDF
AI Software Development Process, Strategies and Challenges
Net-Craft.com
 
PDF
Azure AI Foundry: The AI app and agent factory
Maxim Salnikov
 
PDF
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
PDF
Alur Perkembangan Software dan Jaringan Komputer
ssuser754303
 
PDF
Rewards and Recognition (2).pdf
ethan Talor
 
PPTX
Introduction to web development | MERN Stack
JosephLiyon
 
PDF
Best Practice for LLM Serving in the Cloud
Alluxio, Inc.
 
PDF
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 
The Rise of Sustainable Mobile App Solutions by New York Development Firms
ostechnologies16
 
IObit Uninstaller Pro 14.3.1.8 Crack for Windows Latest
utfefguu
 
IObit Driver Booster Pro Crack Download Latest Version
chaudhryakashoo065
 
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
 
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
 
For my supp to finally picking supp that work
necas19388
 
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
IDM Crack with Internet Download Manager 6.42 Build 41 [Latest 2025]
pcprocore
 
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 
IObit Driver Booster Pro 12.4-12.5 license keys 2025-2026
chaudhryakashoo065
 
What Is an Internal Quality Audit and Why It Matters for Your QMS
BizPortals365
 
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
dheeodoo
 
AI Software Development Process, Strategies and Challenges
Net-Craft.com
 
Azure AI Foundry: The AI app and agent factory
Maxim Salnikov
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Alur Perkembangan Software dan Jaringan Komputer
ssuser754303
 
Rewards and Recognition (2).pdf
ethan Talor
 
Introduction to web development | MERN Stack
JosephLiyon
 
Best Practice for LLM Serving in the Cloud
Alluxio, Inc.
 
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 

Creating applications with Grails, Angular JS and Spring Security