compile time metaprogramming with groovy

Post on 12-Apr-2017

274 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Compile Time Metaprogramming

With GroovyJeff Scott Brown @jeffscottbrown

brownj@ociweb.com

More at ociweb.com/grails

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

WE ARE HIRING!

Groovy And Grails Project Work Grails 2 -> 3 Plugin Migrations Grails Plugin Development Expanding GORM’s Reach New Application Profiles Grails Core Development

grailsjobs@ociweb.com

• What Is Metaprogramming – programs that modify programs

• Groovy Supports Runtime Metaprogramming – MOP – MetaClass – etc...

• Groovy Supports Compile Time Metaprogramming – AST Transformations

Metaprogramming

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

AST Transformations In Grails • Grails Applies Many Compile Time Transformations To

Application Artifacts – controller methods – controller exception handling – command objects – bindable – GORM

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

Compile Time Transformations • Groovy Provides A Bunch Of Transformations

– @Delegate – @Immutable – @PackageScope – @Singleton – etc…

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

Q&A

Jeff Scott Brown @jeffscottbrown

brownj@ociweb.com

top related