The document discusses Griffon, an open source desktop rapid development framework that leverages Java Swing and the Groovy language. It provides an overview of Griffon and its key features, including its MVC structure, plugins/addons, application packaging, competitors like Apache Pivot and Eclipse RCP, and sample applications. The agenda includes discussing Griffon's MVC, plugins, packaging, competitors, demos, and a summary. Sample code is provided for building a MongoDB database viewer application in Griffon.
5. What is Griffon?
●
Open source desktop rapid development framework
●
Leverages Java Swing and the Groovy language
●
Apache 2 Licensed
●
Extensible using Plugins and Add-ons
●
Brings a Grails-inspired experience to the desktop
10. Plugins and Addons
Extend existing features in Griffon applications
• Plugins
• Addons
Provide features like
• UI toolkits
• Databases
• XMPP/REST/RPC
• Testing
• Layout Managers
• Bling
11. Services and Dependency Injection
Griffon has supports the following
• Guice
• Spring
• First-class services when DI is not needed
12. Application Packaging
●
Can easily be deployed as
– Fat JARs or collection of JARs
– Java WebStart
– Applets
– Zip file
●
The Installer plugin can also provide the following
– OS specific executables
– Izpack
– JSmooth
14. Apache Pivot
Rapid application framework including:
• WTK user interface elements
• Web libraries
• Charts
• LOTS of XML
• Base footprint: Unknown but very small
17. Netbeans Platform
Toolkit powering Netbeans providing:
• Java Swing
• OSGI or Netbeans Modules
• Advanced multi-Window system
• Base footprint: 7-8.5MB
18. Dependency Handling in Griffon
●
Gradle is built in under the covers providing
●
Compile, Test, and Runtime dependency
●
Integration with Maven repositories
●
Integration with Griffon plugin repositories
●
No OSGI support yet
19. Using Eclipse UIs in Griffon
WindowsBuilder Pro
• A GUI designer product from Instantiations
• Recently released as a free product
• Provides a competitor to Netbeans Matisse
• Creates human-editable code
• Generated UIs can be dropped into a Griffon app
20. Using Netbeans Matisse with Griffon
Netbeans Matisse ...
• Uses GroupLayout for the UIs
• Code is not humanly editable
• No alternate LayoutManagers
• griffon generate-view-script <Qualified UI class name>
22. Use Case #1 - Databases
Scenario: Create a database viewer application
Requirements:
• Use MongoDB
• Have the ability to do basic functions like:
– CRUD operations
– Simple and advanced query
– Retrieve DB statistics
23. What is MongoDB?
●
Document-oriented database
• Documents can be nested
• Supports MapReduce
• Used by NYT, SourceForge, foursquare, and others
• Libraries for many programming languages
27. Use Case #2 – Websockets / Net
Comms
Scenario: Use websockets for communication in a chat and
slideware app
Requirements:
• Use WebSockets
• Provide simple chat functions
• Allow controlling slideware app with Websockets
28. What are Web Sockets?
Web Sockets ...
• Address the issues of long polling
• Supported natively by Chrome, Opera, and Firefox
• Enabled with Flash in non-compliant browsers
• Enable bi-directional communication between
– Web sites
– Web Services
30. Griffon Talk Android App
●
Had to play nice with websockets
●
Needed to display information about the current slide
●
Needed to control the presentation via Wifi
●
Had to be Android Cupcake (1.5) compatible
34. Use Case #3 – Converting an app
Scenario: A legacy application that has fallen into disrepair
Requirements:
• Most original functionality must be preserved
• A total rewrite has to be optional
37. Stock Tracker App
●
Ported from Apache Pivot to Griffon
●
Reads stock information from Yahoo! Finance
●
Track changes in stock information in real-time
39. Summary
●
UI designer support
●
Work incrementally with your assets.
●
Griffon has a small footprint.
●
Extensible with plugins and addons
●
You don't have to give up your favorite GUI designer.