Since the source code for is now open on GitHub for everyone to have look at and contribute to, I might as well add a ribbon on the website celebrating that. After a short research on the web, I stepped over Simon Whitaker’s project github-fork-ribbon-css which I could easily integrate in  the website:

GitHub ribbon

Octocat Source code for this post is available on Github - is an open source project.

In this post I’ll present the two simple steps required for that:

Continue Reading ...

How to display element in JSP only if model element not null

To do that you can use the or _ tags to make conditional rendering in Java Server Pages (JSP) using the JSP Standard Tag Library (JSTL) like in the following code snippet:

	<c:if test="${not empty podcast.twitterPage}">
		<a href="${podcast.twitterPage}" target="_blank" class="icon-twitter-producer producer-social"></a>
	<c:if test="${not empty podcast.fbPage}">
		<a href="${podcast.fbPage}" target="_blank" class="icon-facebook-producer producer-social"></a>
	<c:if test="${not empty podcast.gplusPage}">
		<a href="${podcast.gplusPage}" target="_blank" class="icon-google-plus-producer producer-social"></a>
</div> on GitHub

We use currently for a MySQL database and because we’ve recently gone open source on GitHub, we’ve created a to explain the setup of the database. The content of that file is basically reproduced here, as “back-up”, for future reference and why not?, it might also serve others in the mean time.

Note: Although the steps presented here refer to the database backing, they should be valid for any MySQL database you might want to setup either in Linux or Windows.

Continue Reading ...

In this post I will present you a simple trick about how to make the length of the text shown in a paragraph responsive. The example presented is written in Java Server Pages (JSP) and makes use of JavaServer Pages Standard Tag Library (JSTL), but you can use the same trick with other technologies and media queries as you will find out in the coming paragraphs.

Continue Reading ...

Error handling is one of the most procrastinated and least enjoyable parts when writing code… I mean, why should the application not always work as expected, when we’ve written it with so much passion and care, and, you know, the clients of the application always send the right requests, right?!? Unfortunately things do go wrong from time to time, and when it does we should be prepared to some extent at least… This is especially the case when writing REST APIs, because clients only get a black box with specification, having no clue what to do when the expected answer doesn’t come back, unless we do something about it…

Bottom line:  error handling is essential when designing REST APIs.

Continue Reading ...