|
Building a time-tracking and billing application with Adobe AIR and PHP
Richard Bates
As a developer, you already know that many times, one
programming language, platform, or technology just isn't
enough to do the job right. Recently, there's been a lot of
buzz and information about using PHP on the server side with
Adobe Flex
or AIR
applications as the front end. You can use this technique to
gain a lot of power and flexibility, and that's one of the
topics I discuss in depth in this article. Sometimes,
however, one interface isn't enough.
In my scenario, this is precisely the case. The scenario
calls for a lightweight, cross-platform desktop application
that does its job and stays out of the users' way. It also
needs a powerful management interface that can be accessed
from anywhere. To address both needs, you first create a
desktop application for AIR that leverages PHP back-end
services for persistent storage and extra horsepower. Then,
you create a simple and quick PHP/Hypertext Markup Language
(HTML) browser-based interface for management and output
applications.
About clocked!
The time-tracking and billing system you create in this
article is called Clocked! It is specifically designed for
freelancers, contractors, and others who work on computers
and need to track their time. To best address the needs of
these users, Clocked! has the following requirements:
- Runs on Mac, Windows, and Linux. Because your users are running all of these platforms in more distributed proportions than regular computer users, you need to support all three.
- Easily track time in different increments. This feature is key; your users need a simple, intuitive, unobtrusive way to track their time that requires as little effort as possible. This whole project is predicated on the belief that their time is valuable, and you don't want to waste it.
- Store the information in a central location. Many of your users work in teams or as subcontractors, so information about their hours accrued needs to be accessible from anywhere.
- Organizes information in a natural way. Your users work on projects for clients and invoice those clients based on hours attributed to each project. The Clocked! application needs to organize all these entities (clients, projects, invoices, and time slips) in a logical way.
The best way to accomplish all these goals at the same time
is to divide the feature set into two applications. The
Clocked! application consists of a desktop application for
time tracking and a web-based, PHP-driven interface for
management.
Here's how this two-part approach meets your needs. You take
care of the first two requirements at the same time. Because
Clocked! runs on AIR, users on Windows, Mac, and Linux can
use it. AIR applications also run on the desktop, so users
can launch and run the program without opening a separate
browser window or tab. Finally, AIR applications run in an
Adobe Flash
Player-based environment, so you can give your users a
sleek, unobtrusive interface with ease.
Because the management side of Clocked! is a web
application, managers and users will be able to access
Clocked! data from any web browser. Using PHP allows you not
only to create a fast, lean application quickly, but you
also gain the ability to communicate with the AIR-based
client efficiently. The Zend_Amf extension of the Zend
Framework allows native Action Message Format (AMF)
communication between AIR applications and PHP services,
which means that server calls will be as fast as possible,
and you'll be able to leverage the full power of PHP when
dealing with data from the desktop clients.
Finally, you have to plan carefully to make sure the data
structures in Clocked! make sense. You do that by clearly
defining all of your objects-clients, projects, invoices,
and time slips-and organizing them both in the code and in
the MySQL database you'll be using for persistent storage.
[ Next Page ]
| Comments: | ||
No Messages FoundYou can post questions/corrections/feedback here
| ||
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


