<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Persistent Objects with Persevere the client and Jsponic the server</title>
	<atom:link href="http://ajaxian.com/archives/persistent-objects-with-persevere-the-client-and-jsponic-the-server/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/persistent-objects-with-persevere-the-client-and-jsponic-the-server</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: Kris Zyp</title>
		<link>http://ajaxian.com/archives/persistent-objects-with-persevere-the-client-and-jsponic-the-server/comment-page-1#comment-258050</link>
		<dc:creator>Kris Zyp</dc:creator>
		<pubDate>Thu, 01 Nov 2007 04:48:17 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2838#comment-258050</guid>
		<description>SchizoDuckie: 
You are right, it was overly complicated, the client-server REST communication should be as simple and 
readable as possible. I have revised Persevere to use semantic REST method communication that is simple 
enough you can intuitively persist data to the Persevere server with simple XHR-HTTP requests using a 
bare HTTP client (like RESTTest).</description>
		<content:encoded><![CDATA[<p>SchizoDuckie:<br />
You are right, it was overly complicated, the client-server REST communication should be as simple and<br />
readable as possible. I have revised Persevere to use semantic REST method communication that is simple<br />
enough you can intuitively persist data to the Persevere server with simple XHR-HTTP requests using a<br />
bare HTTP client (like RESTTest).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mikael bergkvist</title>
		<link>http://ajaxian.com/archives/persistent-objects-with-persevere-the-client-and-jsponic-the-server/comment-page-1#comment-256566</link>
		<dc:creator>mikael bergkvist</dc:creator>
		<pubDate>Thu, 04 Oct 2007 15:59:30 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2838#comment-256566</guid>
		<description>&quot;If widgetplus does have something to offer to the topic at hand, please link to a page that explains more&quot;

Ok, this page in particular then, http://www.widgetplus.com/testbed2.htm</description>
		<content:encoded><![CDATA[<p>&#8220;If widgetplus does have something to offer to the topic at hand, please link to a page that explains more&#8221;</p>
<p>Ok, this page in particular then, <a href="http://www.widgetplus.com/testbed2.htm" rel="nofollow">http://www.widgetplus.com/testbed2.htm</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris Zyp</title>
		<link>http://ajaxian.com/archives/persistent-objects-with-persevere-the-client-and-jsponic-the-server/comment-page-1#comment-256443</link>
		<dc:creator>Kris Zyp</dc:creator>
		<pubDate>Wed, 03 Oct 2007 04:11:31 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2838#comment-256443</guid>
		<description>Justin,
PJS is not constructor, pjs is just a namespace for the API, but you have the right idea. So you could do:
tasks = pjs.load(&#039;/tasks/&#039;); // causes a get request for the url &#039;/tasks&#039; and assumes that it returns a JSON array of tasks
tasks[1] == pjs.load(&#039;/tasks/1&#039;) // this should be true
And yes, if you have a relationships setup correctly, you could do
myproject = pjs.load(&#039;/projects/18&#039;)
mytask = myproject.tasks[2];
As far as the REST operations, Persevere currently does not use the PUT and DELETE verbs. Persevere uses a more idioms more similiar to JavaScript where you don&#039;t delete objects, you delete references to objects, so DELETE is not really an appropriate verb. I can easily use the PUT verb, but to actually follow the HTTP spec for PUTs is just too constraining for dynamic data and scalability. In particular, Persevere wraps multiple operations into single requests. This improves performance and it provides a natural indication of transactions. I could use the PUT method to indicate that data is being put, but I have wanted to be more precise in sticking to the HTTP/REST specifications so I have not done that. I could certainly change that.
I would certainly be interested in seeing what would need to be done to implement JSPON compliance with RoR. Maybe I need to learn RoR...</description>
		<content:encoded><![CDATA[<p>Justin,<br />
PJS is not constructor, pjs is just a namespace for the API, but you have the right idea. So you could do:<br />
tasks = pjs.load(&#8216;/tasks/&#8217;); // causes a get request for the url &#8216;/tasks&#8217; and assumes that it returns a JSON array of tasks<br />
tasks[1] == pjs.load(&#8216;/tasks/1&#8242;) // this should be true<br />
And yes, if you have a relationships setup correctly, you could do<br />
myproject = pjs.load(&#8216;/projects/18&#8242;)<br />
mytask = myproject.tasks[2];<br />
As far as the REST operations, Persevere currently does not use the PUT and DELETE verbs. Persevere uses a more idioms more similiar to JavaScript where you don&#8217;t delete objects, you delete references to objects, so DELETE is not really an appropriate verb. I can easily use the PUT verb, but to actually follow the HTTP spec for PUTs is just too constraining for dynamic data and scalability. In particular, Persevere wraps multiple operations into single requests. This improves performance and it provides a natural indication of transactions. I could use the PUT method to indicate that data is being put, but I have wanted to be more precise in sticking to the HTTP/REST specifications so I have not done that. I could certainly change that.<br />
I would certainly be interested in seeing what would need to be done to implement JSPON compliance with RoR. Maybe I need to learn RoR&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Meyer</title>
		<link>http://ajaxian.com/archives/persistent-objects-with-persevere-the-client-and-jsponic-the-server/comment-page-1#comment-256437</link>
		<dc:creator>Justin Meyer</dc:creator>
		<pubDate>Wed, 03 Oct 2007 01:07:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2838#comment-256437</guid>
		<description>Mikael, please stop spamming Ajaxian.  I&#039;ve seen you link to your homepage at least 3 times in the past month or so (http://ajaxian.com/archives/google-launches-javascript-api-that-allows-you-to-write-back).
But you never link to anything useful to the discussion.  

If widgetplus does have something to offer to the topic at hand, please link to a page that explains more.

Kris, I&#039;m using RoR, but I&#039;m often making RESTful JSON services.  Something like -  get: /tasks/1 returns 
{ id: 2, name: &#039;mow lawn&#039; }

On a high level, 
What would I have to do to change Rails default services to implement JSPON? 

Does JSPON rest services use the same type of URL method maping (i.e. get, post, put, delete, with urls like /tasks/1) as typical REST services?

Assuming the conversion would be trivial, how would I open the resource?
Would their be a different pjs for each model?  Something like:
taskpjs = new PJS(&#039;/tasks&#039;)
taskpjs.load(1)

projectpjs = new PJS(&#039;/project)
projectpjs.load(18);

If a project had many tasks, I&#039;d also like to do something like

projectpjs.tasks

and get a list of tasks

Is this possible?</description>
		<content:encoded><![CDATA[<p>Mikael, please stop spamming Ajaxian.  I&#8217;ve seen you link to your homepage at least 3 times in the past month or so (<a href="http://ajaxian.com/archives/google-launches-javascript-api-that-allows-you-to-write-back" rel="nofollow">http://ajaxian.com/archives/google-launches-javascript-api-that-allows-you-to-write-back</a>).<br />
But you never link to anything useful to the discussion.  </p>
<p>If widgetplus does have something to offer to the topic at hand, please link to a page that explains more.</p>
<p>Kris, I&#8217;m using RoR, but I&#8217;m often making RESTful JSON services.  Something like &#8211;  get: /tasks/1 returns<br />
{ id: 2, name: &#8216;mow lawn&#8217; }</p>
<p>On a high level,<br />
What would I have to do to change Rails default services to implement JSPON? </p>
<p>Does JSPON rest services use the same type of URL method maping (i.e. get, post, put, delete, with urls like /tasks/1) as typical REST services?</p>
<p>Assuming the conversion would be trivial, how would I open the resource?<br />
Would their be a different pjs for each model?  Something like:<br />
taskpjs = new PJS(&#8216;/tasks&#8217;)<br />
taskpjs.load(1)</p>
<p>projectpjs = new PJS(&#8216;/project)<br />
projectpjs.load(18);</p>
<p>If a project had many tasks, I&#8217;d also like to do something like</p>
<p>projectpjs.tasks</p>
<p>and get a list of tasks</p>
<p>Is this possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris Zyp</title>
		<link>http://ajaxian.com/archives/persistent-objects-with-persevere-the-client-and-jsponic-the-server/comment-page-1#comment-256403</link>
		<dc:creator>Kris Zyp</dc:creator>
		<pubDate>Tue, 02 Oct 2007 14:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2838#comment-256403</guid>
		<description>SchizoDuckie: Persevere does indeed wrap up all the changes that occur in a given event into a single request (it doesn&#039;t try to send each one individually). This also provides implicit transaction wrapping. However, it doesn&#039;t usually wait for the end of the session. While that is certainly possible to do with Persevere, that does not seem to be advantageous, generally you want information to get back to the server as soon as possible so that other clients can use it.
Mikael: I don&#039;t see any info on your site about persistence, it looks like it is about widgets. And actually the persevere project originally sprung from a widget based framework &lt;a&gt;Authenteo&lt;/a&gt;, but I realized that developers probably want a solution that doesn&#039;t require there whole UI tightly coupled to their persistence layer.</description>
		<content:encoded><![CDATA[<p>SchizoDuckie: Persevere does indeed wrap up all the changes that occur in a given event into a single request (it doesn&#8217;t try to send each one individually). This also provides implicit transaction wrapping. However, it doesn&#8217;t usually wait for the end of the session. While that is certainly possible to do with Persevere, that does not seem to be advantageous, generally you want information to get back to the server as soon as possible so that other clients can use it.<br />
Mikael: I don&#8217;t see any info on your site about persistence, it looks like it is about widgets. And actually the persevere project originally sprung from a widget based framework <a>Authenteo</a>, but I realized that developers probably want a solution that doesn&#8217;t require there whole UI tightly coupled to their persistence layer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikael Bergkvist</title>
		<link>http://ajaxian.com/archives/persistent-objects-with-persevere-the-client-and-jsponic-the-server/comment-page-1#comment-256401</link>
		<dc:creator>Mikael Bergkvist</dc:creator>
		<pubDate>Tue, 02 Oct 2007 14:19:34 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2838#comment-256401</guid>
		<description>We have done this way easier over at http://www.widgetplus.com ..</description>
		<content:encoded><![CDATA[<p>We have done this way easier over at <a href="http://www.widgetplus.com" rel="nofollow">http://www.widgetplus.com</a> ..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SchizoDuckie</title>
		<link>http://ajaxian.com/archives/persistent-objects-with-persevere-the-client-and-jsponic-the-server/comment-page-1#comment-256397</link>
		<dc:creator>SchizoDuckie</dc:creator>
		<pubDate>Tue, 02 Oct 2007 13:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2838#comment-256397</guid>
		<description>While i get the whole persistency thing, i think this is kinda over-the-top (as with most Java-based stuff) 

For instance, i quote (from the specs):

 &lt;blockquote&gt;
append
this will append new values to the array. This should have an array as a value. Each array item should be a value to be inserted in the modified array. For example:

&lt;code&gt;
{&quot;id&quot;:&quot;5&quot;,  &quot;update&quot;:{    &quot;append&quot;:[{&quot;id&quot;:&quot;9&quot;}]  }}
&lt;/code&gt;

The array would now have one additional value, the object with an id of &quot;9&quot;.
&lt;/blockquote&gt;

Now WHY would you want to communicate this stuff with every change? You&#039;re going to do a JSON request via a JSON dialect to update a JSON array ? This is (IMO) typically the Java kind-of-thinking: The server *must* know about everything that&#039;s going on on the client and the server must do the processing. 

If I would build a persistency layer, i&#039;d transmit the whole serialized objects at the beginning of a user session to load something and at the end of the session (onUnload) to store the state.</description>
		<content:encoded><![CDATA[<p>While i get the whole persistency thing, i think this is kinda over-the-top (as with most Java-based stuff) </p>
<p>For instance, i quote (from the specs):</p>
<blockquote><p>
append<br />
this will append new values to the array. This should have an array as a value. Each array item should be a value to be inserted in the modified array. For example:</p>
<p><code><br />
{"id":"5",  "update":{    "append":[{"id":"9"}]  }}<br />
</code></p>
<p>The array would now have one additional value, the object with an id of &#8220;9&#8243;.
</p></blockquote>
<p>Now WHY would you want to communicate this stuff with every change? You&#8217;re going to do a JSON request via a JSON dialect to update a JSON array ? This is (IMO) typically the Java kind-of-thinking: The server *must* know about everything that&#8217;s going on on the client and the server must do the processing. </p>
<p>If I would build a persistency layer, i&#8217;d transmit the whole serialized objects at the beginning of a user session to load something and at the end of the session (onUnload) to store the state.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ric Johnson</title>
		<link>http://ajaxian.com/archives/persistent-objects-with-persevere-the-client-and-jsponic-the-server/comment-page-1#comment-256396</link>
		<dc:creator>Ric Johnson</dc:creator>
		<pubDate>Tue, 02 Oct 2007 13:18:11 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2838#comment-256396</guid>
		<description>The links are broken.  Also, you forgot to put in a link to the original story at &lt;a href=&quot;http://json.Com&quot; title=&quot;JSON&quot; rel=&quot;nofollow&quot;&gt;Json.com&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>The links are broken.  Also, you forgot to put in a link to the original story at <a href="http://json.Com" title="JSON" rel="nofollow">Json.com</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

