Using OAuth 2.0 with Google API in Phonegap / ChildBrowser

This article explains how to implement OAuth 2 with Google API (gapi) on Phonegap using Childbrowser Plugin. We will authorize Google Tasks API from Phonegap and then retrieve a list of Tasks (of default list) from Google Server. Because the App is built using Phonegap, it can be deployed in iOS, Android, Blackberry, Windows Phone […]

Continue reading →

Good Javascript Practices

I decided to share some of the best practices of Javascript which I have learned from various blogs and books over the years. Although, I used Javascript back in 2003, I didn’t learn Javascript properly and just happened to use it for some fun webpages. However, as I revisited Javascript from 2007 onwards, I have […]

Continue reading →

ezMark: jQuery Checkbox & Radiobutton Plugin

ezMark is a jQuery Plugin that allows you to stylize Radio button and Checkbox easily. Its very small (minified version is ~1.5kb) compared to other similar scripts. It has been tested and works on all major browsers (IE 6/7/8, Firefox, Safari, Chrome) and it gracefully degrades. It has the following Method: $(‘selector’).ezMark( [options] ); Basic […]

Continue reading →

Displaying Star Rating using CSS Sprites

Recently, I have been working on an Application which involved rating system. There are 2 cases where we would want to display ratings. On 1st case, we would just want to display the list of contents (videos, blogs etc.) with its rating (just displayed). On another case, show the rating and also allow viewer to […]

Continue reading →

PHP DomXPath: Read Complex XML files easily.

XPath allows traversing through XML elements and attributes very easily. For complex XMLs, using XPath can significantly reduce the complexity of coding. Good Tutorial of XPath can be viewed on W3C schools here. Reference on DomXPath can be viewed here. XPath is useful if someone needs to extract a specific node from an entire XML, […]

Continue reading →

PHP Shipping Modules (Canada Post)

Over the last month I have been working on an e-commerce store for our company and realized most of the shipping modules out there are quite complex to use. So, I decided to create a simple Canada Post PHP Class. Canada Post’s specification requires parsing of XML files to retrieve values, hence I have used […]

Continue reading →

PHP 5 DOM and XMLReader: Reading XML with Namespace (Part 1)

PHP-5’s DOM and XMLReader provides the ability to read XML files easily. The good thing about PHP-5’s DOM (mainly DomDocument, DomNodeList, DomNode) is that it implements the standard DOM features as specified by W3C. W3C’s reference on DOM can be viewed here. So, if someone has used DOM before (say on JavaScript), then it would […]

Continue reading →

PHP-5 DomDocument: Creating a Basic XML

DomDocument is a powerful library of PHP-5 to create XML. In this article, I will try to explain the basics of DomDocument and then will create a couple of simple XML files. First, lets have a look at a simple XML file: Taken from W3C’s example: <?xml version=”1.0″ encoding=”ISO-8859-1″?> >note> <to>Tove>/to> <from>Jani>/from> <heading>Reminder>/heading> <desc>Don’t forget […]

Continue reading →