Posts

Understanding Immutable Classes In Java

I recently reviewed an article that claimed immutable classes in Java are not always thread safe. Ultimately, this is not true since any immutable class cannot contain state and therefore no two threads could change it's state. To understand this more, I would like to do a quick dive into what an Immutable class is in Java.

Yes, Immutable Means Thread Safe. It's that simple.

Plain and simple, IMMUTABLE IS ALWAYS THREAD SAFE, and it is a very simple concept. If somethings state cannot change upon instantiation, no two threads can ever write to the object and break it's state. The other day I was curious what people thought about this topic. A top hit from DZone claimed not always, and I would like to rebuttal. Here is a link. https://dzone.com/articles/do-immutability-really-means And my response:

Spring HATEOAS - Embedded Resources with HAL

One common issue I see on the web is people having trouble rendering their JSON objects in HAL with embedded resources. For this example I am using groovy, but it explains how to configure the rendering of resources in a spring applicaiton.

Rails Unfit for Microservices?

This is a relatively informal blog post. Looking more for feedback and response to get a conversation started. The prerequisite to this thread is that you have a fairly good understanding of Microservices. If not at least read the following link: http://martinfowler.com/articles/microservices.html

The Java Enum: A Singleton Pattern

Image
The singleton pattern restricts the instantiation of a class to one object. In Java, to enforce this, the best approach is to use an enum. This great idea comes straight from the book Effective Java by Joshua Bloch. If you don't have it in your library, get it. One of the best Java books to date. There are a few reasons why one would use an enum as a singleton in Java:

Bootstrap Guide: The Virtual Tour Library

Image
Introducing a Virtual Tour Library (using TW Bootstrap) Fork Or Download Project On Github   A jQuery library used for designing help pages for your website.  Gives the user a guided walk through of your webpage and it's functions.

Free Twitter Bootstrap Admin Theme

Image
Introducing Responsive Clean Dashboard Bootstrap UI Theme