From March 14th to 16th, a group of Netguru developers visited the Wroc_love RB conference to learn about Ruby from a selection of international speakers. Here’s what our team discovered and want to share it with you!
From March 14th to 16th, a group of Netguru developers visited the wroc_love RB conference to learn about Ruby from a selection of international speakers. This year’s main topic was focused on how to improve Ruby/Rails architecture. Here’s what our team discovered and want to share it with you!
Getting started with microservices is no piece of cake. And it’s due to this slice of truth that Sebastian Sogamoso was inspired to give a brief talk in the area of SOA design.
He adamantly believes that the code served in tiny portions is better than a condensed form, therefore he tried to convince the audience to dismantle huge monoliths and rebuild them as small services, each focused on doing one thing well. The merits of this approach are clear, however, one should be aware of risks that arise from switching to that type of architecture.
The most important piece of advice to be gleaned from his slides was this: Unless you can build a structured monolith, switching to SOA will be painful and is not the answer to your problem.
Here’s the presentation:
The original schedule included a presentation to be given by Luca Guidi, who was going to tell us a few new things about the Lotus framework. Lotus, an open source, complete web framework, has been in development for more than a year now. The main goals for this framework are: maintaining simplicity, keeping DSL and conventions to a minimum, using Object Oriented Design at its best, and separating concerns between MVC layers.
Sadly, due to some logistical issues, Luca was unable to attend the conference and his presentation had to be removed from the talks schedule. This hasn't stopped people from talking about Lotus, both during a panel discussion, "Post-Rails world", and at Jan Dudulski's lightning talk.
Cancellation of the “The” Lotus-related talk at Wroc_love RB only served to pique my interest in the framework. After some digging, I came to the conclusion that I really like the ideas behind Lotus. Parts of the framework are differentiated into gems, like
Lotus::Controller, etc. - you can see a full list here. Each of the gems has a nice readme - so, if you feel like diving into just one of Lotus's parts, you can easily do so. As yet, Lotus exists only in the
0.x version, but this provides us with the opportunity to support the project in its early stages and help it to grow into a real alternative to Rails, which we’ve loved for more than 10 years already.
I’ve got to admit that Michal’s catchy presentation title quickly got my attention and I was really looking forward to hearing his talk.
We’re used to seeing the weight of influence that some of the more experienced developers have on the coding community, especially those who attract a lot of social media attention. We have a tendency to follow their advice, and oftentimes it ends up well for us, because let’s face it - they are really smart people. However, it’s not always the case.
Rules taken from one industry don’t necessarily apply to another, e.g., game development rules might not translate to web applications. I think this was the key point of Michal’s talk: before we jump to conclusions, we should first consider whether it’s worthwhile abandoning technology X in favour of technology Y, just because some famous programmer said so.
Nonetheless, when it comes software architecture, it is important to stay open-minded and respect other people’s choices, because there is usually an abundance of ways to build a great product. Instead of being reserved and skeptical, let’s keep the discussion going and share our experiences, we can only benefit from each other.
Feel free to check out the slides from the presentation:
Creating music using code is an interesting concept, especially when it comes to education. I myself tried multiple times to make my friends excited about programming. I ran workshops in which we created small apps together. It was pretty fun, but it took a while to break down their stereotypical thinking about coding being dull and boring. It would be much easier to just show them what Sonic Pi can do.
Because who doesn't think that creating music is cool?
Sonic Pi takes advantage of beautiful, easy-to-read Ruby syntax. People who haven't seen a single line of code in their life needn’t be intimidated. Creating a simple music program only requires running this IDE and typing “play 60”. You can also set intervals between notes, use loops to repeat a sequence, use different sounds and synthesisers - be creative with it! You can even change code while music is playing for a DJ-like experience. Nicolas Dermine showed us how it’s done. It was fun and didn’t seem complicated at all.
All you need to start is provided by this IDE. Sonic Pi doesn't require any preparations. It’s the perfect tool to introduce kids to code, and it should fit neatly into one school lesson period.
Here you can read more about Sonic Pi.
Unicorn is one of the most commonly used HTTP servers for Ruby on Rails applications, however, for many developers - like myself - it seems like magic.
During his talk, Thorsten Ball explained a huge facet of Unicorn’s magic by presenting UNIX code hiding beneath it. He told us about the Unicorn process lifecycle, and presented a few really interesting techniques based on Unicorn signal handling, for instance, increasing the number of worker processes, preloading or hot reload.
Preloading is a feature that allows us to spin a new worker process in less than a second, which really comes in handy when we decide to increase the number of those processes. Hot reload is a utility used to deploy an application with zero downtime, it works by creating a new master process with a new version of our application and spawning its workers before killing the old master process, which is pretty useful if we do not want our clients to suffer from server unavailability. I have to admit that this presentation clarified a lot for me regarding the HTTP server operation principles.
You can watch the presentation here.
It’s a Concept-Driven OOP Framework built on top of Rails. It simply superimposes its own brand of code structure, different from the ‘Rails way’. The main idea is to provide abstraction layers for all aspects of Rails. Fat models, global helpers, complex controllers will never be an issue while using Trailblazer’s architecture! It uses many of Apotonick’s previous gems, such as Cells and Reform, so, if you’re already familiar with them - jumping in should be even easier.
Trailblazer extends the conventional MVC stack in Rails and is definitely worth trying. It has many conventions that could help solve problems that have been around for years with a cleanly layered architecture.
wroc_love RB was certainly an event worth visiting - we came back with fresh insights, inspirations and new areas to explore in our Rails life. Hope you enjoyed our review!