Coder Social home page Coder Social logo

sample-glimmer-dsl-opal-rails-app's Introduction

Sample Glimmer DSL for Opal Rails App

This is a sample app built with Glimmer DSL for Opal, an experimental proof-of-concept web GUI adaptor for Glimmer desktop app samples (i.e. samples found in Glimmer DSL for SWT). It webifies them via Rails and Opal, allowing Glimmer desktop app samples to run on the web without changing a line of code.

Setup Instructions

This is a standard Rails app. As such, you may setup locally by cloning the repository and running the following commands from inside the app directory:

  • bundle
  • rails db:migrate
  • rails s

You should see all samples listed by default.

Sample Screenshot

Hosted Website

You may check out a hosted website on Heroku at:

https://sample-glimmer-dsl-opal-app.herokuapp.com/

Manual Sample Loading

Alternatively, you may load samples manually by editing app/assets/javascripts/application.rb and adding the code below to manually enable the sample you would like to see.

This is useful if you would like to experiment by adding your own samples or adding your Glimmer code directly inside the Document.ready? block.

In the version below, you can see that glimmer-dsl-opal/samples/hello/hello_world is the sample that is active.

require 'glimmer-dsl-opal'
require 'puts_debuggerer'

require 'glimmer-dsl-opal/samples/hello/hello_world'
# require 'glimmer-dsl-opal/samples/hello/hello_combo'
# require 'glimmer-dsl-opal/samples/hello/hello_computed'
# require 'glimmer-dsl-opal/samples/hello/hello_list_single_selection'
# require 'glimmer-dsl-opal/samples/hello/hello_list_multi_selection'
# require 'glimmer-dsl-opal/samples/hello/hello_browser'
# require 'glimmer-dsl-opal/samples/hello/hello_tab'
# require 'glimmer-dsl-opal/samples/hello/hello_custom_widget'
# require 'glimmer-dsl-opal/samples/hello/hello_custom_shell'
# require 'glimmer-dsl-opal/samples/hello/hello_radio'
# require 'glimmer-dsl-opal/samples/hello/hello_radio_group'
# require 'glimmer-dsl-opal/samples/hello/hello_group'
# require 'glimmer-dsl-opal/samples/hello/hello_checkbox'
# require 'glimmer-dsl-opal/samples/hello/hello_checkbox_group'
# require 'glimmer-dsl-opal/samples/hello/hello_date_time'
# require 'glimmer-dsl-opal/samples/hello/hello_table'
# require 'glimmer-dsl-opal/samples/hello/hello_button'
# require 'glimmer-dsl-opal/samples/hello/hello_message_box'
# require 'glimmer-dsl-opal/samples/hello/hello_pop_up_context_menu'
# require 'glimmer-dsl-opal/samples/hello/hello_menu_bar'
# require 'glimmer-dsl-opal/samples/elaborate/login'
# require 'glimmer-dsl-opal/samples/elaborate/tic_tac_toe'
# require 'glimmer-dsl-opal/samples/elaborate/contact_manager'
# require 'samples/nebula/c_date_time_gallery.rb'

Here is a version of app/assets/javascripts/application.rb where Glimmer GUI code is added directly.

require 'glimmer-dsl-opal'
require 'puts_debuggerer'

include Glimmer

shell {
  text 'Glimmer'
  label {
    text 'Hello, World!'
  }
}.open

License

MIT

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

--

Built with Glimmer (Ruby Desktop Development GUI Library)

sample-glimmer-dsl-opal-rails-app's People

Contributors

andyobtiva avatar

Stargazers

Wayne Vucenic avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

rubycoder amaleh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.