Looking to REST in Java? Then you’ve come to the right place, because in the blog post I will present you how to “beautifully” design a REST API and also, how to implement it in Java with the Jersey framework. The RESTful API developed in this tutorial will demonstrate a complete Create,_read,_update_and_delete (CRUD) functionality for podcast resources stored in a MySql database.
Resources on how to design error handling in a REST API
Just wanted to share some useful resources I came across, when trying to figure out how to expose errors in a RESTful API
- Apigee : RESTful API Design – Second Edition
-
Video (~5mins)
- Slides – https://www.slideshare.net/apigee/restful-api-design-second-edition/51
- Blog post – RESTful API Design: what about errors?
-
- StormPath
-
Video (~4mins)
-
Slides – https://www.slideshare.net/stormpath/rest-jsonapis/69
-
- API UX
- Wikipedia
Simple trick to create a one line horizontal responsive menu with CSS only – Podcastpedia.org
Contents
In this post I will present a trick I used to create the responsive menu on Podcastpedia.org :
Source code for this post is available on Github - podcastpedia.org is an open source project.
How to use Gulp to generate CSS from Sass/scss
This is the sequel of the post CSS Preprocessors – Introducing Sass to Podcastpedia.org. If in the first part I presented some Sass-features I use to generated the CSS file for Podcastpedia.org, in this part I will present how the .css file generation process can be implemented with the help of Gulpjs.
Source code for this post is available on Github - podcastpedia.org is an open source project.
1. Set up the infrastructure
1.1. Install Node.js
Well, the first I needed to do is install Nodejs:
“Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.”[1]
CSS Preprocessors – Introducing Sass to Podcastpedia.org
Contents
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.
Source code for this post is available on Github - podcastpedia.org is an open source project.