Re: Rendering of Remote Partials

Peter De Berdt
Fri, 11 May 2007 15:35:41 -0000

On 11 May 2007, at 04:18, doug wrote:

> Absolutely.  Let''s say that you''re a manufacturer of
widgets for sale
> to the general public.  You have a number of affiliates who market
> your widgets through their respective web sites.  Without using
> frames, you want to provide master content on your web server that can
> be incorporated into the respective websites of your affiliates.
> Since you control the content you don''t have to be concerned that
the
> content being touted by your affiliates is out of date.  Similarly,
> each your affiliates doesn''t have to update their web sites
whenever
> there is some change affecting the widget content such as a price
> change.  You  just update your master and it magically propogates to
> all of your affiliates.  Finally, and this is one of the reasons that
> I don''t want to use frames, if one carefully crafts both the
content
> being served by your web server and the respective pages of the
> affiliates into which that content is inserted, an external style
> sheet can be used to style the content.  That means that each of your
> affiliates can style the content that you provide so that it
> integrates nicely into their particular web site.
>
> So, unless we can come up with something better, maybe I should look
> at your wget suggestion.  What do you think?

There''s this thing called a webservice (whether it''s REST,
XML-RPC,
SOAP, …) that is meant to do exactly that: provide a link to remote
data. The only reason why you''d want to use the remote wgetting or
curl''ing, or whatever, is if you have no control over the application
on the other side. This probably isn''t the case, as you want the
remote server to serve you partials.

There are some really nifty features in EdgeRails (or available as a
plugin) that are aimed at providing an easy and DRY method for
accessing remote data through REST and it''s called ActiveResource.
It''s like ActiveRecord for REST services. Ryan has been writing up
some blog posts on this, they might help you get a better idea of the
possibilities: ryandaigle.com


Best regards

Peter De Berdt


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com