Pretty close to Java syntax and DB security is well taken care.
The very first app that I built is hosted here (posted on AjaxApp.com earlier on), which is a very simple app that consists of three simple parts. These three parts are a form for adding simple record that consists of only a name and an email field, a record listing section and also the record searching section, which you can search using SQL wildcards such as %, * etc. These three parts are making use of the local database API, one of the three components introduced by Google Gears to store data locally i.e storing data at the user’s local hard disk using SQLite database engine. I’ve been a database and Java programmer for quite some time. I found programming using local database API of Google Gears is definitely easy to pick up. Especially its syntax and handling is very close to what Java’s java.sql.PreparedStatement offers, which the SQL injection is well-taken care of.
Usefulness of Local Database API for developers
Google Gears offers application to go offline and great worker pool for threads
Google Gears with its three great APIs, the LocalServer, the local Database and WorkerPool together are simply best for building applications that provide an option for the application to go offline when there is no network or Internet connection. And it also allows the synchronization of data back to the server while there is network or Internet connection. This can be done asynchronously, such as periodically detecting of network connection and sending data to and flo to the online server, using the worker pool threaded processes, without affecting any other actions that the user is focus on. (Please note that the synchronization part will consist of AJAX to communicate with online web services written in server-side technology such as JSP, Java Servlet, PHP, CGI, Ruby, ASP, ASP.net, Perl etc)
What apps are suitable to have offline option?
As pointed out by Google Gears team, not every app is suitable to have an offline option. For example, an app that needs the life data every second from the online server, such as an stock pricing ticker, a chat application are not suitable to have an offline option. In real life, what I could think of for the time being, those apps needing offline option are such as follows:
1. An enterprise web portal application that offers the staff to query the inventory and issue sales order or invoices, is suitable to provide an offline option. Which it can allow the frequently travelling sales personnel to take the app offline and have a local copy on his laptop hard disk and sync back to the server while he/she manages to get network or Internet connection.
2. General applications such as online word processing, email, calendaring applications etc. The offline option would be useful for frequent travellers, which you can be productive too even though you don’t get network and Internet connection. And the data will be automatically synchronized to server when the next time the app is launched again with a network or Internet connection detected. Of course, there are lots more, just need to twist you brain.
The next thing I wanna try on Google Gears
Of course there are plenty of stuff need to be explored and learned before I can use it to build serious apps. Such as the security, the ability for the local SQLite to store blob type data, the ability of it to handle file upload. I’d continue to enhance my first Google Gears app, to make it to have the option for taking the page offline by making use of the LocalServer API and also the intermediate data layer that handles storing data locally and synchronization of data back to the server database. And some apps that I wanna build that are currently in my wish list by using Google Gears are an online PIS (Patient Information System), a small online inventory or an web-based email client that provides offline option etc. I’m gonna have one section on TechChee to present them here once I’ve got each running. And I’ve just dedicated a new category for the Google Gears here, for future info update, tips and development of Google Gears. Thanks for bearing with me for this lengthy post. Hope it doesn’t bother you too much and the next few posts shall continue on gadgetry.