Griffon: Swing just got fun again James Williams
Agenda What is Griffon? What's un-fun about Swing? Getting Started Builders Griffon MVC Lifecycle Add-ons Plugins Demos QA
What's un-fun about Swing?
What's un-fun about Swing? not knowing where stuff is old school Swing is repetitive unresponsive user interfaces configuring JNLPs is a nightmare signing jars is a pain you have to choose between applets and desktop pretty early      
What is Griffon? desktop framework leveraging Swing and Groovy Apache 2 Licensed very extensible unofficially called "Grails for the desktop"
Griffon Application Structure
Getting Started griffon create-app <AppName> griffon list-plugins  griffon install-plugin <PluginName> griffon run-app griffon run-applet griffon run-webstart griffon package
Builders DSLs to compose complex structures Encapsulate some common conversions  Can allow elements from different toolkits to be mixed Yield much more readable code than typical Java code
Builders - Sample Code JFrame frame = new JFrame(&quot;My Frame&quot;); frame.setSize(200,200); frame.add(new JLabel(&quot;Test Label&quot;)); is the equivalent to : frame (title: &quot;My Frame&quot;, size:[200,200]) {      label(&quot;Test Label&quot;) }
Models contain variables referenced by the controller and view can use the @Bindable notation to provide binding support   are injected into the controller and view at run-time
Views can be written in Groovy or Java represent a single display in your application can mix and match components from different UI toolkits
Demo - Simple Calculator
Griffon Lifecycle Initialize   run before any Swing code is started Startup   run after MVC Groups are initialized Ready   all events have been processed by the EDT Shutdown all cleanup operations go here
UI Threading aka &quot;The Evil EDT&quot; doOutside doInside doLater edt
Add-ons run-time analog to plugins can add or respond to runtime events can decorate MVC Groups
Plugin Types User Interface Builders Testing Other JVM Langs Bling Database Miscellaneous
User Interface Builder Plugins AbeilleFormBuilder CSSBuilder FlamingoBuilder FxBuilder GfxBuilder JIDEBuilder MacWidgetsBuilder SwingXBuilder SwingXtrasBuilder TrayBuilder TridentBuilder
Testing Plugins Code coverage CodeNarc EasyB Fest JDepend
JVM Language Plugins LangBridge Clojure Scala
Bling Plugins JGoodiesForms Splash Screen Transitions
Miscellaneous Plugins GPars Installer JUNG Wizard
Demo - SwingPad
Demo - Griffon on Wave
Griffon Links Download:  http://griffon.codehaus.org  (includes Greet) Gr8Forums:  http://bit.ly/Griffon-on-GR8Forum Demos (except Greet):  http://github.com/jwill/griffon-testing-grounds/
Griffon Team on Twitter @ecspike - James Williams (Me) @shemnon - Danno Ferrin @aalmiray - Andres Almiray @joshareed - Josh Reed @jshingler - Jim Shingler

Griffon: Swing just got fun again

  • 1.
    Griffon: Swing justgot fun again James Williams
  • 2.
    Agenda What isGriffon? What's un-fun about Swing? Getting Started Builders Griffon MVC Lifecycle Add-ons Plugins Demos QA
  • 3.
  • 4.
    What's un-fun aboutSwing? not knowing where stuff is old school Swing is repetitive unresponsive user interfaces configuring JNLPs is a nightmare signing jars is a pain you have to choose between applets and desktop pretty early      
  • 5.
    What is Griffon?desktop framework leveraging Swing and Groovy Apache 2 Licensed very extensible unofficially called &quot;Grails for the desktop&quot;
  • 6.
  • 7.
    Getting Started griffoncreate-app <AppName> griffon list-plugins  griffon install-plugin <PluginName> griffon run-app griffon run-applet griffon run-webstart griffon package
  • 8.
    Builders DSLs tocompose complex structures Encapsulate some common conversions  Can allow elements from different toolkits to be mixed Yield much more readable code than typical Java code
  • 9.
    Builders - SampleCode JFrame frame = new JFrame(&quot;My Frame&quot;); frame.setSize(200,200); frame.add(new JLabel(&quot;Test Label&quot;)); is the equivalent to : frame (title: &quot;My Frame&quot;, size:[200,200]) {      label(&quot;Test Label&quot;) }
  • 10.
    Models contain variablesreferenced by the controller and view can use the @Bindable notation to provide binding support   are injected into the controller and view at run-time
  • 11.
    Views can bewritten in Groovy or Java represent a single display in your application can mix and match components from different UI toolkits
  • 12.
    Demo - SimpleCalculator
  • 13.
    Griffon Lifecycle Initialize  run before any Swing code is started Startup   run after MVC Groups are initialized Ready   all events have been processed by the EDT Shutdown all cleanup operations go here
  • 14.
    UI Threading aka&quot;The Evil EDT&quot; doOutside doInside doLater edt
  • 15.
    Add-ons run-time analogto plugins can add or respond to runtime events can decorate MVC Groups
  • 16.
    Plugin Types UserInterface Builders Testing Other JVM Langs Bling Database Miscellaneous
  • 17.
    User Interface BuilderPlugins AbeilleFormBuilder CSSBuilder FlamingoBuilder FxBuilder GfxBuilder JIDEBuilder MacWidgetsBuilder SwingXBuilder SwingXtrasBuilder TrayBuilder TridentBuilder
  • 18.
    Testing Plugins Codecoverage CodeNarc EasyB Fest JDepend
  • 19.
    JVM Language PluginsLangBridge Clojure Scala
  • 20.
    Bling Plugins JGoodiesFormsSplash Screen Transitions
  • 21.
    Miscellaneous Plugins GParsInstaller JUNG Wizard
  • 22.
  • 23.
  • 24.
    Griffon Links Download: http://griffon.codehaus.org (includes Greet) Gr8Forums: http://bit.ly/Griffon-on-GR8Forum Demos (except Greet):  http://github.com/jwill/griffon-testing-grounds/
  • 25.
    Griffon Team onTwitter @ecspike - James Williams (Me) @shemnon - Danno Ferrin @aalmiray - Andres Almiray @joshareed - Josh Reed @jshingler - Jim Shingler