• Stars
    star
    119
  • Rank 297,930 (Top 6 %)
  • Language
    Ruby
  • License
    Other
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple client-side web application framework for Opal

Ovto

Client-side web framework for Opal

logo

Documents

Example

screenshot

require 'ovto'

class MyApp < Ovto::App
  class State < Ovto::State
    item :celsius, default: 0

    def fahrenheit
      (celsius * 9 / 5.0) + 32
    end
  end

  class Actions < Ovto::Actions
    def set_celsius(value:)
      return {celsius: value}
    end

    def set_fahrenheit(value:)
      new_celsius = (value - 32) * 5 / 9.0
      return {celsius: new_celsius}
    end
  end

  class MainComponent < Ovto::Component
    def render
      o 'div' do
        o 'span', 'Celcius:'
        o 'input', {
          type: 'text',
          onchange: ->(e){ actions.set_celsius(value: e.target.value.to_i) },
          value: state.celsius
        }
        o 'span', 'Fahrenheit:'
        o 'input', {
          type: 'text',
          onchange: ->(e){ actions.set_fahrenheit(value: e.target.value.to_i) },
          value: state.fahrenheit
        }
      end
    end
  end
end

MyApp.run(id: 'ovto')

See the book for details.

Setup

Static

./examples/static demonstrates how to convert Ovto app into a .js file.

Ovto + Sinatra

./examples/sinatra demonstrates how to serve Ovto app from Sinatra.

Ovto + Rails

yhara/vision is a working example of using Ovto with Rails 5.

Acknowledgements

Contact

https://github.com/yhara/ovto/issues

More Repositories

1

ppap-lang

(maybe yet another) programming language inspired by PPAP
Ruby
66
star
2

myrurema

A helper tool for rurema (The new Japanese Ruby reference manual)
Ruby
51
star
3

dxopal

Game development framework for Opal, API compatible to DXRuby
JavaScript
51
star
4

sinatbbs

A simple bbs system written with Sinatra and Sequel
Ruby
37
star
5

enumerable-lazy

**Deprecated (Part of the stdlib since Ruby 2.0)**
Ruby
35
star
6

simple_twitter

Dead simple twitter api (both v1 and v2) client for Ruby.
Ruby
25
star
7

ruby-station

Install/Distribute Ruby apps by gem
Ruby
21
star
8

ShogiModan

Ruby implementation of the programming language ModanShogi (LLVM support thanks by ujihisa and nanki)
Ruby
21
star
9

rumcoke

JavaScript in S-Expression
JavaScript
19
star
10

esolang-book-sources

Ruby
14
star
11

prismdoc

Toward Ruby reference manual everyone in the world can read
Ruby
14
star
12

dev-ruby

ruby-dev translation
Ruby
11
star
13

opal-raphael

Opal binding for Raphael.js
Ruby
10
star
14

reac

Reactive Proggraming in Ruby
Ruby
8
star
15

rk2015orescript

Tiny language with HM type inference
Ruby
8
star
16

ruby-sl

A tiny library to run SL(Steam locomotive) in your terminal
Ruby
8
star
17

gemi

Ruby
7
star
18

unbabel

The 'universal' foreign-funciton interface
6
star
19

boom

Ruby
6
star
20

rubiskell

Call Haskell function from Ruby script
Ruby
6
star
21

vision

A Todo-app written in Rails and Ovto.
Ruby
6
star
22

yarvinstructions

Ruby
6
star
23

sinatra_project_template

Ruby
4
star
24

MethodCallTracer

Enumerate methods actually invoked with TracePoint
Ruby
4
star
25

tickets

*moved*
JavaScript
4
star
26

jugti

Small web application to record your juggling practices
JavaScript
4
star
27

down

Simple game written in Ruby/SDL
Ruby
4
star
28

mruby-ruby

Ruby
4
star
29

underscore.jsx

JavaScript
3
star
30

nlog2

source code of yhara.jp
Ruby
3
star
31

g2

Ruby
3
star
32

reposh

Ruby
3
star
33

amazon_jp

A library to scrape amazon.co.jp
Ruby
3
star
34

gauche_on_rails

Fork of http://practical-scheme.net/wiliki/wiliki2.cgi?GaucheOnRails
3
star
35

senryakuteki

戦η•₯ηš„γƒ–γƒ­γ‚°γƒ‘γƒΌγ‚«γƒΌ
Ruby
2
star
36

moneyrail

A household account book, written in Rails
Ruby
2
star
37

watchkit

A library to help watching timestamps of filesystem
2
star
38

dxopal-starter-kit

Demo & Template for DXOpal
Ruby
2
star
39

monolist

Rails app to manage all the stuffs in your house
Ruby
2
star
40

ruby-prehistory

Ruby
2
star
41

takeout

Ruby
2
star
42

serve_dir

Ruby
2
star
43

ember_moon

Simple demo of data binding with Ember.js
JavaScript
2
star
44

bookmak

Ruby
2
star
45

kavlax

Ruby
2
star
46

fj-r

Featherweight Java implemented with Ruby
Ruby
2
star
47

smile

An esoteric language whose program is constructed with smiles :-)
Ruby
2
star
48

nicoshifts

Ruby
2
star
49

wordsfile

Simple wordbook application written in ramaze
Ruby
2
star
50

yhara.github.io

test
HTML
2
star
51

middleman-hikidoc

HikiDoc renderer for Middleman
Ruby
2
star
52

zanzou

Something like Ruby port of immer.js
Ruby
2
star
53

esolang-book-website

middleman repo of my book
Ruby
2
star
54

lifelog

Record your life.
Ruby
2
star
55

hello

Ruby
1
star
56

opera-presen-timer

An Opera widget for presentations, shows current and passed time
1
star
57

chizu_memo

Example for WEB+DB Vol.60
Ruby
1
star
58

slim-server

Ruby
1
star
59

icfpc2007

trying to find how Endo could be saved
Ruby
1
star
60

crampchat

Ruby
1
star
61

pointos

Pointos is a interactive visualizer of points, lines and circles.
Ruby
1
star
62

jpmobile_devise

Ruby
1
star
63

spellbook

Ruby
1
star
64

ovto-ide

Ruby
1
star
65

ticketmap

2-Dimentional TODO manager
JavaScript
1
star
66

advent_finder

Ruby
1
star
67

puzzle_and_rubyists

JavaScript
1
star
68

ramaze_project_template

Project template (I use) for Ramaze
Ruby
1
star
69

bathtub

Ruby
1
star
70

rskit

Ruby/SDL starter kit
Ruby
1
star
71

apple_catcher_yeah

JavaScript
1
star
72

sinatra_filer_template

Browse your local data in your browser with Sinatra
Ruby
1
star
73

adventofcode

1
star
74

tapl-ruby

WIP
Ruby
1
star
75

isruby

Haskell
1
star
76

atoken4me

Tiny Sinatra app to get the 'atoken' for twitter bots
Ruby
1
star
77

ICFPC2012

ICFP Programming Contest 2012 (Team yarunee)
Ruby
1
star
78

afpray

Wrapper application of afplay, made with Rails 3.2
Ruby
1
star
79

LearnXXWithEsolang

Go
1
star
80

jekyll_template

1
star
81

ramaze_culerity_example

Ruby
1
star
82

nyonmode

JavaScript
1
star
83

rk2019_afterhack

JavaScript
1
star
84

nesruby

C
1
star
85

ICFPC2011

Our submission to ICFP programming contest 2011 (team yarunee) http://www.icfpcontest.org/
Ruby
1
star
86

rubysdl-mac-gem

*this project is useless now* you can 'gem install rsdl' instead.
C
1
star