Your SlideShare is downloading. ×
Groovy-er desktop applications with Griffon
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Groovy-er desktop applications with Griffon

2,275

Published on

Ignite-style introduction to Griffon

Ignite-style introduction to Griffon

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

  • Be the first to like this

No Downloads
Views
Total Views
2,275
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. GriffonGroovy-er desktop applications © 2011 Eric Wendelin
  • 2. GriffonBuilding desktop apps for the JVM just got Groovy
  • 3. import java.awt.GridLayout;import java.awt.event.ActionListener;import java.awt.event.ActionEvent;import javax.swing.JFrame;import javax.swing.JTextField;import javax.swing.JButton;import javax.swing.SwingUtilities;public class JavaFrame { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable(){ public void run() { JFrame frame = buildUI(); } frame.setVisible(true); }); } private static JFrame buildUI() { JFrame frame = new Jframe("JavaFrame"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(new GridLayout(3,1)); final JTextField input = new JTextField(20); final JTextField output = new JTextField(20); output.setEditable(false); JButton button = new JButton("Click me!"); button.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent event) { output.setText(input.getText()); } }); frame.getContentPane().add(input); frame.getContentPane().add(button); frame.getContentPane().add(output); frame.pack(); return frame; } }
  • 4. import groovy.swing.SwingBuilderimport static javax.swing.JFrame.EXIT_ON_CLOSEnew SwingBuilder().edt { frame(title: "GroovyFrame", pack: true, visible: true, defaultCloseOperation: EXIT_ON_CLOSE) { gridLayout(cols: 1, rows: 3) textField(id: "input", columns: 20) button("Click me!", actionPerformed: { output.text = input.text }) textField(id: "output", columns: 20, editable: false) }}
  • 5. Based on
  • 6. Ow! Pointy!Convention > Configuration
  • 7. MVCgriffon create-mvc Login
  • 8. @Bindable
  • 9. BOOM! Built in! griffon test-app
  • 10. Lots of deployment options griffon package jar
  • 11. application(title: ‘GroovyTitle’, pack: true) { gridLayout(cols: 1, rows: 3) textField(id: "input", columns: 20) button("Click me!", actionPerformed: { output.text = input.text }) textField(id: "output", columns: 20, editable: false)}
  • 12. Plugins and Addons! griffon install-plugin easyb
  • 13. Polyglotgriffon install-plugin jython
  • 14. Multi-UI Toolkit Support
  • 15. You shouldprobably buy me!
  • 16. Thanks! also go heregriffon.codehaus.org @eriwen

×