Introducing dry-validation

We started experimenting with a new validation library under dry-rb organization a couple of months ago, and last month I released the first version of dry-validation. Since then I worked hard on improving it and adding support for i18n. Today, I released dry-validation 0.3.0 with a couple of bug fixes, new features and a complete support for i18n. Before I tell you what it is and how it can help you, let me start by explaining the reasoning behind this project....

December 7, 2015 · 8 min · Piotr Solnica

Ditch Your ORM

I’ve been promoting a functional approach in Ruby for a while now and even though it includes many different techniques and patterns, there’s this one idea, one fundamental idea that changes everything - immutability. But what does it even mean in Ruby? To freeze everything? That would be too slow, so no. Immutability-oriented design means that you avoid interfaces that can change your objects. Yes, there are plenty of methods in Ruby to mutate something, but when you are designing your object interfaces, you can design them in a way that your objects won’t change....

September 18, 2015 · 7 min · Piotr Solnica

Encapsulating Business Transactions With Transflow

It’s a known fact that when you deal with a big problem it’s good to split it into smaller problems, solve them in isolation using separate components and use an integration layer to combine them into a single unit. Unfortunately it’s easier said than done. In an OO language like Ruby there are countless approaches you can take to tackle complex scenarios in your application. Objects accumulating state, which gets mutated as a result of some business transaction, is already a complex thing to deal with....

August 17, 2015 · 5 min · Piotr Solnica

Importing Data With ROM and Transproc

Importing data into a database can be a complicated task. This process can be quite painful as you need to deal with data transformation, filling in missing information, specifying validation rules, handling errors and so on. Without proper tools to solve this problem it can become more complicated than it should be. In my current project at work I’m dealing with exactly that problem - we’re importing data from YAML documents into a PostgreSQL database....

July 15, 2015 · 9 min · Piotr Solnica

New Transproc Released

Transproc is a small library I wrote a couple of months back. It’s been growing nicely and yesterday its 0.3.0 version was released which redefined how it works and what it really is. I’m exicited about this project as it’s been used in ROM to implement its Mapper component and turned out to be very powerful and flexible while remaining simple. In this post I’d like to show you what transproc really is and how it can be used with other libraries....

July 13, 2015 · 3 min · Piotr Solnica

Cutting Corners or Why Rails May Kill Ruby

Today I’m tired and frustrated. And it’s not the first time that I have those negative feelings. Typically I just complain on twitter, lose some followers, wait a bit to calm down and move on. But today I need to vent and convert my negative emotions into something constructive and hopefully meaningful to others. Every time I simply whine about certain aspects of Ruby ecosystem and especially Rails people are asking me specific questions that I fail to address properly....

June 6, 2015 · 6 min · Piotr Solnica

Introducing Transproc - functional data transformations for Ruby

Data mapping, or how I prefer to call it - data transformations, is something I’ve tackled in a couple of projects already. First, in DataMapper ORM with its Property API. Then in Virtus, a project that started as an extraction of DataMapper Property API to a separate gem. Then Virtus evolved into something more powerful and quite a lot of people really enjoy using it until this day. The approach used in Virtus and many other libraries similar to Virtus is typical OO design....

April 16, 2015 · 4 min · Piotr Solnica

8 Things I Learned During 8 Years of Ruby and Rails

Check out a follow-up on Ruby Rogues Exactly 8 years ago I started working professionally as a rails developer. I’ve spent a lot of time working for various clients, on various projects - from small green-field apps to 5+ year old rails monstrosities. In addition to Rails development I got involved in OSS. Back in 2011 I joined DataMapper core team, a couple years later I started working on ROM project and effectively stopped working on DataMapper....

March 4, 2015 · 6 min · Piotr Solnica

Introducing Yesql for Ruby using ROM

Last week we released a new beta version of ROM and you’ll be able to read more about it on the official blog later this week. Today I’d like to tell you a little bit about a new adapter that I built for ROM that’s based on Yesql from the Clojure world. When I was working on ROM I was paying attention to other languages too searching for inspiration and Yesql was one of my favorite discoveries....

March 2, 2015 · 5 min · Piotr Solnica

About the new ROM release and what happens next

Last month I wrote about rebooting ROM project and today I’m very happy that after almost 300 commits I pushed Ruby Object Mapper 0.3.0 to rubygems.org. It’s a big milestone as the project enters a new path and ships with a complete support for SQL databases thanks to Sequel. More official and less personal announcement is right here. In this post I’d like to give you more insight into what’s happening with the project and how its development is going to be organized and why....

November 24, 2014 · 4 min · Piotr Solnica