Grails Plugins DJUG and Colorado Springs Open Source User's Group 2009
Upcoming SlideShare
Loading in...5
×
 

Grails Plugins DJUG and Colorado Springs Open Source User's Group 2009

on

  • 850 views

An overview of Grails plugin development and specifics on the development and use of the multi tenant plugin

An overview of Grails plugin development and specifics on the development and use of the multi tenant plugin

Statistics

Views

Total Views
850
Slideshare-icon Views on SlideShare
850
Embed Views
0

Actions

Likes
0
Downloads
11
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Grails Plugins DJUG and Colorado Springs Open Source User's Group 2009 Grails Plugins DJUG and Colorado Springs Open Source User's Group 2009 Presentation Transcript

    • Grails Plugin Magic Scott Ryan Soaring Eagle L.L.C. [email_address] March 2010 Colorado Spring Open Source User Group
    • Agenda
      • Grails Overview
      • Plugin Architecture
      • Sample Plugins
      • Other Modification Options
      • Q & A
    • What do you know?
      • Grails
      • Java, Groovy
      • Spring, Hibernate
      • Maven , Ivy
    • Grails Overview
      • Integrated framework based on Groovy
        • Spring MVC / GSP
        • Spring
        • Hibernate
        • GSP
        • Sitemesh
    • Grails Overview
      • Convention over configuration
      • Dynamic framework for ease of development
      • Lots of code generation
      • Plugin Framework allows extension
    • Grails Benefits
      • Supports Java Framework Leadership Technologies
      • Quick development turn-around
      • Good performance
      • Easy extensibility
      • Runs on the JVM
    • Plugin Functions
      • Integrate new libraries
      • Add incremental Functionality
      • Exchange Frameworks
      • Inject or Modify behavior
      • Add build support
      • Can include other libraries or plugins
    • Plugin Development
      • Uses standard Grails Application
      • grails create-plugin name
      • Update the plugin class
      • Create the plugin
      • grails package-plugin
      • grails release-plugin
      • grails install-plugin (local or repository)
    • Plugin Integration
      • Plugins never modify application main source
      • Source is copied to /plugins/-name-/grails-app
      • Static resources are copied to web-app/plugins/-name-/js etc.
      • Plugins never modify web.xml or application.xml
      • ${pluginContextPath} variable helps locate resources
    • What can I do in a Plugin?
      • Add Basic Artifacts (Controllers, GSP , Services, etc.)
      • Integrate with build script events
      • Integrate with runtime configuration
      • Add Dynamic Methods
      • Integrate with auto reload events
    • Adding Basic Artifacts
      • Domain,Controllers, Services, GSP
      • Follow conventions
      • Try to use unique names (UGH)
      • Use packages for all code
      • Integrate with conf.groovy or provide config file
      • Remember you are only a guest
    • Scripts
      • _Install.groovy
        • Called on installation
        • Can be used to copy or modify files
        • Gant based
      • _Upgrade.groovy
        • Called on upgraded
        • Gant based
    • Hooking into Build Events
      • _Events.groovy
        • One per plugin
        • Per User file in .grails user directory
      • Open Framework
        • Closures begin with “event” and then the name of the event
        • Trigger events with event method
          • event( eventName, message)
    • Integrating with Runtime
      • doWithSpring closure
        • Allows you to add to the spring configuration using spring bean builder syntax
      • doWithWebDescriptor closure
        • Passes in the xml variable
      • doWithApplicationContext closure
        • Run after the application context is assembled
        • Passes in the application context
    • Adding Dynamic Methods
      • doWithDynamicMethods closure
        • Grails artifacts expose the metaclass via the expandometaclass to add methods, constructors, etc.
        • Other classes allow you to use the metaclass to add methods, constructors, etc.
        • Application context is passed in so you can interact with artifacts within it.
    • Sample Plugins
      • Jquery
      • Hibernate Filter
      • Falcone
      • Multi tenant