Thursday, August 26, 2010

The Devil’s Fortune Cookies!

GooglePhone
Today I found another Easter egg (or fortune cookie) from Google. I logged into one of my GMail accounts and the thing popped out (that's what she said). I promptly made a phone call and it worked. I got a call from 760-XXX-XXXX and it was free (just 0.06$ for India which is competitive).
When I opened Picasa I found a grid of face photos under “Unnamed”…Google was prompting me to put names to about a 1000+ faces that they had cropped from photos we upload to Picasa. I guess it will make searching easier (and in many cases obnoxious)
I am a Google fan for providing all these conveniences for free. Sometimes though, I wake up in the middle of the night with nightmares of Eric Schmidt showing me the EULA that says I sold my soul…and now he is here to claim it!

Saturday, August 14, 2010

The S.T.A.R. Stack

A few months back, I wished for a STAR here; a portable install (of sorts) for running ColdFusion applications. The use-case is the same as the one for WAMP/LAMP where you get an all-in-one stack.

A few assumptions/prerequisites were:

  • It should be free (… at least as in “beer”)
  • I shouldn’t have to delve into configuration details (e.g. apache “.conf” files) to set it up (same as WAMP); unless I wanted to
  • I should be able to leverage the best ability for each job (i.e. Tomcat container isn’t as good at delivering css, html, js, or images as Apache’s HTTP server)
  • I should be able to fit the stack plus the application on a small USB stick (256M) for redistributing my application. (perhaps even, make a windows application delivered thru’ a browser? When we have the cfexecute and the directory, file and registry api; who needs a cli?)

Well I have it made,…finally!!

I took the XAMPP Lite stack and ripped out their Apache webserver. For those who want to use PHP and MySQL, simply download their Lite version and leave it untouched with full capability. That way, you can add services to auto start/stop.

Next I got Tomcat 6 (and I have verified it works with Tomcat 7 too) and the mod_jk.so I got the latest Railo distribution (railo-3.1.2.001.war (34 MB)). I integrated Railo with Tomcat by adding the {railo}/WEB-INF/lib/*.jar to {tomcat}/lib/ and then merging the {railo}/WEB-INF/web.xml with {tomcat}/conf/web.xml.

Next step was to merge Tomcat with Apache webserver. That was easy and is documented everywhere. Long and short of it; just add the mod_jk,

# Load the JK module
LoadModule  jk_module  modules/mod_jk.so
<IfModule jk_module>
JkWorkersFile conf/workers.properties
JkShmFile     log/mod_jk.shm
JkMount     /*.cfm worker1
JkMount     /*.cfc worker1
</IfModule>

add a simplistic workers.properties as shown below


# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

That’s it ! Download and unzip it to, then just click the “xampp_start.exe”. Since this is Apache is ripped out of xampp lite’s install, you may get an error saying “cannot find xampp directory” or “cannot find mysql”. If you are unsure if Apache webserver started, check the Task Manager processes and confirm you see the httpd*.exe is running


image


I also made a convenience tomcat_start and tomcat_stop batch files. You can download the stack from http://sourceforge.net/projects/starstack/ Let me know if you have any suggestions! Enjoy!!

Thursday, August 05, 2010

AIR on Android...Compiled and Deployed !!

The premise:


I finally was able to install an AIR application on my Android; and here are the results. As a matter of fact, part of the reason I've been studying Flex/AIR with any seriousness is because Adobe (and Google) made the AIR and Flash runtimes available for Android (Nexus One)

The Use Case:


I created a simple plain-vanilla desktop-application with a local SQLite Datastore. The application records a "grocery list" and then you can check-off items as you put them in your cart. Finally you can remove each item from your cart or you can delete the entire list with a single button click.