Saturday, March 2, 2013

Ruby vs Java

There are probably hundreds if not thousands of articles with the title "Ruby vs Java" or "Java vs Ruby"; nevertheless I decided to write down my considerations about the way these two languages compare to each other.
So let's start by looking at the advantages that each language has over the other.

Friday, March 16, 2012

OmniContacts: import email contacts in your Rails application

Few days ago I released the first version of OmniContacts.
As it says in the README:

Inspired by the popular OmniAuth, OmniContacts is a library that enables users of an application to import contacts from their email accounts. The current version allows to import contacts from the three most popular web email providers: Gmail, Yahoo and Hotmail. OmniContacts is a Rack middleware, therefore you can use it with Rails, Sinatra and with any other Rack-based framework.

Sunday, February 12, 2012

Web applications and the business logic

The MVC pattern is the foundation of every web project. It is not necessary to talk over its principles and advantages as they have repeatedly been discussed.
While several implementations have been provided during the last decades, how to structure and organize the model is still open to debate and will be at the core of this article.

Sunday, January 22, 2012

Update a Rails application to the latest Ruby version with Rbenv

Suppose that you have a Rails application running on an old version of Ruby. What do you do if you decide that it is time for an update?
In this article I will go through the necessary steps for the update using Ruby Build and Rbenv. Both tools are fruits of the work of the guys at 37 Signals. The major difference between their setup and mine is that I use Phusion Passenger in place of Unicorn.
To complete the picture, we will assume the application runs on an Ubuntu server and it uses Nginx as web server.

Saturday, January 14, 2012

Mocks, Stubs, Expectations, Fakes, Stubs and so on

Usually, when talking about unit testing, stubs and expectations are both referred to as mock objects.
Nevertheless they fulfill different roles. This will be the topic of this article. We will see in detail how stubs and expectations differ, along with several examples.
We will see three different implementations of stubs and expectations for three languages: Mockito for Java, RSpec for Ruby and Jasmine for Javascript.