Tag Archives: rails
When inheritance and mixins become a design issue
Posted on 09. Mar, 2011 by Guilherme Silveira.
One object, more than 300 public methods, 560 instance and 300 class or static methods. It is easy to see that those objects tipically present low cohesion, more than one responsibility, tight coupling and a huge interface. A pattern known as “God Class”. You can create them in Java using class inheritance, or in Ruby [...]
Continue Reading
How restful results are handled in Restfulie with Rails
Posted on 14. Jun, 2010 by Guilherme Silveira.
Using a backport from a Rails 3, Restfulie responders enhance your response without you even noticing. Creating First, the new 201 support with correct headers in one cute line, supported by the created responder: @item = Item.create(params[:item]) respond_with @item, :status => :created Rendering Rendering a resource using a hypermedia based representation: @item = Item.find(params[:id]) respond_with [...]
Continue Reading
REST from scratch
Posted on 29. Apr, 2010 by guilhermesilveira.
This is the first post on a series of examples on how to use Rails and Restfulie on the server side and Restfulie and Mikyung on the client side to create REST based architectures. On this 10 minutes video you will learn how it is possible to make several representations of one resource available on [...]
Continue Reading
Restfulie 0.5, atom feeds, content negotiation and default controllers
Posted on 07. Jan, 2010 by guilhermesilveira.
ATOM FEED Restfulie 0.5.0 is out and its major new feature is its support to Atom feeds with variable media types. A feed can be easily rendered by invoking the to_atom method: @hotels = Hotel.all render :content_type => ‘application/atom+xml’, :text => @hotels.to_atom(:title=>’Hotels’, :controller => self) A collection might contain entries with different media types and [...]
Continue Reading
quit pretending, use the web for real: restfulie
Posted on 03. Nov, 2009 by guilhermesilveira.
Resource representation A simple resource representation in xml would be as <order> <product>basic rails course</product> <product>RESTful training</product> <price>500.00</price> </order> Note that it provides information on the order itself, as we are used to. But it lacks providing meta information on the business process: from here, I am unable to go anywhere. This resource still lacks [...]
SUBSCRIBE TO OUR RSS