Pere Villega's blog

If at first you don’t succeed, call it version 1.0

Enums to JSON in Scala

Scala gives the developer the possibility of using Enumerations. If they should be used or if Case Classes are better is a debate I'm not going to start here. They exist and they can be used.

Scala in 2018

ScalaDays 2013 happened this past June and the presentations are available at Parleys. If you go to the ScalaDays 2013 channel you can see all of them, and many are completely worth your time.

Using Ansible to deploy Play Framework apps in EC2 instances

TL;DR: Clone Ansible for Play Framework to automate the task of deploying Play 2.x projects from a git repository into an EC2 instance.

As many developers I'm not a good sysadmin. That's why I was happy to see the raise of PaaS like Heroku, which facilitated deploying a webapp without having to spend time in sysadmin tasks which I didn't know how to do correctly and which took me too much time.

Using Redis PubSub with Play 2.1.0

Last week I was experimenting a bit with Redis and its Publish-Subscribe module. The idea was to try to implement a chat with it (something I'll need for my next project) and from all the options I evaluated this seemed the best. Loving Redis so far, whoever called it the swiss-knife of databases was completely right.

Executing Jasmine Tests in Play 2.0.4

Christmas break is over, and on a whim I started to check AngularJs. If you haven't tested it yet, do it. I've toyed around with Backbone and some other Javascript single page app frameworks, and Angular is by far the one that I liked the most. It has simplicity embedded in its core, and turning tedious tasks (as setting controllers) into something trivial makes it a pleasure to use. Simplicity. Such an important concept, and one which is seldom present in frameworks.