Home

Awesome

<img alt="Glimmer Calculator Icon" src="glimmer-cs-calculator-icon.png" height=85 /> Glimmer Calculator

<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 /> Glimmer Custom Shell

Gem Version

Glimmer Calculator on Mac

Calculator

Glimmer Calculator on Windows

Calculator

Glimmer Calculator on Linux

Calculator

Glimmer Calculator on Opal (Web)

Calculator

Glimmer Calculator is a sample desktop GUI application built with Glimmer DSL for SWT (JRuby Desktop Development GUI Library).

Architectural Pattern is MVP (Model View Presenter) thanks to Glimmer data-binding support.

Glimmer Calculator was developed test-first following TDD (Test Driven Development) after Glimmer Scaffolding.

Design Patterns discovered in the process were Facade (Presenter) and Command Pattern.

Here are the calculator commands under the models directory:

Calculator Commands

<img alt="Glimmer Calculator Icon" src="glimmer-cs-calculator-icon.png" height=40 />Download Glimmer Calculator v1.1.4 DMG for Mac

<img alt="Glimmer Calculator Icon" src="glimmer-cs-calculator-icon.png" height=40 />Download Glimmer Calculator v1.1.1 MSI for Windows

<img alt="Glimmer Calculator Icon" src="glimmer-cs-calculator-icon.png" height=40 />Download Glimmer Calculator v1.1.4 GEM for Linux

<img alt="Glimmer Calculator Icon" src="glimmer-cs-calculator-icon.png" height=40 />Visit Glimmer Calculator v1.1.2 WEB for Opal

Platforms

Development Environment Pre-requisites

Setup Instructions

Glimmer DSL for SWT

Install Calculator gem by running (jgem, jruby -S gem, or gem directly if you have RVM):

jgem install glimmer-cs-calculator

Afterwards, you may run calculator to bring up the calculator:

calculator

Note: If you cloned this project and bundle installed, you may invoke via bin/calculator instead.

Glimmer Custom Shell Reuse

To reuse Calculator as a Glimmer Custom Shell inside another Glimmer application, add the following to the application's Gemfile:

gem 'glimmer-cs-calculator', '1.1.4'

Run:

jruby -S bundle

And, then instantiate the Calculator custom shell in your Glimmer application via the calculator Glimmer DSL keyword.

Glimmer DSL for Opal

The app Rails server lives under: server/glimmer-cs-calculator-server

It is deployed to Heroku at: https://glimmer-cs-calculator-server.herokuapp.com

Setup instructions from Glimmer DSL for Opal were followed in creating the Rails server.

This is the content of app/assets/javascripts/application.rb:

require 'glimmer-dsl-opal'

Document.ready? do
  require 'glimmer-cs-calculator/launch'
end

As you can see, Glimmer Calculator works as is by adding one require statement without needing to change a single line of its code thanks to Glimmer DSL for Opal.

Calculator

CSS Themes

CSS can be applied externally in Rails onto any Rails Route serving an Opal app.

Apple Calculator CSS Theme

Visit: http://glimmer-cs-calculator-server.herokuapp.com/welcomes/apple

server/glimmer-cs-calculator-server/app/assets/stylesheets/welcomes_apple.scss

Calculator

Tiles CSS Theme

Visit: http://glimmer-cs-calculator-server.herokuapp.com/welcomes/tiles

server/glimmer-cs-calculator-server/app/assets/stylesheets/welcomes_tiles.scss

Calculator

Feature Suggestions

TODO.md

Change Log

CHANGELOG.md

Contributing to glimmer-cs-calculator

Copyright

MIT

Copyright (c) 2020 Andy Maleh. See LICENSE.txt for further details.

--

<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 /> Built with Glimmer DSL for SWT (JRuby Desktop Development GUI Library)

Glimmer Calculator icon made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a>