Simplifying Desktop Development With Glimmer
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Simplifying Desktop Development With Glimmer

on

  • 2,853 views

Presentation given at RubyConf 2008.

Presentation given at RubyConf 2008.

Statistics

Views

Total Views
2,853
Views on SlideShare
2,675
Embed Views
178

Actions

Likes
2
Downloads
25
Comments
0

9 Embeds 178

http://andymaleh.blogspot.com 86
http://www.eclipsecon.org 78
http://www.slideshare.net 5
https://www.eclipsecon.org 2
http://andymaleh.blogspot.ca 2
http://andymaleh.blogspot.de 2
http://eclipsecon.org 1
http://andymaleh.blogspot.com.br 1
http://www.slideee.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

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

Simplifying Desktop Development With Glimmer Presentation Transcript

  • 1. Simplifying Desktop Development with Glimmer Andy Maleh Journeyman Craftsman Obtiva Corp. Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 2. Preview  Introduction  Overview of Widgets  Hello World  Glimmer Listens  Data-binding  Test-driving with MVP  First Glimmer Game Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 3. Introduction  Requirements for a Ruby UI Toolkit:  Platform independence  Native widget support  Industry strength  Ease of use Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 4. Introduction  Current Ruby UI Toolkits:  TK  FXRuby  GTK  wxWidgets  Monkeybars  Shoes  Limelight  ... Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 5. Introduction  Introducing Glimmer:  Leverages SWT library used in Aptana RadRails IDE  Works on Windows, Mac, and Linux  Offers built in native widget support  Provides an ultra-light UI authoring DSL  Facilitates clean separation of logic and UI code via Data-Binding Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 6. Overview of Widgets Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 7. Overview of Widgets  Shell  Composite  Group  TabFolder  Combo  List  Control  Text  Label  Spinner  Button Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 8. Hello World Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 9. Hello World  SWT example in Java: Display display = Display.getDefault(); Shell shell = new Shell(display); shell.setText(quot;SWTquot;); shell.setLayout(new FillLayout()); Label label = new Label(composite, SWT.NONE); label.setText(quot;Hello World!quot;); shell.pack(); shell.open(); while (!display.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 10. Hello World  API Goals  Concise and DRY  Asks for minimum info needed to accomplish task  Convention over configuration  As predictable as possible for existing SWT developers Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 11. Hello World  Glimmer example in JRuby: shell { text quot;SWTquot; label { text quot;Hello World!quot; } } Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 12. Glimmer Listens  Listeners allow user interaction with widgets text { on_modify_text { contact_model.validate } on_focus_lost { contact_model.save } } button { text quot;Deletequot; on_widget_selected { contact_model.delete } } Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 13. Glimmer Listens Demo (http://glimmer.rubyforge.org/svn/samples/login.rb/) Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 14. Data Binding  Enables syncing of UI state with model state bi- directionally  Facilitates clean separation between application logic and UI code  Requires much less code than listeners  Relies on modified version of MVC pattern Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 15. Data Binding Demo (http://glimmer.rubyforge.org/svn/samples/contact_manager/) Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 16. Test-driving with MVP  A presenter is a special kind of model that handles presentation logic  Examples:  Enablement/disablement of fields based on certain events  Action logic triggered by clicking a button  Aggregation/formatting of data to display  Abstracts the UI  Properties represent different fields on the UI  Methods represent different action widgets (e.g. buttons) on the UI Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 17. Test-driving with MVP Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 18. Test-driving with MVP  Write UI code using Glimmer (without data- binding and event listeners)  Test-drive presenter that abstracts UI  Every UI field is represented by a property on the presenter  Every UI button is represented by a method on the presenter  Update UI code to data-bind fields to properties on the presenter and hook event listeners to methods on the presenter Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 19. First Glimmer Game Demo (http://glimmer.rubyforge.org/svn/samples/tictactoe/) Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 20. Review  Introduction  Overview of Widgets  Hello World  Glimmer Listens  Data-binding  Test-driving with MVP  First Glimmer Game Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 21. Q&A Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 22. More Information Glimmer Eclipse Technology Project: http://www.eclipse.org/proposals/glimmer/ Glimmer Newsgroup: http://www.eclipse.org/newsportal/thread.php?group=eclipse.technology.glimmer Original Glimmer Project Page at RubyForge (moving to Eclipse now): http://rubyforge.org/projects/glimmer/ Glimmer InfoQ Interview: http://www.infoq.com/news/2008/02/glimmer-jruby-swt Glimmer EclipseZone Introductory Tutorial: http://eclipse.dzone.com/articles/an-introduction-glimmer Sneak Peak at Glimmer: http://andymaleh.blogspot.com/2007/11/sneak-peak-at-glimmer.html Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0
  • 23. Contact Info Andy Maleh andy@obtiva.com andymaleh.blogspot.com Obtiva Corp. obtiva.com Simplifying Desktop Development with Glimmer ®2008 by Annas Maleh; made available under the EPL v1.0