Posty

Wyświetlanie postów z maj, 2012

Apotomo - API done right

Obraz
During the wroc_love.rb conference I had the opportunity to speak with Nick Sutterer (the original author and maintainer of great Cells and Apotomo gems) and thank him for the architectural choices made for the libraries. He said that I should blog about and help spread the good word instead of just telling him about the things that I like. So, here I am writing this post and keeping my promise.

The architectural choices are not obvious when reading Apotomo tutorial and probably they don't bring so much to most users of the library. Nevertheless they were extremely important to me. If you are not familiar with apotomo, just jump to the official website and Apotomo tutorial to get an idea of how it works.

Here is a little example of what we used apotomo widgets for:


Conceptually in apotomo it all starts in a controller.

But that's a very simple and basic thing you can do with apotomo. It all becomes much more interesting when you realize that the proc used by has_widgets method…