Dipping My Toes Into Mobile Development

Everybody seems to be developing apps these days. A lot of people I meet are all getting into app development, even if they were previously working in quite different areas from software development. I guess for me the attraction is that it is still a relatively new area to move into and that in some ways the learning curve can be reduced through using wrappers such as Phonegap (also known as Apache Cordova) to act as a translation layer between HTML and CSS based layout, JavaScript interactivity and the underlying phone hardware.

To get started you need Android Development Tool (ADT) Bundle from Android Developer website and the latest version of Cordova. Then follow the installation instructions and the getting started guide for Android. Depending on what kind of setup you are on, if you do not have admin access to run the command line, you need to follow the previous version of the getting started guide or read this post from Simon MacDonald.

Once you have everything installed, you might want to run the SDK manager from inside ADT to get other versions of the Android SDK. One thing, though, do not forget to during the setup to also follow the instructions for modifying the manifest file as skipping this step could cause your app to crash straight away on starting.

Happy Birthday Firefox!

I remember when Firefox was called Phoenix. At that time, when doing web design, everyone was testing on Internet Explorer 5, which was the de facto standard in HTML and other web technologies. If the client wanted a website that was a little fancy, then you would recommend that it was built using Flash. We all knew then that Flash websites were bad for search engines and usability, but everyone was doing it.  Continue reading

Chrome for Android helps accessibility of web pages

Although it’s not my main occupation, I have dabbled in front-end development for sometime. I have enjoyed working with new front-end techniques, such as those provided by features included in the HTML5 and CSS3 specification. Compared to the way things were 10 years ago, these features look like designers’ dreams. They greatly simplify the development of front-end interfaces that are not only easy on the eyes, they are also more mobile-friendly with some great features added for accessibility.

However, I am beginning to see a trend with front-end designers trying to apply too rigid a control on their designs, resulting in the loss of accessibility for the end users. While it might be fine for twenty-something designers to use 8pt text to render a whole article in a web page and then disable zooming so that their layout can “look good”, it is not fine for everyone, especially those over the age of 40.

When smartphone browsers (starting with mobile Safari) implemented a “pinch to zoom” feature to allow people to view web pages with larger text (which is then reflowed), I thought that this was the beginning of an accessibility trend which would allow people to view hard to read text a little bit closer. However, it seems that a lot of designers responded to this by disabling the end users’ ability to zoom the viewport, supposedly to maintain the layout. While I understand that need to maintain a layout, I don’t think that sacrificing usability is the answer, In the end, the content that is supposed to be delivered to the end user does not get the message through, because the layout might “break” if the user zooms the page in. This is why I have enabled the “force zoom” feature in my Chrome for Android browser, so that at least I might have a chance to read what’s on the page, rather than looking at a pretty layout and not being able to read the article.

Don’t update your Apache through Webmin

This morning while logged on inside the webmin interface, I saw that there were 10 packages to update. Without much thought, I just hit the “update packages” button and it went on its merry way. Unfortunately, the consequence was not very merry for me and my server, as when the updates were completed Apache would not start, complaining of a problem with mod-apache2-lib-php5.

After much searching and talking to my friend Google, I found that the problem was caused by what is probably a bug with the way Webmin applies the updates. For some reason, the update process removed mod-apache2-lib-php5 so that it became disabled. If you enable the module, you will encounter the same error that I did. The way to fix this module is to reinstall it using aptitude install command such as outlined here

Next time, I will just fire up the shell and do it the old fashioned way.

Avoiding conflict between jQuery and Spry frameworks

I spent all day working on a site design and I came across a particularly annoying situation which made me take a break and a deep breath. In the design, I am using  jQuery to perform some JavaScript tasks like rounding off corners of divs, etc and Spry to format menus and to create accordions, etc.

I know that it might be a good idea to do all the tasks using  jQuery, but due to the tight deadline I did not want to have to learn anything new. I remember doing this successfully in another design that I did almost a year ago, so off I went to my project archives.

As it turned out, I found that the best way to do it is the one discussed in this article. Basically, you can override the $ function and replace it with “jQuery” or you can reassign jQuery to a variable as in var $t = jQuery.noConflict(); and then call the variable in the function, such as “$j(document).ready(function(){…”.

Hope you will have better luck than me.

Aptana under Ubuntu 9.04

Everybody has a favourite HTML editor on a platform, but does anyone have a favourite on ALL platforms? Well at least on the personal computing platform, that is. Well, I must tell you that my favourite HTML editor has been Aptana, which has served me well since I stopped using Dreamweaver exclusively. For me the major attraction of Aptana is its cross-platform nature. I can start work on my Windows laptop, then continue it on my MacBook and then finish it off on my tiny little Linux laptop the HP 2133 Mini note.

At the completion of my install of Jaunty Jackalope (Ubuntu 9.04) on my netbook, I found that Aptana just would not load. It would show the logo for a couple of seconds then it would just come up with an error. After scratching my head for a little while, I tried to look up an answer on Google and I found this thread on the Aptana user forum.

So basically, the issue is the version of xulrunner that Jaunty comes with. Currently it is version 1.9, while Aptana needs version 1.8. To fix this issue you need to download xulrunner 1.8 and unzip it to /usr/lib, so its path would be something like /usr/lib/xulrunner/. Then you create a script which looks like this:

#!/bin/sh
MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.8.1.3
if [ $LD_LIBRARY_PATH ]; then
LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME:$LD_LIBRARY_PATH
else
LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME
fi
export MOZILLA_FIVE_HOME LD_LIBRARY_PATH
~/aptana/AptanaStudio -vm /usr/lib/jvm/ia32-java-6-sun/jre/bin/java

Make the script executable and then on your panel add an application shortcut to point to this script file, mine is called “aptanastart”. Oh, and you need to have Java installed, since Aptana requires it.

Adobe Spry: the seemingly broken view of a page

In my experimentation to build a question and answer system using adobe spry, I tried to create a view of the data set in which only one question is visible at at time. The code seems pretty straightforward, as the Adobe Spry 1.6.1 documentation outlines under the section dealing with Pagedview. However, when I tested it I get either “no data in the data set error (or something like that)” or a blank page. Try as I might, looking at all the different possibilities, looking at any possible oversight in my code, I could not figure out what was wrong.

The solution, however simple, took me about a day to find out. It seems that the SpryData.js that Dreamweaver CS3 shipped with is an older version, so while I was actually doing things correctly using the documentation of Spry 1.6.1 and the SpryPagedView.js from the 1.6.1 package, it was the SpryData.js that somehow broke it all. So if you are trying to create a paged view of a data set using Adobe Spry, make sure you update the SpryData.js to the one that comes with the 1.6.1 package from Adobe Labs. This way at least you will end up with more hair on your head.