Creating Websockets in JavaEE 7

I recently wrote about the WebSocket support in the latest JavaEE release i.e JavaEE 7. In the post I show how to create a WebSocket server end point and deploy it in Glassfish server and then connect to the server end point using a Javascript client end point. The complete article can be found here. … Read more

Book Review: Head First HTML5 Programming by Eric Freeman, Elisabeth Robson published by O’Reilly Media

We all have enjoyed reading the Head First series of books and this book i.e Head First HTML5 Programming is no different. The authors Eric Freeman and Elisabeth Robson have kept the content in the book as much practical as possible which means that your are more of coding than reading. Not all the features … Read more

Getting started with JSON-P

I have during my college days used XMLHttpRequest object and its equivalent in Microsoft world to make Ajax calls and those Ajax calls were to the URL within the same domain. But with the advent of Webservices and whole lot of mashups being developed, Ajax calls are not restricted to same domain but the cut acorss different domains. When this cutting across domain boundaries happens making Ajax calls using XMLHttpRequest fails due to security enforcements implemened by the browsers. That’s when the idea of JSON-P i.e JSON with Padding came up.

In this post I will quote from different sources about JSONP and then go ahead and implement example which invokes Stackoverflow API to retrieve the unanswered questions tagged ‘jsonp’

  1. What is JSONP?
  2. Simple example for JSONP
  3. Accessing Stackoverflow API using JSONP

Read more

HTML5 Geolocation API with Goolge Maps

I have been reading Head First HTML5 and read about the Geolocation support in HTML5 and also went through the example they have shared about using the Google Maps with HTML5 geolocation API. It was an interesting example and I went a step further and enhanced the example to show some eat outs around the current location. For this I made use of the Places library which comes with the Google Maps API.

In this post I will cover:

  1. Getting started with HTML5 Geolocation API.
  2. Integrating Google map to show current location.
  3. Enhancing to show nearby places on Google map.

Read more

%d bloggers like this: