The Cascade Style Sheet (CSS) file of Podcastpedia.org had grown to over 2000 lines and it had become hard to manage. New CSS elements used to, most likely, go to the end of the file. Something had to be done… Well, CSS does have an import option that lets you split your CSS into smaller, more maintainable portions. The only MAJOR drawback is that each time you use @import in CSS it creates another HTTP request. In addition to that, this could have prevented style sheets from being downloaded concurrently. So, what to do? Ta-da, CSS preprocessors to the rescue.

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

Continue Reading ...

In this post I will present how easy it is to enable HTTP response headers on the server sidein Java with Jersey, as defined by the Cross-Origing Resource Sharing (CORS) specification. For that I have extended the REST API  built in the post Tutorial – REST API design and implementation in Java with Jersey and Spring, with CORS support.

Continue Reading ...

Some time ago I discovered CSS sprites and I said to myself “what a cool thing, I must definitely use it on Podcastpedia.org, for all the existent social, flags and media icons”- by using CSS sprites you send only one HTTP request to get the bigger picture, instead of issuing individual HTTP requests for each icon.  When I finally rolled up my sleeves and built a CSS sprite for the icons, I had another revelation – I recalled having heard about icon fonts, which were supposed to be superior to using images as icons in every way (well maybe except the monochromatic part…).

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

Continue Reading ...

In this post I will present how to log in a Spring based application with the help of Simple Logging Facade for Java (SLF4J) and Logback. For demonstration I will use the application presented in the post Tutorial – REST API design and implementation in Java with Jersey and Spring, to which I will add now logging capabilities.

Continue Reading ...

In this post I will show you how to setup two or more data sources in a Spring application where the access to the database is done via JPA. It will be a XML-based Spring configuration. To highlight the setup I will use a showcase that builds on an existing demo example I have committed on GitHub, that covers other two posts of mine

Don’t worry! You don’t have to understand what’s going on in those if you just want to see how the setup for multiple data sources looks like – I’ll do a quick introduction in the first part of the post.

Continue Reading ...