Magnolia & Groovy integration


                                  Federico Grilli
                  (Software developer at...
What is Groovy?
• is an agile and dynamic* language for the
  Java Virtual Machine


• builds upon the strengths of Java b...
Groovy


• seamlessly integrates with all existing Java
  classes and libraries


• compiles straight to Java bytecode so ...
magnolia-module-groovy


 •Two levels of integration




4
                   Magnolia is a registered trademark used by p...
Magnolia & Groovy
 • 1 level:

 • streamlined access to data via .(dot)
   notation and convenience methods

 • e.g. root....
Magnolia & Groovy
 • 1 level:

 • integrated default imports for useful
   Magnolia packages: got rid of some
   boilerpla...
Magnolia & Groovy
•2 level:

• deeper integration with Magnolia thanks to
  ClassFactory mechanism.




7
               M...
GroovyClassFactory




8
              Magnolia is a registered trademark used by permission
Version 1.0
Magnolia & Groovy

•2 level:

• Groovy classes can be created, saved on
  their workspace and used as plain Java
  classes...
Use cases - Demos
• Importing data into Magnolia from xml

• Using Groovy commands

• Hot swapping of Groovy and Java clas...
Resources
• Doc: http://documentation.magnolia-cms.com/modules/
  groovy.html



• Module Site (incl. Javadoc):http://nexu...
Questions?




12
               Magnolia is a registered trademark used by permission
Version 1.0
Upcoming SlideShare
Loading in …5
×

Magnolia Groovy Integration

1,722 views

Published on

Magnolia 2010 Unconference Presentation about Groovy and Magnolia CMS integration.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,722
On SlideShare
0
From Embeds
0
Number of Embeds
165
Actions
Shares
0
Downloads
15
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide












  • Magnolia Groovy Integration

    1. 1. Magnolia & Groovy integration Federico Grilli (Software developer at Magnolia Int.) 17.09.2010 Magnolia International 1 Magnolia is a registered trademark used by permission Version 1.0
    2. 2. What is Groovy? • is an agile and dynamic* language for the Java Virtual Machine • builds upon the strengths of Java but has additional power features inspired by languages like Python and Ruby •* type checking is performed at run-time as opposed to at compile-time 2 Magnolia is a registered trademark used by permission Version 1.0
    3. 3. Groovy • seamlessly integrates with all existing Java classes and libraries • compiles straight to Java bytecode so you can use it anywhere you can use Java 3 Magnolia is a registered trademark used by permission Version 1.0
    4. 4. magnolia-module-groovy •Two levels of integration 4 Magnolia is a registered trademark used by permission Version 1.0
    5. 5. Magnolia & Groovy • 1 level: • streamlined access to data via .(dot) notation and convenience methods • e.g. root.mynode.mysubnode.myproperty (or root.mynode.mysubnode.@myproperty) • e.g. root.children or mynode.parent 5 Magnolia is a registered trademark used by permission Version 1.0
    6. 6. Magnolia & Groovy • 1 level: • integrated default imports for useful Magnolia packages: got rid of some boilerplate code 6 Magnolia is a registered trademark used by permission Version 1.0
    7. 7. Magnolia & Groovy •2 level: • deeper integration with Magnolia thanks to ClassFactory mechanism. 7 Magnolia is a registered trademark used by permission Version 1.0
    8. 8. GroovyClassFactory 8 Magnolia is a registered trademark used by permission Version 1.0
    9. 9. Magnolia & Groovy •2 level: • Groovy classes can be created, saved on their workspace and used as plain Java classes on the fly (e.g. for commands or STK models) with no need to deploy them and restart the servlet container. 9 Magnolia is a registered trademark used by permission Version 1.0
    10. 10. Use cases - Demos • Importing data into Magnolia from xml • Using Groovy commands • Hot swapping of Groovy and Java classes • Groovy Rescue Servlet 10 Magnolia is a registered trademark used by permission Version 1.0
    11. 11. Resources • Doc: http://documentation.magnolia-cms.com/modules/ groovy.html • Module Site (incl. Javadoc):http://nexus.magnolia-cms.com/ content/sites/magnolia.public.sites/modules/magnolia-module- groovy/1.1/magnolia-module-groovy/ 11 Magnolia is a registered trademark used by permission Version 1.0
    12. 12. Questions? 12 Magnolia is a registered trademark used by permission Version 1.0

    ×