How to say a REST-ful NO?

11 Nov 2015 | | REST, API, http, status, 404, resource not found

We had an interesting discussion at work yesterday: for a REST api, what HTTP status code to return when a resource does not exist - a 200 OK with an empty result, a 204 NO CONTENT or a 404 NOT FOUND ?

Continue Reading →

Lambdas vs Closures

28 May 2015 | | functional programming

Differences between Lambdas and Closures

A Lambda Expression is merely an anonymous function - a language construct. Giving a lambda a name makes it a named function.

Continue Reading →

Hibernate Custom UUID generator

03 Feb 2015 | | java, hibernate

Use a custom uuid generator in Hibernate.

Many web applications these days use UUIDs as primary keys in their database. While this approach has its pros and cons (see Primary Keys vs GUIDs), one of the principal advantages is that you can generate these ids outside of the database.

Continue Reading →

1 2 3