[ruby-talk:444250] If You Liked Shoes, You'll Love Glimmer!

A new Glimmer FAQ (Frequently Asked Questions) section (linked at the
bottom) has been added to the Glimmer project README on GitHub (linked at
the bottom) in order to answer questions like "How do Glimmer GUI DSLs
compare to Shoes?" and "What is the difference between Glimmer and Glimmer
DSL for SWT?", among others.

I am including the Glimmer FAQ below for your convenience. If you have
other questions that are not answered in the Glimmer FAQ, please reply with
your questions.

## How do Glimmer GUI DSLs compare to Shoes?

If you liked Shoes, you'll love Glimmer!

That is because Glimmer does everything that Shoes did, but with a lighter
and better GUI DSL (Graphical User Interface Domain Specific Language) that
addresses all the issues that Shoes suffered from, such as:

- Shoes does not allow code in Shoes blocks to use variables defined
outside of Shoes blocks in a straightforward manner as it changes self
inside Shoes blocks, breaking Ruby expectations and producing confusing
behavior. On the other hand, Glimmer DSL blocks are 100% standard Ruby
blocks that represent real closures, so they enable usage of variables
defined outside the blocks in a 100% standard Ruby way.

- Shoes lacks support for high-quality business widget controls (View
components) like table and tree. Glimmer GUI DSLs that are feature complete
like Glimmer DSL for SWT do support table and tree widgets. Some non-final
Glimmer GUI DSLs like Glimmer DSL for LibUI support the table control too.

- Shoes does not encourage proper separation of concerns with a correct MVC
architecture (Model-View-Controller), resulting in a lot of
non-presentation logic mixed with View code. Glimmer GUI DSLs do support
proper separation of concerns 100% following the MVC or MVP
(Model-View-Presenter) architecture by default.

- Shoes does not provide a simple way for connecting View components to
Model data. Glimmer GUI DSLs provide full bidirectional/unidirectional
data-binding support out of the box that provides the terest code syntax
for connecting Views to Models and keeping them in sync.

- Shoes does not support a native mechanism for building custom View
components. Glimmer does support the ability to build custom widgets (aka
controls or View components), custom windows (aka shells), and custom
shapes (canvas graphics). That results in much higher productivity by
enabling the reuse of higher visual concepts as their own self-encapsulated
components.

- Shoes does not expose native features of its wrapped GUI toolkit. Glimmer
GUI DSLs do expose all native features of their wrapped GUI toolkits, thus
enabling developers to use a GUI toolkit like SWT directly when needed on
top of using Glimmer DSL for SWT. That facilitates the 80/20 rule of having
Glimmer GUI DSLs automate 80% of the work while still enabling software
engineers to reach down to the low-level GUI toolkit API in 20% of the
cases when needed (though in practice, it's probably more like 1% of the
cases).

It is great that Shoes paved the way for creating desktop GUI DSLs in Ruby.
Glimmer took that approach to its maximum and produced the ultimate
evolution of Shoes.

## What is the difference between Glimmer and Glimmer DSL for SWT?

Glimmer DSL for SWT was the first GUI DSL created as part of the Glimmer
project to enable building desktop applications, and it was originally just
called Glimmer. It relied on the Eclipse SWT library to render GUI
(Graphical User Interface) widget controls (View components) on every
platform (Mac, Windows, and Linux). Eventually, the idea of a Glimmer DSL
proved itself so successful and viable for building desktop apps with a
fraction of the effort needed in other programming languages/technologies
that it was expanded to support other GUI toolkits. So, Glimmer got renamed
to Glimmer DSL for SWT, and the core Glimmer DSL engine got extracted to
Glimmer (becoming a DSL framework), which then got reused to build other
Glimmer GUI DSLs such as Glimmer DSL for LibUI and Glimmer DSL for GTK,
among many others.

## What is the difference between Glimmer DSL for SWT and Glimmer DSL for
LibUI?

Both Glimmer DSL for SWT and Glimmer DSL for LibUI support rendering
platform native widgets/controls, which enable building native desktop apps
that look 100% native on every platform (Mac, Windows, and Linux).

However, Glimmer DSL for SWT runs in JRuby (Ruby running in the JVM [Java
Virtual Machine]) whereas Glimmer DSL for LibUI runs in standard Ruby (aka
MRI Ruby or CRuby).

Glimmer DSL for SWT is 100% feature-complete and has a final release.
Glimmer DSL for LibUI is 100% complete as far as covering the LibUI
features, but LibUI itself is still a mid-alpha library, so it is missing a
few features that will get added eventually.

## What is the difference between Glimmer DSL for LibUI, Glimmer DSL for
GTK, Glimmer DSL for Tk, and Glimmer DSL for FX?

All of Glimmer DSL for LibUI, Glimmer DSL for GTK, Glimmer DSL for Tk, and
Glimmer DSL for FX run in standard Ruby (aka MRI Ruby or CRuby).

However, only Glimmer DSL for LibUI renders native controls on every
platform (Mac, Windows, and Linux). The other libraries do not render
native controls on every platform, albeit Glimmer DSL for GTK renders
native controls on Linux distributions utilizing Gnome.

Also, Glimmer DSL for LibUI does not require any prerequisites beyond
installing the Ruby gem, so you can install it and get instant GUI with
very little effort, whereas Glimmer DSL for GTK, Glimmer DSL for Tk, and
Glimmer DSL for FX do require extra dependencies in general, albeit Glimmer
DSL for GTK has everything it needs in Linux Gnome flavors.

You may learn more about the differences between various Glimmer DSLs by
checking out the Glimmer DSL Comparison Table (linked at the bottom).

## What is the difference between Glimmer DSL for SWT, Glimmer DSL for
Swing, and Glimmer DSL for JFX?

Glimmer DSL for SWT relies on the Eclipse SWT library, which renders native
widgets on every platform (Mac, Windows, and Linux) to build desktop apps
that look 100% native on every platform (Mac, Windows, and Linux).

Glimmer DSL for Swing relies on Swing, which does not render native widgets
on every platform. Glimmer DSL for JFX relies on JavaFX, which also does
not render native widgets on every platform.

You may learn more about the differences between various Glimmer DSLs by
checking out the Glimmer DSL Comparison Table (linked at the bottom).

## Links:

Glimmer GitHub Page: GitHub - AndyObtiva/glimmer: DSL Framework consisting of a DSL Engine and a Data-Binding Library used in Glimmer DSL for SWT (JRuby Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI), Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library), Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS

Glimmer FAQ: GitHub - AndyObtiva/glimmer: DSL Framework consisting of a DSL Engine and a Data-Binding Library used in Glimmer DSL for SWT (JRuby Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI), Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library), Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS

Glimmer DSL Comparison Table:

Blog Post Announcement: