Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

ActiveRecord/Resource in Silverlight

#8

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 (???)

Reported by Jimmy Schementi · April 29th, 2008 @ 06:40 PM

State: new
Milestone: 0.3
Assigned to: Jimmy Schementi Jimmy Schementi

Activity

  1. Jimmy Schementi
  2. Jimmy Schementi
    Jimmy Schementi
    • State changed from new to hold

    Putting this on hold; worst comes to worst this doesn't need to be done for RailsConf

    May 22nd, 2008 @ 11:50 PM

  3. Jimmy Schementi
    Jimmy Schementi
    • Milestone changed from 0.0 to 0.3
    • State changed from hold to open

    June 22nd, 2008 @ 01:24 PM

  4. Jimmy Schementi
    Jimmy Schementi
    • State changed from open to new
    • Tag set to teleport

    July 7th, 2008 @ 03:31 PM

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.