=begin rdoc :title:QooxView :main:QooxView.rb QooxView - a nice interface to use QooxDoo in Ruby, following the MVC-model. It is split in a *backend*, containing the _model_ and _controller_-part (and some of the _view_), written in Ruby, and the *frontend*, handling the main part of the _view_, written in JavaScript, using QooxDoo. *Backend* with logic, including - Entities for logical blocks (the _model_) - View for how to display the blocks (part of the _view_ and the _controller_) *Frontend*, holding all code to work with QooxDoo and display the _view_, linked to the Backend using RPC-calls It is thought to do as much autoconfiguration as possible. =View s Thus, the most simple example is the following: require 'QooxView.rb' class Welcome < View def initialize show_info :welcome, "hello world" end end QooxView::startWeb Which does nothing else than show off "hello world". We can add some buttons and act upon pressing them: require 'QooxView.rb' class Welcome < View def initialize show_info :welcome, "hello world" show_button :welt, :world end def rpc_button_welt( session, args* ) reply( :update, welcome: "Hallo Welt" ) end def rpc_button_world( session, args* ) reply( :update, welcome: "Hello world" ) end end QooxView::startWeb = Entities In addition to views, it is possible to have a _model_ of data using the *Entities*. Copied from ActiveRecords, there is the class in Plural, containing the general handling (searching, saving, loading) of the data, and the class in the singular, doing the handling of the special cases on one data. To make things nicer, a definition of an entity starts out with a list of the elements found therein, which happen to be used often also in the view-part, so it's a bit of both: === CSV storage === LDAP storage === SQLite storage = Other goodies === Session handling === Permission checking === Loading of Entities and View s from directories === Configuration-file There are two configuration-files: - $name.conf - which holds general configurations like data-directory - bash-style configuration, as it is also used by scripts - this file is searched upwards from the $name.rb, then in /etc, if not found. Deafault values used when not found: - DATA_DIR=/var/lib/$name - config.yaml - application-specific configuration that is not used by scripts - this file is searched in the DATA_DIR - if not present, will be copied into DATA_DIR =end require 'bundler/setup' require 'qooxview/qooxview'