Book Review : RESTful Java Patterns & Best Practices

This is a book review for Packt Pub’s RESTful Java Patterns & Best Practices.


REST Services are the glue that modern day web applications are built on. Often it is easy to get carried away and design a REST endpoint in any which way you want because the HTTP protocol makes that possible. But given the fact that APIs are becoming important and that clients expect high quality REST Endpoints that implement the correct RESTful style taking all the HTTP verbs into action, it is critical that you adhere to best practices. And this is where this book fits in perfectly.

The author, Bhakti Mehta is a founding member of GlassFish Open Source Application Server and all the experience is packed into the book with patterns and best practices in various areas of RESTful Services.

The first chapter gives a quick overall review so that you are on the same ground and then the later chapters deal into each important area of RESTful API design. The areas include:

  • Resource Design : This goes through URI patterns, Content Negotiation and one of my favourite topics i.e. API versioning
  • Security and Traceability : This talks about the current and emerging standards when it comes to securing your endpoint. I found this section a little bit hollow on implementation details.
  • Designing for Performance : This section talked about Caching, Partial Updates and designing APIs that in turn perform long-running jobs asynchronously.
  • Advanced Design Principles  : This section covers pagination, i18n, rate limiting and touches upon the highest form of the Richardson Maturity Model i.e. HATEOAS

There are also examples of popular public REST APIs from Twitter, Facebook, Paypal and more – so that the reader can look and relate back to the contents of the book. In that way, the book is practical to the core.

Overall, I will be keeping this book handy whenever I need to look up a particular aspect of RESTful Design and this is a great book to go through once you have deployed a few RESTFul APIs in Production and are looking to give them an extra edge.

Presentation on Kids Workshop

If you plan to conduct a programming workshop for kids, I have written a blog post that goes into those details. Here is a presentation that I recently created that captures the key points. Do refer to the Speaker Notes for a detailed description of the points.

If you have some additional points, do provide them in the comments.

Book Review : Raspberry Pi Server Essentials

This is a book review for Packt Publishing‘s Raspberry Pi Server Essentials.


Raspberry Pi is often touted as a boon for classroom computing. I have often seen scenarios where several folks have purchased a Raspberry Pi and after a few sessions with it have not utilized it much. Well sure the hobbyists are busy building sensor networks but most people need to understand how to employ their Pi for tasks that are likely to be more useful to them, in and around their computing needs.

This is where “Raspberry Pi Server Essentials” book comes in. It contains several chapters that help you to use your Pi for a specific purpose.

The initial chapters focus on the basics of setting up your Pi, Operating System installation/updates and setting up the networking. This forms a good base to then explore the remaining chapters.

The next set of chapter focus on a specific use of the Pi. The chapters range from:

  • Using the Pi as a Web Application Server
  • Setting up a File Server
  • Setting up a Game Server
  • Media Center
  • and even a Bit Coin mining machine (Hope you get lucky with that one!)

For households that have multiple devices, setting up a File Server or Game Server powered by your Pi is a great way to streamline things. In fact, you could jump to any chapter, if the specific purpose of that chapter is what you want to use your Pi with.

The instructions in each of the chapters are very precise. Right from downloading the software, configuring and running it, the instructions are good and focus just on the task, which is how it should be for a book of this kind.

Overall, this is a good book to explore practical uses that you could put to use immediately for your Pi.

Dive into HP IDOL OnDemand APIs

The future lies in processing data and deriving some value from it. Often, the process is tedious and could involve multiple sources of data, images, videos and more to link together.


HP IDOL On Demand is a great set of APIs that is made available by the HP Cloud Platform that make things much easier for the developer.

Check out my article at ProgrammableWeb that goes into the details of the HP IDOL OnDemand APIs and code snippets to get started on them today.

Tech-4-Kids @ Xoriant

I was delighted to conduct another Introduction to Computer Programming for 20 kids today. Our goal was to introduce the kids to programming in a fun way and what better way, than to introduce them to Scratch.


There are 3 topics that I typically cover in any introduction to programming, especially when the kids have never been introduced to programming and are in the specific age group of 7-11 years. We start off with what can computers do, what is a language and then we dissect a game (Angry Birds … no points for guessing that!). We proceed then with basic animation and cap it off with story boarding. That is sufficient enough to kick off the creative juices in the kids and they simply take off from there. After that, there is a good chance that they are not even listening to you. And that means, you did a good job !

The session went off well. It was great to see the twinkle in the eyes of the kids, when they got the basic programs working in Scratch.

0724OSSpecial thanks to PacktPub for allowing me to distribute 3 copies of their excellent book, Scratch 2.0 : A Beginners Guide. I am sure the winners will love to take their Scratch adventure to greater heights with this book.

In case you live in India and want your kids (Class 5 – 10) to have  dose of healthy competition while till having fun, check out the Google India Code To Learn contest. Google India invites school students from classes 5 to 10 from all over India to explore Scratch and develop projects on it. Students in classes 9 and 10 can develop their projects in Scratch but are also welcome to choose Java or C++. Check out the site for more details including registration/submission.



Book Review : Scala for Java Developers

This is a book review for Packt Publishing‘s Scala for Java Developers


I have been putting off my journey into Scala for a long time now. Being a long time Java Developer, I wanted something to ease my introduction to Scala from a Java perspective. The strengths of Scala are well documented over the years and I finally took the plunge to learn more about this JVM language.

The book from PacktPub has eased my introduction to the language to a great extent. It starts off with the Scala REPL that allows you to test out the basic Scala syntax and judge for yourself the feel of the syntax and quickly it dawns how your code could be smaller and more expressive, compared to Java. It then goes into common architectures and tools that you would expect coming from a Java world. It takes off on Web Services and how you can utilize Scala for testing the services.

No discussion on Scala is complete without going into the highly regarded Play Framework and Akka. The book tackles both of these topics in depth and with just about enough examples for you to get going in both these frameworks. Akka is also available for Java so if you are familiar with Akka, its reactive principles – the move to Scala Akka should be straight forward. There are dedicated chapters in the book on both principles/concepts and building reactive web applications.

The book ends with a chapter titled “Scala Goodies” , which covers MongoDB integration and DSLs in Java.

Overall, this is a good book to get introduced to Scala if you are an experienced Java developer. The balance of theory and sample code is good and it would form the basis for your next project in Scala.


Book Review : Alfresco CMIS

This is a book review for Packt Publishing‘s Alfresco CMIS.


The number of solutions being built on top of Content Management Systems is plenty and across implementations, you wish that there was a common API that you could access all the CMS. CMIS is the common API via which you can access any Content Management System that supports this standard.

The book starts off with an overview of CMIS and how it came about. The next set of chapters goes into the CMIS Standard, especially the different operations via which you can do create, update, delete and query for documents. These two chapters setup a solid foundation since they allowed you to understand what is happening behind the scenes in terms of the REST Calls and the data formats being exchanged in the request / response.

I preferred this approach rather than jumping into a high level API that does not allow the developer to understand some of the details behind the calls. The next chapter jumps into specific support for CMIS via Alfresco.

Once this is covered, you get to pick the languages via which you want to access the CMIS API. One chapter covers the Java API in case you are talking to the CMS via a Server side infrastructure or are planning to create your own service layer on top of it. In case you are looking for accessing CMIS via the Web interface, a chapter on invoking the CMIS Interface via JavaScript is also covered.

The final couple of chapters delve deeper into integration scenarios with the Drupal Web Content Management (WCM) and Mule ESB Integration.

Overall the book is a solid guide to the CMIS Standard via Alfresco. In case you are planning on integrating with any CMIS capable repository, keep this book handy.