Create a Mobile-Friendly To-Do List App with PHP, jQuery Mobile and Google Tasks

I’ve been waiting to try out jQuery Mobile for a while and a few weeks ago, I finally got the chance. I hooked jQuery Mobile up with the Google Tasks API and built a simple to-do list application that works on tablet and smartphone browsers.

The application exposes most of the basic functionality of Google Tasks, allowing you to add new to-do lists, create tasks, attach due dates and mark tasks as complete.

To control the interaction between the jQuery Mobile front-end and the Tasks API, my tool of choice was Slim, a PHP micro-framework that I’ve used before (slides, article). I also used Google’s own OAuth PHP Client, which makes it significantly easier to handle authentication (bonus: it provides some nice pre-packaged functionality for working with the Tasks API as well).

Read all about it in my IBM developerWorks article, watch a video showing the application in action, or get the code from JazzHub.

Authentication and Access Control with Sentry 2 (part 2)

As promised, IBM developerWorks has now published the second part of my article on Sentry 2. In this concluding segment, I dive into the Sentry 2 permission model, explaining how to create groups, assign users and permissions to them, and use permission checks to selectively enable application functions.

Also on the menu: find out how to harden your application with login throttling and temporary user deactivation, and integrate Sentry 2 with third-party authentication services like Google and Twitter.

Read the full article.

Authentication and Access Control with Sentry 2 (part 1)

If you build Web applications, there are a few things you can’t dodge coding: a user registration workflow, a password reset workflow, a login and logout system, and so on. Since these workflows aren’t likely to change much from one project to another, why not package them all up in a set of classes and use the time you save on something more constructive (blowing up some Protoss bases, maybe?)

That’s the idea behind Sentry 2, which gives you a head start on your next PHP project by providing a framework for authentication and access control. For code and details, take a look at the first part of my IBM developerWorks article on Sentry 2 (part 2 will be published in a few weeks).

Use Doctrine 2.3 with PHP and Zend Framework

IBM developerWorks has just published my article on using Doctrine 2.3 with the Zend Framework.

Doctrine is a well-known PHP Object-Relational Mapping (ORM) tool for querying and manipulating database content by using objects. It can be integrated with Zend Framework to inject database content into a PHP Web application. The article discusses how to create Doctrine entities and load and use them within Zend Framework 1.x and 2.x action controllers.

Readers of my book “Zend Framework: A Beginner’s Guide” will find this article very useful, as it provides updated steps for getting Doctrine and Zend Framework playing nice with each other.

Read the full article here.

Integrating PHP Applications with Instagram (part 1)

IBM developerWorks has published my article on integrating the Instagram API with a PHP application.

In case you didn’t already know, Instagram is a popular photo-sharing service that enables users to take photos with their smartphone and share them with others through the Web. The article examines the Instagram REST API in detail, using it with the Zend_Http_Client library to rapidly build and deploy PHP Web applications to search for and retrieve Instagram photos by tag, location and keyword.

Read the full article here.