Skip to main content


Showing posts from August, 2013

Wanelo Blog Post: Detangling Business Logic in Rails Apps with PORO Events and Observers

I recently wrote a blog post about how Wanelo uses events and observers in plain ruby , to model application events. The base code that supports it is available in the open sourced gem ventable . If you want your business logic "glue" to look like this below, read the above blog post. Wanelo :: Event :: ProductSave . configure do notifies Product , SaveNotification , SaveAction , inside : :transaction notifies ProductSaveWorker , ResaveEmailWorker end We have found so many applications of using events in the backend Rails application, that I can not imagine building another app without it. Having said that, right now Ventable does not support distributed events. But it absolutely could! I am considering writing a plugin for sidekiq background processing framework, that could notify any observer via a background job, and not inside the current ruby thread.    Another option is to use another thread! Lots of opt