Griffon at Gateway GUG

1,810 views

Published on

Presentation on Griffon for Gateway Groovy Users Group on March 10, 2009 by Matthew Taylor.

Published in: Technology, Art & Photos
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,810
On SlideShare
0
From Embeds
0
Number of Embeds
402
Actions
Shares
0
Downloads
48
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Griffon at Gateway GUG

  1. 1. Griffon ... a Grails Developer’s Perspective
  2. 2. Swing + Groovy + Grails
  3. 3. Wait... Swing?
  4. 4. BORDER LAYOUT BOX LAYOUT CARD LAYOUT FLOW LAYOUT GRID LAYOUT SPRING LAYOUT
  5. 5. THREADING HELL EVENT MADNESS BORDER LAYOUT BOX LAYOUT CARD LAYOUT FLOW LAYOUT GRID LAYOUT SPRING LAYOUT
  6. 6. GRIDBAGLAYOUT
  7. 7. GRIDBAGLAYOUT
  8. 8. MVC Triad bindings MODEL actions swing CONTROLLER VIEW
  9. 9. bind ( source: c1, sourceProperty: ‘text’ Bindings target: c2, targetProperty: ‘text’ ) Can bind view components to view components Model properties can be @Bindable and available from Controller and View Validation is available within bindings
  10. 10. Binding example (view) def counter = 0 application(title:'bindfun', pack:true, locationByPlatform:true) { gridLayout( cols:1, rows:2) button(quot;Click mequot;, id:'b') label(id:'lbl', text: bind( source: b, sourceEvent: 'actionPerformed', sourceValue: { counter++ }, converter: { lbl.text + it} ) ) }
  11. 11. MVC Groups MVC pattern can have a very small footprint Can be in lots of places Griffon’s MVC groups allows easy creation and deletion of MVC pattern griffon create-mvc to create skeleton createMVCGroup() to instantiate in running app
  12. 12. Image Viewer Demo
  13. 13. Plugins 10+ available griffon list-plugins griffon install-plugin myPlugin Just like Grails
  14. 14. Thoughts Swing is painful Griffon is good Missing documentation (only 0.1) Great potential for growth I wish I had this 3 years ago!
  15. 15. Resources http://griffon.codehaus.org http://groovy.codehaus.org/Swing+Builder http://docs.codehaus.org/display/GRIFFON/ FileViewer

×