110 likes | 113 Vues
JRuby on RCP << Glimmer >> by Annas “Andy” Maleh andy@obtiva.com Obtiva Corp. Preview. Introduction Comparison: Java on SWT Java on JFace and SWT JRuby on SWT Quick Demo Game Future of Glimmer More Information. Hello World. SWT Example (Java) .
E N D
JRuby on RCP • << Glimmer >> • by • Annas “Andy” Maleh • andy@obtiva.com • Obtiva Corp.
Preview • Introduction • Comparison: • Java on SWT • Java on JFace and SWT • JRuby on SWT • Quick Demo • Game • Future of Glimmer • More Information
SWT Example (Java) publicstaticvoid main(String[] args) { Display display = Display.getDefault(); Shell shell = new Shell(display); shell.setText("SWT"); shell.setLayout(new FillLayout()); Composite composite = new Composite(shell, SWT.NONE); composite.setLayout(new GridLayout()); Label label = new Label(composite, SWT.NONE); label.setText("Hello World!"); shell.pack(); shell.open(); while (!display.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); }
JFace Example (Java) protected JFaceTest(Shell parentShell) { super(parentShell); setBlockOnOpen(true); open(); } @Override protected Control createContents(Composite parent) { getShell().setText("JFace"); getShell().setLayout(new FillLayout()); Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout()); Label label = new Label(composite, SWT.NONE); label.setText("Hello World!"); return composite; } publicstaticvoid main(String[] args) { new JFaceTest(null); }
SWT Example (JRuby Glimmer) shell { text "JRuby on SWT" composite { label { text "Hello World!" } } }.open
Demo (http://glimmer.rubyforge.org/svn/samples/contactmanager/)
Game (http://glimmer.rubyforge.org/svn/samples/tictactoe/)
Future of Glimmer • Data-binding support for combos, trees, and lists • RCP Plugins • RCP Extension Points • EMF • Birt??? • ...
More Information Glimmer Eclipse Technology Project Proposal: http://www.eclipse.org/proposals/glimmer/ Glimmer Newsgroup: http://www.eclipse.org/newsportal/thread.php?group=eclipse.technology.glimmer Glimmer at RubyForge: http://rubyforge.org/projects/glimmer/ Sneak Peak at Glimmer: http://andymaleh.blogspot.com/2007/11/sneak-peak-at-glimmer.html Glimmer Data-Binding: http://andymaleh.blogspot.com/2007/12/glimmers-built-in-data-binding-syntax.html Glimmer Listens: http://andymaleh.blogspot.com/2007/12/listeners-in-glimmer.html
Contact Andy Maleh andy@obtiva.com andymaleh.blogspot.com Obtiva Corp. www.obtiva.com