<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jan Varwig &#187; rest in place</title>
	<atom:link href="http://jan.varwig.org/archive/tag/rest-in-place/feed" rel="self" type="application/rss+xml" />
	<link>http://jan.varwig.org</link>
	<description>Somewhere between Hello World and HAL9000</description>
	<lastBuildDate>Sat, 03 Dec 2011 00:15:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>REST in Place 2.0</title>
		<link>http://jan.varwig.org/archive/rest-in-place-2-0?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rest-in-place-2-0</link>
		<comments>http://jan.varwig.org/archive/rest-in-place-2-0#comments</comments>
		<pubDate>Sat, 03 Dec 2011 00:15:10 +0000</pubDate>
		<dc:creator>Jan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rest in place]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://jan.varwig.org/?p=662</guid>
		<description><![CDATA[Two weeks ago I began rewriting REST in Place as a gemplugin for the Rails 3.1 asset pipeline. I just pushed the final version 2.0 to github and rubygems.org and want to give some hints on the new direction of the project. REST in Place has never been more than a proof-of-concept for me. It [...]]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago I began rewriting REST in Place as a gemplugin for the Rails 3.1 asset pipeline.
I just pushed the final version 2.0 to github and rubygems.org and want to give some hints on the new direction of the project.</p>

<p>REST in Place has never been more than a proof-of-concept for me. It worked, pretty well even, so I never bothered much to develop it further, especially since integrating JavaScript code with Rails apps was a bit of a pain. I did only the barest, necessary maintenance and never actually realized that there are people out there using it.</p>

<p>When Rails 3.1 came out, there was finally a way to properly integrate the code into Rails, so I sat down on a weekend and made some massive changes to REST in Place:</p>

<ul>
<li><strong>No more standalone</strong><br />
Since I don&#8217;t think anyone is using it in a different way, REST in Place is
now a pure Rails 3.1 gemplugin using the asset pipeline</li>
<li><strong>Specs</strong><br />
To facilitate development of new features and refactoring, the app now has a
<a href="http://pivotal.github.com/jasmine/">Jasmine</a> spec suite in the testapp. It can be run by visiting
<code>http://localhost:3000/jasmine</code></li>
<li><strong>CoffeeScript</strong><br />
Because if you&#8217;re not using <a href="http://jashkenas.github.com/coffee-script/">CoffeScript</a> there&#8217;s something wrong with you. It
makes JavaScript bearable again.</li>
<li><strong>Proper CSRF token support</strong><br />
This was hacky in the past but for a while Rails includes a standard mechanism
for providing CSRF information to JavaScript running on the page.</li>
<li><strong>Automatic detection of <code>include_root_in_json</code> setting in Rails</strong><br />
Through the magic of erb and the asset pipeline, REST in Place can detect
how you&#8217;ve configured ActiveRecord.</li>
<li><strong>BC breaking interface changes</strong><br />
Two major things have changed that might trip you up:

<ul>
<li>The default css class for REST in Place is now <code>rest-in-place</code> and not 
<code>rest_in_place</code>.</li>
<li>Elements with that default class are initialized automatically on
<code>document.ready</code>.</li>
<li>The jQuery function to intialize elements with a REST in Place Editor was
renamed from <code>rest_in_place()</code> to <code>restInPlace()</code>.</li>
</ul></li>
</ul>

<p>All this is now available in a nice gem. All you need to do is add <code>gem 'rest_in_place'</code> to your Gemfile and you&#8217;re rollin&#8217; (You might want to take a look into the README first).</p>

<p>Now that I have CoffeeScript and specs, development of new features can be done much faster and easier.
Some things I have planned:</p>

<ul>
<li>Differentiate between manual abort and a failure</li>
<li>Validations/proper error responses</li>
<li>Maybe a nicer set of default widgets and UI improvements</li>
<li>Rails view helpers</li>
</ul>

<p>Especially the last two points go a bit against my original intentions for REST in Place, but if it helps more people to use it, hell, why not.</p>

<p>Unfortunately, these changes have come with a <em>very</em> bad timing. <em>One day</em> after I pushed the first beta of 2.0 to github, Ryan Bates did a <a href="http://railscasts.com/episodes/302-in-place-editing">Railscast about in place editing</a>. While REST in Place is mentioned there, he&#8217;s showing <a href="https://github.com/bernat/best_in_place">Best In Place</a>, a pretty extensive fork of my code that already has most of what I just wrote (asset pipeline, specs) or am going to write (validations, helpers).</p>

<p>Well, as frustrating as that was, I didn&#8217;t come as much of a surprise, considered how I&#8217;ve neglected REST in Place&#8217;s development in the past. I won&#8217;t repeat that mistake again, promise.</p>
 <p><a href="http://jan.varwig.org/?flattrss_redirect&amp;id=662&amp;md5=040ec4b10e7de4f54357a94226637c09" title="Flattr" target="_blank"><img src="http://jan.varwig.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://jan.varwig.org/archive/rest-in-place-2-0/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST in Place now with Multiline Editor</title>
		<link>http://jan.varwig.org/archive/rest-in-place-now-with-multiline-editor?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rest-in-place-now-with-multiline-editor</link>
		<comments>http://jan.varwig.org/archive/rest-in-place-now-with-multiline-editor#comments</comments>
		<pubDate>Fri, 05 Feb 2010 18:00:36 +0000</pubDate>
		<dc:creator>Jan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest in place]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://jan.varwig.org/?p=247</guid>
		<description><![CDATA[Yesterday I pushed the changes introducing the Multiline editor to REST in Place I announced last week. The definition of forms for editing inline-content is now separated from the Code that deals with Ajax and editing state. This makes it very easy to extend REST in Place with your own Editors. I also decided to [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I pushed the changes introducing the Multiline editor to REST in Place I announced last week.</p>

<p>The definition of forms for editing inline-content is now separated from the Code that deals with Ajax and editing state.
This makes it very easy to extend REST in Place with your own Editors.</p>

<p>I also decided to keep the jQuery backwards compatibility for a bit longer.</p>

<p>Check out the changes at <a href="http://github.com/janv/rest_in_place.git">http://github.com/janv/rest_in_place.git</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jan.varwig.org/archive/rest-in-place-now-with-multiline-editor/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST in Place: Major update ahead</title>
		<link>http://jan.varwig.org/archive/rest-in-place-major-update-ahead?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rest-in-place-major-update-ahead</link>
		<comments>http://jan.varwig.org/archive/rest-in-place-major-update-ahead#comments</comments>
		<pubDate>Mon, 25 Jan 2010 00:08:44 +0000</pubDate>
		<dc:creator>Jan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[inplace editor]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest in place]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://jan.varwig.org/?p=237</guid>
		<description><![CDATA[This week, I&#8217;ll roll out a major update to REST in Place. I have completely restructured the code and made the Plugin much more object-oriented, modular and maintainable. Existing installations should be able to upgrade without a hitch. The most important change for users will be the jQuery 1.4 support and support for different editors [...]]]></description>
			<content:encoded><![CDATA[<p>This week, I&#8217;ll roll out a major update to <a href="http://github.com/janv/rest_in_place/">REST in Place</a>. I have completely restructured the code and made the Plugin much more object-oriented, modular and maintainable. Existing installations should be able to upgrade without a hitch. The most important change for users will be the jQuery 1.4 support and support for different editors (such as textarea, checkbox, etc.).</p>

<p>In November I got some pull requests for REST in Place which I didn&#8217;t get to really have a look at until last week. I haven&#8217;t really touched REST in Place in ages and wasn&#8217;t really aware that it was that popular. It has 72 followers and 11 forks on github and who knows how many other people are just silently using it! So, I merged in the contributions and dealt with some issues in the tracker and thought about how to go on.</p>

<p>REST in Place originally was a mere proof of concept and one of my first projects in JavaScript and jQuery. I have since written a lot more complicated applications and even a diploma thesis on JavaScript and the old code just isn&#8217;t up to my standards anymore. Additionally I have received several pull requests for textarea support which all couldn&#8217;t be merged because they were just copypasted and modified a little from the input-tag version. The only solution was a complete rewrite and that&#8217;s what I did. While the plugin still works the same way, the code is properly split up and more modular now. This enables easy extension and maintenance from now on and hopefully quicker development from me and better patches from all users.</p>

<p>This new development has some drawbacks too, unfortunately. This massive improvement will only go to the jQuery version of REST in Place. Since I don&#8217;t know much about Prototype or mootools, I can&#8217;t support both versions anymore. If someone is willing to work with me on this, I&#8217;ll happily accept their contributions but I can&#8217;t do this on my own. If anyone is willing to do so, please reply in the comments, so we can work out a plan. I want to keep all three versions as similar as possible, this means the Prototype and mootools versions should follow the same object-oriented structure as the jQuery version.</p>

<p>One last thing: I will support jQuery &lt; 1.4 until 1.4.1 comes out. 1.4 introduced some very nice changes which I&#8217;d like to make use of but since 1.4 seems a little buggy still, I&#8217;ll continue to support the older versions for a little while.</p>
]]></content:encoded>
			<wfw:commentRss>http://jan.varwig.org/archive/rest-in-place-major-update-ahead/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST in Place now with mootools support</title>
		<link>http://jan.varwig.org/archive/rest-in-place-now-with-mootools-support?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rest-in-place-now-with-mootools-support</link>
		<comments>http://jan.varwig.org/archive/rest-in-place-now-with-mootools-support#comments</comments>
		<pubDate>Mon, 02 Mar 2009 23:33:42 +0000</pubDate>
		<dc:creator>Jan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[correctness]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[rest in place]]></category>

		<guid isPermaLink="false">http://jan.varwig.org/?p=136</guid>
		<description><![CDATA[Thanks to a patch from Kevin Valdek rest_in_place now comes in three flavours: Prototype, jQuery and mootools. He also was so kind to improve the included testapp a little. Please check out the changes at http://github.com/janv/rest_in_place/tree/master and on the project page. Convenience vs. validity Regarding the project page. In itself it&#8217;s kinda pointless since it [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to a <a href="http://github.com/janv/rest_in_place/commit/086b409d38932426540f402bb642c66165c78976">patch from Kevin Valdek</a> rest_in_place now comes in <em>three</em> flavours:<br />
Prototype, jQuery and mootools.</p>

<p>He also was so kind to improve the included testapp a little.</p>

<p>Please check out the changes at <a href="http://github.com/janv/rest_in_place/tree/master">http://github.com/janv/rest_in_place/tree/master</a>
and on the <a href="http://jan.varwig.org/projects/rest-in-place">project page</a>.</p>

<h3>Convenience vs. validity</h3>

<p>Regarding the project page.</p>

<p>In itself it&#8217;s kinda pointless since it contains nothing more than the readme which you can also see in all its glory over at github. But it&#8217;s invaluable for feedback through the comments. <a href="http://colaiuta.net/">Wincent Colaiuta</a> posted a <a href="http://jan.varwig.org/projects/rest-in-place#comment-722">remark</a> about the standards compliance of the custom attributes RIP uses, which I have to admit is kinda valid:</p>

<blockquote>
  <p>Haven’t looked at the code yet, but I like the idea very much.</p>
  
  <p>The only problem is those non-standard attributes that you’re jamming into the divs and spans are not valid HTML (well, I admit, I only checked them with an XHTML validator; I don’t actually know if they’d be considered valid for any particular other version of HTML or XHTML).</p>
  
  <p>For me that’s a bit of a show-stopper, as I don’t want my pages spitting out validation errors if anyone feeds them into a validator.</p>
  
  <p>Other than that, looks like a great idea though.</p>
</blockquote>

<p>However it also kinda <em>isn&#8217;t</em>.</p>

<p>I <a href="http://jan.varwig.org/projects/rest-in-place#comment-723">replied</a>:</p>

<blockquote>
  <p>I understand your concern but let’s be honest for a minute ;)</p>
  
  <p>These additional attributes might be undefined in XHTML but are syntactically correct and will just be ignored by browsers. They provide a very convenient and concise way of specifying how to edit the fields.
  They pose no actual harm to a user’s browsing experience. Neither directly (in the form of malfunctions) nor indirectly (like what the widespread use of really ill-formed HTML did to web development in the past).</p>
  
  <p>As a computer scientist I understand the desire for absolute correctness.
  But as an actual application developer, my users are my target audience, not fellow nerds who like feed my pages into validators (no offense).
  A little pragmatism can’t hurt once in a while if you want to get things done.</p>
</blockquote>

<p>Is this a case of correctness for the sake of correctness?
Or were it little steps like this what led us to the browser wars and <a href="http://www.stopie6.org/">IE6</a>?
Should REST in Place give up convenience for the sake of correctness?
How do others deal with inofficial attributes. I know a lot of people and a lot of situations where they saved developers a lot of time and headache.</p>
]]></content:encoded>
			<wfw:commentRss>http://jan.varwig.org/archive/rest-in-place-now-with-mootools-support/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST in Place now on Github</title>
		<link>http://jan.varwig.org/archive/rest-in-place-now-on-github?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rest-in-place-now-on-github</link>
		<comments>http://jan.varwig.org/archive/rest-in-place-now-on-github#comments</comments>
		<pubDate>Sat, 20 Sep 2008 21:34:10 +0000</pubDate>
		<dc:creator>Jan</dc:creator>
				<category><![CDATA[on Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rest in place]]></category>

		<guid isPermaLink="false">http://jan.varwig.org/?p=90</guid>
		<description><![CDATA[After using Mercurial for 7 months we at 9elements have finally given in to the internet peer pressure und switched to git (Well, to be honest, several shortcomings in Mercurial played an important role too). Since then I&#8217;ve become accustomed to git and today ported over REST in Place from Subversion to Github. The Github [...]]]></description>
			<content:encoded><![CDATA[<p>After using <a href="http://selenic.com/mercurial/">Mercurial</a> for 7 months we at 9elements have finally given in to the internet peer pressure und switched to <a href="http://git.or.cz/">git</a> (Well, to be honest, several shortcomings in Mercurial played an important role too). Since then I&#8217;ve become accustomed to git and today ported over <a href="http://jan.varwig.org/projects/rest-in-place">REST in Place</a> from Subversion to Github.<br />
The Github project page ist located at <a href="http://github.com/janv/rest_in_place/">http://github.com/janv/rest_in_place/</a>, the repository can be found at <code>git://github.com/janv/rest_in_place.git</code>.</p>

<p>I&#8217;ve updated the README and the <a href="http://jan.varwig.org/projects/rest-in-place">project page</a> with the new information.</p>

<p>I&#8217;ve also published my <a href="http://github.com/janv/dbserialize/">dbserialize plugin at Github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jan.varwig.org/archive/rest-in-place-now-on-github/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST in Place now Rails 2.0 compatible</title>
		<link>http://jan.varwig.org/archive/rest-in-place-now-rails-20-compatible?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rest-in-place-now-rails-20-compatible</link>
		<comments>http://jan.varwig.org/archive/rest-in-place-now-rails-20-compatible#comments</comments>
		<pubDate>Fri, 27 Jun 2008 17:41:27 +0000</pubDate>
		<dc:creator>Jan</dc:creator>
				<category><![CDATA[on Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest in place]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://jan.varwig.org/?p=86</guid>
		<description><![CDATA[Ever since Rails 2.0 came out, my REST in Place Plugins stopped working because of the request forgery protecting introduced into ActiveController. The AJAX request didn&#8217;t submit the rails authenticity token and the requests weren&#8217;t answered. I fixed that problem yesterday in both the jQuery and the Prototype version (both included in the plugin.) Check [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since Rails 2.0 came out, my REST in Place Plugins stopped working because of the request forgery protecting introduced into ActiveController. The AJAX request didn&#8217;t submit the rails authenticity token and the requests weren&#8217;t answered.</p>

<p>I fixed that problem yesterday in both the <a href="http://www.jquery.com/">jQuery</a> and the <a href="http://www.prototypejs.org/">Prototype</a> version (both included in the plugin.)</p>

<p>Check it out on the <a href="http://jan.varwig.org/projects/rest-in-place">REST in Place</a> project page.</p>
]]></content:encoded>
			<wfw:commentRss>http://jan.varwig.org/archive/rest-in-place-now-rails-20-compatible/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

