ActiveRecord/Resource in Silverlight
Reported by Jimmy Schementi | April 29th, 2008 @ 06:40 PM | in 0.3
Given this controller code:
client :index
def index
@people = Person.find(:all)
end
"index" will run on the client. However, what should Person.find do? It needs to somehow get to the database and get the data back on the client exactly how it was if it ran on the on server ... so:
1. Person.find should make a syncronous[1] web request back to the client for something like "http://#{http_host}/client_proxy/persons/"
2. The server will respond with the result of Person.find(:all).to_json
3. Person.find will return deserialize json converted into a Person array.
So, how to accomplish this?
- A model must have "acts_as_client" called at the class level: this will make the model accessible from /client_proxy//
- Any "acts_as_client" model will be sent to the client
- ActiveRecord on the client is really a wrapper for ActiveResource (???)
Comments and changes to this ticket
-
Jimmy Schementi April 29th, 2008 @ 08:42 PM
- Milestone set to 0.0
-
Jimmy Schementi May 22nd, 2008 @ 11:50 PM
- State changed from new to hold
Putting this on hold; worst comes to worst this doesn't need to be done for RailsConf
-
Jimmy Schementi June 22nd, 2008 @ 01:24 PM
- Milestone changed from 0.0 to 0.3
- State changed from hold to open
-
Jimmy Schementi July 7th, 2008 @ 03:31 PM
- State changed from open to new
- Tag set to teleport
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Silverlight and Rails integration with IronRuby