wroc_love.rb - another solid year

Michał Simka

wroc_love.rb - another solid year

Over the weekend of March 13th–15th, Wrocław hosted another edition of wroc_love.rb – the best Java PHP conference in the Ruby world. Ruby is our life and our love, so showing up here was a no brainer – twelve people from Monterail enjoyed great talks at the Institute of Computer Science. This is short summary of the talks that I enjoyed most.

Unicorn Unix Magic Tricks

This talk, by Thorsten Ball, about how features of Unicorn web server are implemented was certainly the best one to have as an opener. I had never thought how great features like hot reloading and proper signal support could be implemented – it had always been a completely foreign and magic land – one that I was always afraid to visit. During the presentation we were taken on a great journey to this land where we learned about fork, pipes and sockets in Unix and how are they used by Unicorn internals. The talk was very thought-provoking and although I'm not a Unix power user by any stretch, Thorsten did a really great job of explaining everything comprehensibly. It was great to learn how such a server works on the inside, but the best part for me was understanding that such powerful features can be implemented using simple tools that are combined in a clever way.

Microservices

Microservices has been a hot topic recently that has often been described as a kind of holy grail. Fortunately Sebastian Sogamoso took a very different approach to his presentation at wroc_love.rb and to sum up his talk in one word, I would definitely use honest. He didn't sugarcoat anything – he just straight up stated that microservices are not going to fix your design problem and if you can't build a monolithic application, it's not for you yet. There were some common pitfalls pointed out as well, the biggest focusing on not violating the golden rule of microservices – You need to be able to make a change to a service and deploy it by itself without changing anything else. Another very important point was that complexity does not disappear when we use this model, it is just moved to the interaction level. Sebastian also gave some very nice examples concerning when it's good idea to use microservices, like when you need to scale a specific part of a monolithic application. I learned a lot from this talk and will gladly watch it again in the future.

Trailblazer & How I switched my brain from rails-way to modular architecture

These two nice talks are merged together because they are about the same problem – The Rails Way is not The Way when you want to create a complex application. They were drastically different but I really enjoyed both of them, particularly because I like this topic and I am trying to find a way of doing things with Ruby that will suit me the best.

On one hand there was Ivan Nemytchenko, who told us his story of complete refactoring, when he threw Rails away and used Sinatra with a completely different approach to code organization. Like in [Rediscovering the Joy of Design](http://hawkins.io/2014/01/rediscovering-the-joy-of-design/) by Adam Hawkins, he proposed use cases with form objects to separate concerns and keep code clean. As for databases, he used repositories for access and entity objects to represent domain objects that are not dependent on relations in RDBMS. It forced him to write a lot of low level code, which is not present when using ActiveRecord, but in return he gained total control and the database structure was no longer affecting application code. This is an overall great approach and I strongly agree with it, but the only problem I see here is a learning curve for someone who is just starting the journey of web programming in Ruby.

On the other hand there is Trailblazer by Nick Sutterer, which I think may be a good middle-ground between the mess of The Rails Way and the absolute freedom of Ivan's approach. Trailblazer is just a layer on top of Rails that changes the file structure of the project to be concept-oriented and introduces operation as a place to hold all of the business logic. Although I haven't used it yet, it seems well-thought-out and preserves the rails feeling, which I think will ease the learning of people newer to the web world.

Live Code Music

Nicolas Dermine showed us something that I didn't even realize existed – an environment to create music with Ruby! Sonic Pi is actively used around the world to teach programming and is surely great tool for doing that by coupling basic programming concepts with lots of fun. It is in fact a small IDE with syntax highlighting, autocomplete, and easy to understand tutorials and examples, so nothing needs to be done other than a simple installation. During his talk, Nicolas mostly live-coded and the music was generated using Sonic Pi and was playing the whole time. Having such a light and fun presentation about something completely new to me during such a thought-intensive day was really nice.

Volt

I've saved my favorite for last. The Volt presentation, with some live coding by Ryan Stout, was something that made me feel like I should drop everything and just go rewrite an application in this brand-new framework. Let's start from the beginning – Volt is an isomorphic web framework in Ruby, so you write code only once and it works for both your frontend and backend. It may seem crazy at first, mostly because Javascript is the king of the browser world, but Ryan explained his reasoning by showing how the technological stack for a Rails application has moved towards being unbearably complex over last ten years. He then introduced us to Opal, a Ruby to Javascript compiler that Volt uses to develop the frontend without writing any Javascript code. It turns out that transpiling isn't as bad as you may expect and Opal is making it even easier by providing source maps, framework code black-boxing and it's own IRB. Volt itself is built as a MVVM framework, embraces a components-oriented approach to organizing code and uses collections with the same interface to store data in different places. Although it is not ready for production yet and only supports MongoDB for now, I'm honestly hyped and will definitely try it in the near future.

Summary

There were more presentations, panels and lighting talks that I didn't mention here at all, but all of them were nicely prepared and interesting. This year was so packed with great ideas and new things to learn that it was very difficult to select which ones to highlight here. I can honestly say that it was another solid year at wroc_love.rb – the Polish Ruby community is really lucky that such a great conference is held right here in Poland.