Friday, November 21, 2008

Glimmer talk proposal for EclipseCon 2009

I proposed a long talk for EclipseCon 2009 about Glimmer.

Topic: Simplifying Desktop Development with Glimmer

Description:

Programming SWT/JFace user-interfaces in Java often involves a lot of repetitive boiler-plate code that is overly verbose and hard to map to the user-interface visually. This can significantly hinder maintainability and productivity for Eclipse RCP projects.

Enter Glimmer; a new JRuby API for SWT that takes advantage of the highly productive Ruby language to provide a very simple user-interface DSL (domain-specific language.) It can help Java developers build the presentation layer faster and with more maintainable code. Also, it can help Ruby developers build a complete SWT application in Ruby.

Glimmer comes with built-in data-binding support to greatly facilitate writing maintainable and testable desktop application code.

In this presentation, I will introduce Glimmer, provide a quick tutorial for its syntax and paradigms, demonstrate a few Glimmer applications, and explain how to test-drive a Glimmer application by following the Model-View-Presenter pattern.

Thursday, November 20, 2008

Glimmer code officially in Eclipse

Glimmer's code was finally approved and committed to the Eclipse SVN repository:
http://dev.eclipse.org/svnroot/technology/org.eclipse.glimmer.core

I'll be maintaining it at that location from this point on.

Here is the new Eclipse technology project page:
http://www.eclipse.org/glimmer/

And here is the about page:
http://www.eclipse.org/projects/project_summary.php?projectid=technology.glimmer

Thursday, November 06, 2008

RubyConf 2008: Day 1

The day started with Matz, creater of the Ruby language, talking about his philosophy behind the language and why certain people pick it over other languages. He started by comparing his experiences of programming with Basic and Lisp. On the one extreme, Basic provided easy syntax that was easy to learn, but it did not enable extending the language when need arised. On the other extreme, Lisp provided lots of power in extending the language with macros, but produced code so obfuscated by parentheses that it caused pain. Ruby was kind of a happy medium. While its syntax reads generally like plain English, it provides incredible power with its dynamicness, allowing developers to extend the language with internal DSLs that facilitate domain-specific work such as web development (Rails) and build configuration (Rake.)

Matz made a mention of Ruby 1.9 and the work being done in it to achieve incredible improvements of performance in Ruby. One of the nice quotes I heard him say was a play on words for one of Dale Carnegie's book titles: "Stop worrying and start loving Ruby."

The first presentation I attended was a talk on a Ruby desktop library called MonkeyBars. It shares some goals with Glimmer by wanting to take advantage of Ruby's syntax to simplify desktop development done with Java's UI libraries. MonkeyBars relies on Swing though.

I presented Glimmer right after that talk, contrasting it with MonkeyBars and other Ruby desktop development frameworks, and showing exactly where Glimmer shines, which is in data-binding support and how it improves code testability and design through the Model-View-Presenter pattern (a variation on MVC.)

Later, I saw Charles Nutter and Thomas Enebo present on the latest enhancements to JRuby, and I attended a few other talks, such as "Unfactoring from Patterns: Job Security through Obscurity", "Recovering from Enterprise: how to embrace Ruby’s idioms and say goodbye to bad habits, and "Testing Heresies."

"Testing Heresies" ended up with the typical debate between TDD classicists and TDD mockists, with David Chemilsky on the one hand pushing for mocking to keep unit tests isolated and rely on acceptance tests (story runner tests in RSpec) to catch integration bugs, and other attendees on the other hand supporting the idea of writing tests against the application layer (no mocking) to facilitate free refactoring of the domain model behind the scenes and avoid tying the code design to the tests. The key thing that the presenter, Francies Hwang, hammered I thought was that regardless of which approach is right, mocking collaborators according to mockists' approach forces you to design the code early in development instead of delaying the design till a post-green-bar refactoring step. This can be considered un-agile as it may promote over-engineering.

The night was concluded with lightning talks, in which I was happy to participate by giving a quick talk on how to leverage Glimmer's DSL engine to build other DSLs such as an XML or HTML dsl in pure Ruby code.

EclipseWorld 2008 Highlights

Here are the highlights of my attendance of EclipseWorld 2008:

Day 1:

Gave a lightning talk about Glimmer and attended Patterns Epiphanies JET tutorial

Day 2:

Demoed Glimmer and attended "Developing AJAX Applications for iPhone and iPod Touch", "Java EE Architecture Shoot-Out", and Ivar Jacobson's keynote speech.

Ivar is by the way the father of "components" and Unified Process. Right now, he is promoting the idea of practice-based development. The way I understand it is it's a methodology that encourages developers to gradually improve their process by adapting practices from XP, scrum, unified process, and any other process that may have helpful practices. This is a departure from the prescriptive nature that most of software development processes had in the past.

Other points mentioned by Ivar Jacobson:
  • The software industry is very fashion oriented. 2 yrs ago companies wanted XP. Today it's Scrum. They are missing the point.
  • Mr Supposedly Agile does no architecture; just code and refactor later. FAIL! Mr Enterprise Architect architects everything up-front. FAIL! A little bit of architecture is important, but not too much.
  • But, architecture without executable code is a hallucination. Start with small code and refactor the architecture in small increments.
  • Whatever you do you are not done until you have verified that you did what you wanted to do.
Day 3:

Gave my two long talks: "Looking Good! Polishing Eclipse Applications" and "Practical Design Patterns for Rich Client Development"


Tuesday, October 14, 2008

Glimmer's Eclipse Project Landing Page

I finally updated Glimmer's Eclipse project landing page:
http://www.eclipse.org/glimmer

Stay tuned for Glimmer's code commit into the Eclipse SVN repository.

Monday, October 13, 2008

Finally back, with Glimmer on the Mac

So, I haven't blogged for a while as I've been busy in the last few months looking for homes, moving to a new place in Chicago, finishing work on a big client project, and joining a new Ruby on Rails project at our Obtiva main office (The Obtiva Studio.) My Windows laptop, which had all my Glimmer work got stolen. So, I got a Mac Book Pro, and that became the perfect excuse for me to get Glimmer working on the Mac. The key thing I learned about making Glimmer work on the Mac is that you need to run Java for JRuby with this switch "-XstartOnFirstThread" or else the SWT library, which Glimmer relies on, will freeze when attempting to trigger any UI events (mouse-click, tabbing, etc...) One way of doing so is to simply append that switch at the end of a jruby call. Example: jruby samples/hello_world.rb -XstartOnFirstThread A better way for the long-term though is to embed that switch in the Java environment variables or the jruby script file. One last thing to note is that if you get Glimmer through the Gem and run it, it automatically gets a Ruby Facets gem that is more recent than the one originally used to develop Glimmer. Its API had a change that breaks Glimmer, so to fix it, replace all references of camelcase() in Glimmer's code-base with camelcase(false) (references are in r_widget.rb I believe.) I am in the process of doing the long-due task of committing Glimmer's code into the Eclipse SVN repository. Once I have that done, I'll ensure it includes the Facets fix, and I'll blog about the commit. Happy Mac Glimmering!

Thursday, September 18, 2008

Glimmer at RubyConf 2008

I am presenting at RubyConf 2008.

Topic: Simplifying Desktop Development with Glimmer

Description:

Ruby has gained a lot of popularity in the last few years, especially in web development, due to the
infamous Ruby on Rails framework. However, it has not gathered the same momentum in building desktop
applications despite the fact that a number of desktop application frameworks exist out there.


There is still a need for a Ruby desktop development framework that satisfies all of these goals
sufficiently and reliably:
# Platform-independence
# Native widget support
# Industry-strength and reliability
# Strong community support
# Ease of use

Enter Glimmer; a new Eclipse open-source project that leverages the Ruby language and Eclipse SWT
library to enable easy and efficient authoring of platform-independent desktop user-interfaces. It
comes with a UI authoring DSL and built-in data-binding support to greatly facilitate writing
maintainable and testable desktop application code.

In this presentation, I will introduce Glimmer, provide a quick tutorial for its syntax and
paradigms, demonstrate some applications, and explain how to test-drive a Glimmer application by
following the Model-View-Presenter pattern.