Marco Rico Gomez

Software developer

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.

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 project I needed this feature as a Java library and I eventually open sourced the outcome (async-dbx-client) on Github.

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 handy functional constructs. Most notably should be the changes to the Collection API.

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 found the tools I've used cumbersome and not a good fit for building modern web applications.

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 Stream is a lazy evaluated list. This means that elements in a Stream gets only evaluated when they are needed. Therefore Streams can be infinite while strict collections cannot. A Stream can also be seen as an immutable Iterator.

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.

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.

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 Unofficial JAXB Guide contains a small section which provides some useful information about this topic.

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 . In the first post the Web Service was created. This post is about consuming the Web Service with extjs.

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.

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 rendering the document. In my opinion it was not an acceptable solution to increase the jvm memory > 2GB. So I had to find a way to optimize my templates.

Scala Enumeration and type projection

Let’s assume we have this simple Enumeration:

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.

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 handling in Scala is much identical to the Java way, so it’s easy for a Java developer to get familiar with.

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 integrates mongodb as the persistence layer for its Record and Mapper framework.

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 implement your new NetBeans module in the Scala programming language.

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 data files.

Moved comments from apache roller to

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. As the web container I use jetty. Because I wanted to keep things simple I decided to use as the comment system instead of implementing one by myself.

6 Scala related videos worth watching

This is my short collection of scala related videos which I consider worth watching:

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 runtime. Unfortunately, it didn’t work out-of-the-box, because of some missing package import declarations in the manifest files. After searching the bug database, I found this bug.
So I had to modify the EclipseLink bundles by myself to get it working:


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 to use placeholders in a string that will be replaced by argument values. Similar methods are known as “sprinf” or simply “printf” in various programming languages.

Get Free Updates