Remote Objects Rails Plugin
The Remote Objects plugin implements an HTTP protocol that allows
discovery, instantiation and method invocation of Ruby objects. Both
regular objects and session based objects, which save their state between
calls, are supported.
Installation
- Pre-requisite products installed: Ruby, Ruby on Rails, JSON for Ruby
- Create or identify the Rails environment you will use (location of
RAILS_ROOT).
- cd RAILS_ROOT/vendor/plugins
- Checkout the plugin code or extract the package files for this plugin.
- cd remote_objects
- ruby install.rb
Configuration
- edit RAILS_ROOT/lib/remote_class.rb to add class names to
RemoteClasses and/or RemoteSessionClasses arrays. This
specifies the classes to be used through this protocol.
- edit RAILS_ROOT/public/crossdomain.xml to enable access from any
(or all) client domains which you want to access the RemoteObjects. This is
for Flash based clients.
- RemoteObjects is designed to work with the default routes defined in
config/routes.rb so no change is required. See
lib/remote_object_controller.rb for more info.
- Start your Rails web server (e.g. script/server).
Usage
- Obtain the OpenLaszlo RemoteObjects library (or other implementation) and
use to access class objects defined above. Follow the directions given with
that package.
- You may want to test your setup by enabling and accessing some of the
classes defined in remote_test.rb
Author
Michael Hayden <mhayden AT genacode.com>
License
Copyright © 2007, 2008 Michael E. Hayden. All Rights Reserved.
This software is distributed under the terms of the MIT/X Open Source
License