Skip to content

epeios-q37/atlas-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Atlas toolkit is available for:

Java Node.js Perl Python Ruby

To see the Atlas toolkit in action:

Version 0.13

Ruby version of the Atlas toolkit

Version 0.13 license: MIT Documentation

A GUI with Ruby in a couple of minutes

Click the animation to see a screencast of programming this "Hello, World!" program with Ruby in a matter of minutes:

Building a GUI in with Ruby in less then 10 minutes

Same video on Peertube: https://s.q37.info/fj3trgds.

Click to see the corresponding source code
require 'Atlas'
 
$BODY =
<<~HEREDOC
<fieldset>
 <input id="Input" xdh:onevent="Submit" value="World"/>
 <button xdh:onevent="Submit">Hello</button>
 <hr/>
 <fieldset>
  <output id="Output">Greetings displayed here!</output>
 </fieldset>
</fieldset>
HEREDOC
 
def acConnect(userObject, dom, id)
 dom.inner("", $BODY)
 dom.focus("Input")
end
 
def acSubmit(userObject, dom, id)
 name = dom.getValue("Input")
 dom.begin("Output", "<div>Hello, " + name + "!</div>")
 dom.setValue("Input", "")
 dom.focus("Input")
end
 
CALLBACKS = {
 "" => method(:acConnect),
 "Submit" => method(:acSubmit)
}
 
Atlas.launch(CALLBACKS)

See for yourself right now - it's quick and easy!

# You can replace 'github.com' with 'framagit.org'.
# DON'T copy/paste this and above line!
git clone https://github.com/epeios-q37/atlas-ruby
cd atlas-ruby/examples
ruby -I../atlastk Hello/Hello.rb

Your turn

If you want to take your code to the next level, from CLI to GUI, then you found the right toolkit.

With the Atlas toolkit, you transform your programs in modern web applications (SPA) without the usual hassles:

  • no JavaScript to write; only HTML(/CSS) and Ruby,
  • no front and back end architecture to bother with,
  • no web server (Apache, Nginx…) to install,
  • no need to deploy your application on a remote server,
  • no incoming port to open on your internet box or routeur.

The Atlas toolkit is written in pure Ruby, with no native code and no dependencies, allowing the Atlas toolkit to be used on all environments where Ruby is available.

And simply by running them on a local computer connected to internet, applications using the Atlas toolkit will be accessible from the entire internet on laptops, smartphones, tablets…

Content of the repository

The Atlas directory contains the Ruby source code of the Atlas toolkit, which is not needed to run the examples.

The examples directory contains some examples.

To run an example, launch, from the examples directory, ruby -I../atlastk <Name>/main.rb, where <Name> is the name of the example (Blank, Chatroom…).

About

World's lightest toolkit to quickly and easily add a GUI to your Ruby programs and bring them online.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project