Skip to main content

Posts

Showing posts from 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.configuredonotifiesProduct,SaveNotification,SaveAction,inside::transactionnotifiesProductSaveWorker,ResaveEmailWorkerend 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 options for concurrency.
Perhaps one day, it will look like this: Wanelo::Event::ProductSave.co…