Marco Rico Gomez

Software developer

Event Sourcing

Systems using Event Sourcing store their persistent state as a sequence of events instead of updating a single model. A particular state can be recr...

Java8: Quickstart Date and Time API

Let's have a look at the all new Date and Time API in Java 8. It is a complete replacement for the old java.util.Date and Calendar classes. The new ...

Java library to keep a local folder in sync with a Dropbox account

The Dropbox Java SDK doesn't support continuous synchronization (via Sync API) out of the box (like the Android and iPhone SDK). During my last side ...

Java8: 4 facts about the new Stream API

As all of us know, the long awaited lambda support lands in Java 8, which should be released this month (March 2014). Lambdas enable us to use some h...

AngularJS - the framework for web apps

If you're like me, you always want to improve your toolbox to make your life easier. Especially in the business of writing web applications, I always...

Exploring Streams in Scala

In this blog post I'm going to explore Streams in Scala's Collection API. So first of all what is a Stream? A <code>Stream</code> is a lazy evaluated...

Scala Enumeration and type projection

Let's assume we have this simple Enumeration: <pre> scala> object State extends Enumeration("created", "destroyed") { | type State = Value ...

6 Scala related videos worth watching

<p> This is my short collection of scala related videos which I consider worth watching: </p> <h3>The Scala Experiment -- Can We Provide Better Lang...

Helper for streaming MongoDB GridFS files in lift web applications

Lift is a web application framework written in scala and comes with native integration for mongodb. The module is called "lift-mongodb" and integrate...

Moved comments from apache roller to disqus.com

In the last couple of weeks I migrated my blog from apache roller to my simple self-written blog engine. My blog is now served by lift and mongodb. A...

Quick Start: Scala + MongoDB

After completing the following steps you have a sbt project with some running sample code that demonstrates the usage of mongoDB from Scala. I assum...

Lambda Expressions: Java 7 and Scala

I just came across a blog post written by Baptiste Wicht in which he points to some test cases of lambda expressions in the upcoming Java 7 release. ...

Writing Netbeans modules in Scala

This is a simple starter guide to setup a new NetBeans Module project which uses the scalac compiler to compile your scala sources, so you can implem...

Getting started with sbt, scala and scalatest

sbt is a simple build tool for Scala projects and seems to become the standard build tool for Scala projects. scalatest is a sophisticated testing f...

Processing legacy data formats with SAX and JAXB

In real world applications it is sometimes required to read information from legacy files. With legacy files, I mean comma separated or fixed length ...

Exception handling in scala

Scala is on top of my list of programming languages worth learning. From time to time I compare Scala's syntax with Java and noticed that exception h...

Parsing chunks of XML documents with JAXB

Jaxb is a great java library for mapping xml documents to Java objects and vice versa. But how can Jaxb be used to parse large xml documents? The Un...

Generating large PDF documents with Apache FOP

Some days ago I had trouble with generating large PDF documents (> 2000 pages) with Apache FOP. The problem was the memory consumption while renderin...

Building a RESTful Web Application with JAX-RS and extjs (Part 2)

This is the continuation of "Building a RESTful Web Application with JAX-RS and extjs":http://mrico.eu/entry/building_a_restful_web_application . In ...

Building a RESTful Web Application with JAX-RS and extjs

Creating a simple RESTful Web Application with JAX-RS and extjs is an easy one with NetBeans. I'll split this tutorial into three posts: # Creating...

String.format

Already since Java 5.0 (released in Sept. 2004) the String class has been extended by the "format" class method. This method offers the possibility ...

Installing EclipseLink OSGI bundles

A few days ago I tried to install the prepacked EclipseLink 1.1.0 osgi bundles. I wanted to see if the bundles runs well on the Apache Felix OSGI run...