RailsConf 2010 Restfulie
Basic demonstration for the RailsConf 2010 talk about RESTful and Restfulie
== Restfulie App Store Demo
Restfulie Demo using a sample scaffold app called "App Store". The idea being that there will be many apps registered that need to be evaluated and then approved or declined. Check out the 'app/model/app.rb' for the state machine.
This is the demo app I showed at my talk "Making Rails really Restful with Restfulie" at RailsConf 2010. If you want to see the slides, there you go:
http://www.slideshare.net/akitaonrails/making-rails-really-restful
== Setup
This app was tested with Ruby EE 1.8.7, Rails 2.3.8, Restfulie 0.8.1. Run 'rake reset' to create the database and the initial set of apps.
== Running
For now, you have 4 options of consumer clients:
- Mechanize
- ActiveResource
- Restfulie Client
- Restfulie Mikyung Client
For the Mechanize and ActiveResource to work, you will have to comment out the first 2 lines of 'app/controllers/apps_controller.rb' which is the 'include' method for Restfulie::Server and the 'respond_to' which includes :atom and :json. Then you need to uncomment the simpler 'respond_to' with just :html and :xml. And you also have to comment out the "config.gem 'restfulie'" declaration at the 'config/environment.rb' file.
Run the Mechanize version:
ruby client/mechanize.rb
Run the Active Resource version:
ruby client/active_resource.rb
Run the basic Restfulie client version:
ruby client/restfulie_client.rb
Run the Mikyung client:
ruby client/mikyung.rb
== Disclaimer
This is a very simple app designed to show case the many ways of interoperating with a Rails app. This is not a complete app, nor a complex workflow. The purpose is to serve as a simple demonstration app for RailsConf 2010.
Author: @AkitaOnRails