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

Groovy-er desktop applications with Griffon

on

  • 2,681 views

Ignite-style introduction to Griffon

Ignite-style introduction to Griffon

Statistics

Views

Total Views
2,681
Views on SlideShare
2,513
Embed Views
168

Actions

Likes
0
Downloads
6
Comments
0

5 Embeds 168

http://www.iaeronz.com 101
http://groovy.in.th 39
http://localhost 22
http://www.aeronz.com 5
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution 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

Groovy-er desktop applications with Griffon Groovy-er desktop applications with Griffon Presentation Transcript

  • GriffonGroovy-er desktop applications © 2011 Eric Wendelin
  • GriffonBuilding desktop apps for the JVM just got Groovy
  • 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; } }
  • 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) }}
  • Based on
  • Ow! Pointy!Convention > Configuration
  • MVCgriffon create-mvc Login
  • @Bindable
  • BOOM! Built in! griffon test-app
  • Lots of deployment options griffon package jar
  • 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)}
  • Plugins and Addons! griffon install-plugin easyb
  • Polyglotgriffon install-plugin jython
  • Multi-UI Toolkit Support
  • You shouldprobably buy me!
  • Thanks! also go heregriffon.codehaus.org @eriwen