Skip to content
Feb 3 10

Website based smartphone applications

First of all, most applications for smartphones (in this post smartphone mainly means iPhone or Android) are actually just interfaces (often simplified) to websites, i.e. Twitter, Google Maps, etc. However, both the Android and iPhone appear to fail quite badly at allowing websites to directly integrate with the phone, and I have some thoughts on how they could work better. When thinking about these ideas I am mainly thinking of what features I would like to see when developing phone specific features for Ircster (a fairly major project I am working on that I will eventually get round to writing blog post(s) about), but I think the same features would be useful to a large number of developers and lead to a better platform for users and developers alike.

Looking at the iPhone first, it does allow websites to be directly added as “applications” (applications meaning buttons on the iPhones menu). It also allows some limited customisation of the way the website is displayed when it is accessed as an application using html meta tags (i.e. <meta content="yes" name="apple-mobile-web-app-capable" />). This is a good start, however, the iPhone seems to be completely let down here by not allowing background applications, meaning there is no way to run a website constantly and alert the user on specific events, or receive sensor information (i.e. GPS) while the phone is being used for another purpose.

Android on the other hand supports background applications, however it does not allow (as far as I can tell) for websites to be added as applications, and does not have a way for websites to interact with the phones features. What I would like to see is a JavaScript API allowing phone features such as alerts to be triggered by the website (possibly similar to the message passing feature in Chrome extensions), and also for the phone to reply to the app with sensor information such as GPS location. This seems to fit in very well with the ideas behind Chrome OS and applications being simply websites. (While considering this it occurred to me some of this functionality could be hacked into Android using its current Java app platform, something I have started working on and will demonstrate in another blog post.)

Desktop applications definitely seem to be being replaced by websites, I don’t see why the opposite should be true on phones (websites should not need to write specific phone apps). I’d like to see APIs included with smartphone browsers (Google Gears is a potential start, although this appears to be deprecated on Android) that provide more direct interaction with the phones features (alerts, access to sensors, local storage and local serving of content) and allow complete applications to be developed as websites for multiple platforms.

Feb 1 10
Tags

Domainr

A useful domain name finding tool I came across recently, Domainr lets you search less well known domain name extensions and tries to find the shortest possible domain for any word you enter. Also helpfully shows the availability of the domains it finds.

Jan 31 10

MongoDB

Another nosql project, mongodb provides more than just key-value pair storage. It is a document orientated database (along the lines of relational databases, but without a fixed structure for tables, or relational queries). That is, you can store objects (documents) that contain any combination of fields and data (data being strings, numbers, arrays or objects themselves), and then perform queries on them.

I have been interested in using mongo as a logging system for Ircster for a while now (it supports large sets of data with full text search and very fast queries), however until recently there was no reasonable driver for node. There are now two drivers available node-mongodb (bindings to the C driver) and node-mongodb-native (a JS implementation of the driver). The native driver especially interests me as I can more easily understand and work with the code.

Jan 26 10

Redis

I’ve been aware of a number of so called nosql projects (databases that aren’t relational) for some time and I finally have an opportunity to use one for a good reason.

Redis is an extremely fast key-value pair database (a hash table basically) that also includes fast, atomic set and list operations. I’m planning to use it as part of my group software project at uni, the project requires us to handle large amounts of data with a large number of requests per second, which makes 110,000 writes per second (one of the features of Redis) very appealing.

Jan 25 10

node_debug – A debugging console over HTTP

I’d also like to use my blog to write about a few of my personal projects. Many of these aren’t very useful and very few actually reach any usable state, however I feel node_debug is actually something quite useful.

Before reading this post you should probably know what node.js is.

node_debug allows you to evaluate statements and view their result (much like a REPL) from your favourite browser (assuming your favourite browser isn’t IE). It also allows you to browse objects if the result of your statement is an object, for example the global object in node is process so executing process; will return a browsable tree structure of the global scope.

Additionally it exports a log function that allows you to asynchronously output to any active console, for example setTimeout(function () { debug.log("Hello") }, 5000); will output Hello to any open consoles after 5 seconds, allowing useful debug output when using asynchronous functions.

To get started using node_debug you need to have a server running node, and to grab the latest node_debug from github. There is an example.js included to show how you would include it in your own scripts, the idea being you can simply include this in your own project in order to easily debug issues.

Future features I would like to add include:

  • A debug.scope object that allows you to import other objects into the debuggers scope (currently only the global scope is available which can cause confusion due to closures in JavaScript hiding a lot of variables from the debugger).
  • debug.error/warn/info functions in line with the browser console object provided by firebug.
  • Detect disconnection from node and attempt reconnection.
  • Caching of asynchronous messages that can be shown when connecting to the console, in order to log things without having an active browser window all the time.