REST in Place now with Multiline Editor

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 keep the jQuery backwards compatibility for a bit longer.

Check out the changes at http://github.com/janv/rest_in_place.git

REST in Place: Major update ahead

This week, I'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 (such as textarea, checkbox, etc.).

In November I got some pull requests for REST in Place which I didn't get to really have a look at until last week. I haven't really touched REST in Place in ages and wasn'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.

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't up to my standards anymore. Additionally I have received several pull requests for textarea support which all couldn'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'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.

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't know much about Prototype or mootools, I can't support both versions anymore. If someone is willing to work with me on this, I'll happily accept their contributions but I can'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.

One last thing: I will support jQuery < 1.4 until 1.4.1 comes out. 1.4 introduced some very nice changes which I'd like to make use of but since 1.4 seems a little buggy still, I'll continue to support the older versions for a little while.

REST in Place now Rails 2.0 compatible

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't submit the rails authenticity token and the requests weren't answered.

I fixed that problem yesterday in both the jQuery and the Prototype version (both included in the plugin.)

Check it out on the REST in Place project page.

AJAX vs. REST

A small shop I've been writing for for fathers pharmacy was a welcome playground for modeling my domain RESTful. During my ventures, two big issues had me thinking quite hard for a while and there's still no proper solution available. One of them was a DRY implementation of controllers for nested resources which I'll describe later, the other one was the outdated inplace editor plugin in Rails.

Continue reading