Reform gives you a form object that decouples your form from the database. It gives you all the goodies as validation and parameter filtering while working with all form rendering engines like simple_form. Here's the story.
The new release of roar-rails allows you passing user options to #respond_with and #consume! Also, overriding reading and writing of document fragments in representable is now easily achieved, but, hey, read the whole story here.
Roar, a REST framework gem, now comes with support for rendering and parsing the Collection+JSON format. Here's a litte introduction to Collection+JSON and how it works in roar.
The new Roar version now completely implements the HAL/JSON standard, including the long-awaited link arrays. Also, representer got some nice new features for polymorphism in your REST representations - check it out on my blog.
Have you ever wanted to use simple_form in a Sinatra app? The new cells version allows using Rails gems outside of Rails in any environment. And surprisingly this article describes how this works!
With the release of representable 1.2 - a gem to map (REST) documents to Ruby objects - some groovy things changed, like the treatment of nil and false values.
This brand-new post describes how to use Roar's representers and will_paginate to generate paginated REST documents. Also, we discuss how to move reusable logic into an abstract PaginationRepresenter.
Roar 0.10 got support for HAL+JSON, a new promising hypermedia REST format. Representable 1.1.6 got the :if option for conditional representing properties. Read it here.
Discussing the concept of REST and hypermedia we learn what is a hypermedia type, why HAL+JSON makes our life easier and how to fix a yummy fruit salad.
The fourth post in the "Ruby On REST" series explains how the roar-rails gem helps using Roar's representers in Rails REST services. Following the fruit and bowl example it discusses how to parse and render REST documents in a Rails environment.
In the 3rd post of the Ruby on REST series we learn a bit more about resources and why and how one particular model can be represented in multiple contexts.
Check out what stuff we're planning for 2012 on the Cells project (Rails decoupling, alternate Tilt rendering engine, ...) and learn about the new cells-filters gem that brings together callbacks and state-args.
A comprehensive introduction to the new Roar gem which puts focus on object-oriented REST documents with HATEOAS, hypermedia support, client and service usability, fast tests and saving the world.
In this screencast we learn how to use the event instance as a messaging object between widgets and how to partially update the page without having to re-render the entire widget.
The current helper implementation in Rails is not good. This post explains why and how to get out of this misery using draper, cells and some different approach.
Some say that you should only test your public API. I disagree officially in this blog post that shows pros and cons of testing private methods, too. I'd love to hear your opinions!
Long URLs and query parameters are nothing wrong in REST, however you're free to expose additional resources with dedicated URLs in your Rails project (or anywhere else). Read how resources, URLs and query parameters fit together and feel free to comment!
The first episode discusses the basics of Rails widget framework Apotomo: generating, rendering and event processing in widgets. Check out the 14 min. video here.
The representable gem helps to keep parsing and rendering representations in one place by letting you define mappings in your models (or anywhere else). This post briefly discusses how this works.
We released test_xml to help you testing XML with Test::Unit, MiniTest, RSpec and Cucumber. Here's an overview of the assertions and matchers making your life simpler.
Working with resource representations is the hardest part about REST. This blog post discusses how Rails handles de-/serialization of representations, the limitations of the Rails way and the problems when cluttering transformation rules. It then introduces the new roar gem which tries to solve all that with representers and more.
Read and discuss view caching in Rails, the pros and cons of fragment caching, how Cells handles caching, and why we should put work into testing cache mechanics.
Rails 3.0.4 will have view inheritance. This post discusses how this advanced technique can help having cleaner views, how it works in Rails and how to get real object-oriented partials with inheritance and overriding.
In the last post we wrote a sidebar widget which is now turned into a real AJAX widget using Apotomo, the one and only web components framework for Rails.
There's a lot of confusion about MVC and MVP, especially in Rails people try to break out from the monolithic MVC approach by using Presenters and Cells. Help me to clarify this pattern, read, comment, discuss and please insult me, again!
This nerd's tutorial helps understanding how Blueprint, Compass, SASS and Rails work together to make better-looking pages. It is addressed to non-designers like me.
MVC doesn't mean there has to be one monolithic controller to rule 'em all! Some people seem to confuse that, in this post I'd like to clarify what MVC really is and how it should be used in Rails.
A step-by-step guide on testing your gemified Rails 3 engines using a dummy rails app with enginex. If you like it, comment and tell me you like it. If you don't like it, comment and tell me you don't like it.
What steps does it take to improve your architecture with Cells? This article discusses the best practices from keeping views dumb, via slim controllers, how to avoid messy helpers, through to hiding your caching strategy and component-oriented teams.
A vivid discussion about the benefits of ActiveSupport in gems lead me to releasing a new version of hooks without the ActiveSupport dependency. I'd love to hear your thoughts about the future of do-it-all ruby feature libraries like ActiveSupport (please comment on the blog post)
A small post how to use hooks, a new gem on the block. It shows how simple hooks and callbacks (like a before_filter) can be implemented or how you can improve your application code.
A great feature in Rails Cells is view inheritance, which helps keeping your views clean and DRY. It needed some publicity so I wrote a small article about it.
ActiveHelper is a generic framework for writing clean helpers with defined interfaces. It is geared towards usage in frameworks like Rails, Merb, Sinatra or your own project. Check out my introducing blog post and yada yada.
Apotomo brings stateful components to Ruby and Rails. Finally we started a tutorial series showing all the bits and pieces of widget implementation, event triggering and handling, AJAX page updating and component-oriented architecure.
Check out this blog post if Ruby's Observable is not enough and you want generic mechanics for bubbling events in your Ruby objects. The gem's somehow comparable to JavaScript's event system but is pure Ruby, lightweight, simple, small and tested.