Thursday, October 15, 2020

Glimmer Calculator Desktop App Runs On The Web Via Opal

Thanks to Glimmer DSL for Opal, the Glimmer Calculator (Glimmer DSL for SWT desktop app) runs on the web without needing to change a single line of code. It is completely written in Ruby! Visit at and see for yourself! Even keyboard shortcuts work!

Here is the desktop version written in Glimmer DSL for SWT

Both the GUI and logic are written in Ruby. Here is the Glimmer GUI code.

Glimmer desktop apps already come with gemspec support via Juwelier and can be bundled as a gem. As such, the app was entirely reused on the web with a single require statement in a Rails Opal-powered server after adding the glimmer-cs-calculator gem to the Rails server Gemfile.

This is the future of web development as we know it! You simply build apps for the desktop and they just work on the web. After all, web browsers are a desktop app and GUI is just GUI whether on the web or desktop.

Of course, if a company needs special branding, a web designer may still apply CSS wizardry, but there is no need to get the developers involved. They could just focus on development in pure Ruby.

Here is a CSS theme example that centers the calculator and gives it an Apple Calculator look and feel (without needing to change any app code): Apple Theme

Here is a CSS theme example that centers the calculator, adds a title on top (with pure CSS, no markup), and styles buttons as tiles (without needing to change any app code): Tiles Theme

Learn more about Glimmer Calculator over here:

Happy Glimmering!

No comments: