<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gregs Ramblings</title>
	<atom:link href="http://gregsramblings.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gregsramblings.com</link>
	<description>Adobe, Technology, Photography, Aviation and other Ramblings</description>
	<lastBuildDate>Tue, 15 May 2012 14:44:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to prevent bounce of PhoneGap app container in iOS apps &#8211; UIWebViewBounce</title>
		<link>http://gregsramblings.com/2012/05/14/phonegap-howto-prevent-bounce-uiwebviewbounce/</link>
		<comments>http://gregsramblings.com/2012/05/14/phonegap-howto-prevent-bounce-uiwebviewbounce/#comments</comments>
		<pubDate>Tue, 15 May 2012 03:05:27 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[iOS/iPhone/iPad]]></category>
		<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[bounce]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[phonegap tips]]></category>
		<category><![CDATA[UIWebViewBounce]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3411</guid>
		<description><![CDATA[I&#8217;ve noticed that a lot of apps built with PhoneGap have a weird behavior on iPhone and iPad &#8212; You can tug at the main app and move it around slightly and let it bounce back into place.  It&#8217;s as if the PhoneGap container is connected to the device with springs!  I quickly found several [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-3419 alignright" title="PhoneGap Tips" src="http://gregsramblings.com/wp-content/uploads/2012/05/phonegaptips.png" alt="" width="278" height="200" />I&#8217;ve noticed that a lot of apps built with <a href="http://phonegap.com" target="_blank">PhoneGap</a> have a weird behavior on iPhone and iPad &#8212; You can tug at the main app and move it around slightly and let it bounce back into place.  It&#8217;s as if the PhoneGap container is connected to the device with springs!  I quickly found several solutions to the problem, some of which require either catching the JavaScript touchStart event at the top-level, or modifying the PhoneGap code.</p>
<p>However, I also discovered that starting with PhoneGap 1.5 (<a href="http://phonegap.com/2012/03/06/phonegap-1-5-released/" target="_blank">release notes</a>), a new key was added to the <strong>PhoneGap.plist</strong> (now <strong>Cordova.plist</strong>) called <strong>UIWebViewBounce</strong>.  It&#8217;s set to YES by default (I have no idea why).  If you set it to NO, your app will be anchored in with nails and the bounce removed.</p>
<p>This is also now configurable with <a href="http://build.phonegap.com" target="_blank">PhoneGap Build</a> by setting <strong>webviewbounce</strong> to <strong>false</strong> in your <strong>config.xml</strong> (documented <a href="https://build.phonegap.com/docs/config-xml" target="_blank">here</a>).</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2012%2F05%2F14%2Fphonegap-howto-prevent-bounce-uiwebviewbounce%2F&amp;title=How%20to%20prevent%20bounce%20of%20PhoneGap%20app%20container%20in%20iOS%20apps%20%E2%80%93%20UIWebViewBounce" id="wpa2a_2"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2012/05/14/phonegap-howto-prevent-bounce-uiwebviewbounce/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An interesting way to handle event giveaways &#8211; Phraffle.com</title>
		<link>http://gregsramblings.com/2012/05/13/an-interesting-way-to-handle-event-giveaways-phraffle-com/</link>
		<comments>http://gregsramblings.com/2012/05/13/an-interesting-way-to-handle-event-giveaways-phraffle-com/#comments</comments>
		<pubDate>Sun, 13 May 2012 18:11:50 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Typekit]]></category>
		<category><![CDATA[giveaway]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[phraffle]]></category>
		<category><![CDATA[raffle]]></category>
		<category><![CDATA[random number generator]]></category>
		<category><![CDATA[spritely]]></category>
		<category><![CDATA[typekit]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3401</guid>
		<description><![CDATA[As developer evangelists, we often do giveaways of Creative Suite and other goodies at meetups, user group meetings, and other events.  Sometimes we use physical raffle tickets handed out at the door.  Other times there is a quiz to determine the winner, but recently while at a meeting of the Atlanta Web Design Group, I [...]]]></description>
			<content:encoded><![CDATA[<p>As developer evangelists, we often do giveaways of Creative Suite and other goodies at meetups, user group meetings, and other events.  Sometimes we use physical raffle tickets handed out at the door.  Other times there is a quiz to determine the winner, but recently while at a meeting of the <a href="http://www.awdg.org/" target="_blank">Atlanta Web Design Group</a>, I saw their organizer, <a href="https://twitter.com/#!/jc/" target="_blank">J. Cornelius</a>, do something interesting.  He called out some random numbers and had people raise their hand if their phone number contained that number.  He then quickly narrowed it down to a winner.</p>
<p>Last week, I tried a variation of this at a <a href="http://www.meetup.com/BarCampTampaBay/events/60875062/?a=socialmedia" target="_blank">Tampa meetup</a> with an audience of about 100 people and it worked really well.  Late  Friday night, I created <a href="http://phraffle.com" target="_blank">Phraffle</a> (phone + raffle = Phraffle!) &#8212; <a href="http://phraffle.com" target="_blank">http://phraffle.com</a>.  It&#8217;s obviously a very simple and somewhat silly app, but it was fun to build.  It was also my first use of <a href="https://typekit.com/" target="_blank">TypeKit</a> (font used in the logo).  The spinning effect is based on a blog post I found by <a href="http://odhyan.com/blog/2011/05/slot-machine-in-javascript/" target="_blank">Saurabh Odhyan</a>.  He basically pans an image across a div using <a href="http://www.spritely.net/" target="_blank">JQuery.spritely</a>.  Once the speed increases, the image is switched to a blurred version.   I loved the effect so I took his example and made some modifications until I had the right look and feel.</p>
<p>Let me know if you have any ideas on how to improve this or if you have seen other interesting ways of handling raffles.  I might create a tiny app for phones/tablets for off-line use-cases.  It all depends on how bored I get next weekend. <img src='http://gregsramblings.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p style="text-align: center;"><a href="http://phraffle.com"><img class="aligncenter size-medium wp-image-3402" title="phraffle-screenshot" src="http://gregsramblings.com/wp-content/uploads/2012/05/phraffle-screenshot-300x193.png" alt="" width="300" height="193" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2012%2F05%2F13%2Fan-interesting-way-to-handle-event-giveaways-phraffle-com%2F&amp;title=An%20interesting%20way%20to%20handle%20event%20giveaways%20%E2%80%93%20Phraffle.com" id="wpa2a_4"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2012/05/13/an-interesting-way-to-handle-event-giveaways-phraffle-com/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Central Florida Events: Building real apps with HTML/JavaScript and PhoneGap</title>
		<link>http://gregsramblings.com/2012/05/02/central-florida-events-building-real-apps-with-htmljavascript-and-phonegap/</link>
		<comments>http://gregsramblings.com/2012/05/02/central-florida-events-building-real-apps-with-htmljavascript-and-phonegap/#comments</comments>
		<pubDate>Thu, 03 May 2012 02:08:22 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iOS/iPhone/iPad]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[backbone.js]]></category>
		<category><![CDATA[florida]]></category>
		<category><![CDATA[fsfpug]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[orlando]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[Tampa]]></category>
		<category><![CDATA[twitter boostrap]]></category>
		<category><![CDATA[web standards]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3381</guid>
		<description><![CDATA[If you live anywhere near Tampa or Orlando and have an interest in building mobile apps using web standards, you need to come to one of the following two local events: Tampa &#8212;  5/9/2012 6:00PM please RSVP on the site &#8211; if it&#8217;s full, try again later in the day Orlando &#8212;  5/8/2012 6:00PM EDT [...]]]></description>
			<content:encoded><![CDATA[<p>If you live anywhere near Tampa or Orlando and have an interest in building mobile apps using web standards, you need to come to one of the following two local events:</p>
<ul>
<li><a href="http://www.meetup.com/BarCampTampaBay/events/60875062/?a=socialmedia" target="_blank">Tampa</a> &#8212;  5/9/2012 6:00PM please RSVP on the site &#8211; if it&#8217;s full, try again later in the day</li>
<li><a href="http://fullsail.groups.adobe.com/index.cfm?event=post.display&amp;postid=42197" target="_blank">Orlando</a> &#8212;  5/8/2012 6:00PM EDT at Full Sail University &#8211; DONE &#8211; Had a packed room and over 35 online!</li>
</ul>
<p>Even if you have looked at PhoneGap already, we&#8217;re going much deeper than an introduction.  We&#8217;re going to show how to build production-quality, high-performing apps using HTML and JavaScript.  This goes well beyond the typical demos.  Micro-frameworks such as backbone.js, twitter boostrap and more will be used.</p>
<p>The folks at Full Sail University put together a poster for the Orlando event (see below).  Now I feel like we need some sort of cool music playing when we enter the room! <img src='http://gregsramblings.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p style="text-align: center;"><a href="http://fullsail.groups.adobe.com/index.cfm?event=post.display&amp;postid=42197"><img class="aligncenter size-full wp-image-3383" style="border-image: initial; border-width: 3px; border-color: black; border-style: solid;" title="poster500" src="http://gregsramblings.com/wp-content/uploads/2012/05/poster500.jpg" alt="" width="500" height="773" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2012%2F05%2F02%2Fcentral-florida-events-building-real-apps-with-htmljavascript-and-phonegap%2F&amp;title=Central%20Florida%20Events%3A%20Building%20real%20apps%20with%20HTML%2FJavaScript%20and%20PhoneGap" id="wpa2a_6"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2012/05/02/central-florida-events-building-real-apps-with-htmljavascript-and-phonegap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon EC2 &#8211; a real-world case study of moving from a data center to the cloud</title>
		<link>http://gregsramblings.com/2012/05/02/amazon-ec2-a-real-world-case-study-of-moving-from-data-center-to-the-cloud-chessjam/</link>
		<comments>http://gregsramblings.com/2012/05/02/amazon-ec2-a-real-world-case-study-of-moving-from-data-center-to-the-cloud-chessjam/#comments</comments>
		<pubDate>Wed, 02 May 2012 14:21:40 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[ChessJam]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[amazon ec2]]></category>
		<category><![CDATA[amazon web services]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[online chess]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3354</guid>
		<description><![CDATA[Two years ago, I blogged about ChessJam, a chess application that I helped develop where people from all over the world play live chess with each other.  Since launching ChessJam, it&#8217;s been up and running 24/7 with very little downtime and has experienced some good growth. To give you a sense of the activity levels, [...]]]></description>
			<content:encoded><![CDATA[<p>Two years ago, I <a href="http://gregsramblings.com/2009/11/09/the-making-of-chessjam-flexair-coldfusion-livecycle-ds-fun-project/" target="_blank">blogged</a> about <a href="http://chessjam.com" target="_blank">ChessJam</a>, a chess application that I helped develop where people from all over the world play live chess with each other.  Since launching ChessJam, it&#8217;s been up and running 24/7 with very little downtime and has experienced some good growth.</p>
<p style="text-align: center;"><a href="http://chessjam.com"><img class="aligncenter size-full wp-image-3351" title="chessjamcollage" src="http://gregsramblings.com/wp-content/uploads/2012/05/chessjamcollage.png" alt="" width="784" height="162" /></a></p>
<p>To give you a sense of the activity levels, here are a few ChessJam stats:</p>
<ul>
<li>At any time, day or night, there is an average of 100 users logged in playing chess.  We&#8217;ve seen it as high as 180 concurrent on weekends.</li>
<li>Our average load is about 2 or 3 chess moves per second.</li>
<li>During the month of March, 2012, more than 4,500 users played 128,920 games (5.8 million moves in one month)</li>
</ul>
<p>Not bad for no marketing budget I think.  It&#8217;s not a huge amount of activity compared to a lot of applications, but the performance demands are very high. Serious chess players don&#8217;t tolerate delays in response time, so we have to make sure we have plenty of CPU and bandwidth to spare.</p>
<h4>Hosting history:</h4>
<p><strong>Late 2009/Early 2010 &#8212; development and early production &#8211; hosting from my home office</strong></p>
<p>During development and the first few months of production, ChessJam was hosted from a computer in my home office.  The cost was around $70/month for FiOS fixed IP address plus whatever power my server was drawing. This was fine until the Florida summer storms took out my power twice in a single month. That&#8217;s when we realized the difference between a real data center and my personal data center! It was also a bit stressful when I traveled because it left my wife in charge of late-night server repairs.</p>
<p><strong>Late 2010 &#8212; moved to rack mounted servers in a real data center</strong></p>
<p><strong></strong>We acquired two used (circa 2008) rack-mounted IBM servers and rented some rack space at a local data center.  Reliable power and Internet were no longer a problem, but the hardware was ours to manage and eventually repair.  It was better, but it wasn&#8217;t a great situation. Once we settled in, our cost was around $190/month (rack space rental and bandwidth).</p>
<p>Why didn&#8217;t we move to Amazon EC2 instead of the data center?  We did consider moving from my home office to Amazon EC2 instead of the data center, but at the time, Amazon didn&#8217;t have an instance type that suited us.  The small instance type was affordable, but it only offers 1.7GB of memory, which just won&#8217;t cut it for our server app (we tried). The next step up was the large instance type with 7.5GB of memory, but it was too expensive and overkill.</p>
<p>Two months ago, Amazon filled the huge gap between the small and large instance type by <a href="http://aws.typepad.com/aws/2012/03/ec2-updates-new-instance-64-bit-bit-ubiquity-ssh-client.html" target="_blank">announcing the new &#8220;medium&#8221; instance type</a>. It provides 3.75GB of memory as well as a decent amount of CPU for a good price&#8230; so we decided it was time to make the move.</p>
<h4>Our EC2 configuration:</h4>
<ul>
<li>Medium EBS instance running <a href="http://alestic.com/" target="_blank">Ubuntu Linux</a>.  EBS is &#8220;Elastic Block Store&#8221;, which basically means that the storage is persistent.  If you haven&#8217;t looked at EC2 in the past two years, you might not know that persistent storage on server instances is an now an option.  With EBS storage, you can shut down your server and all of the data is saved (just like a physical server).</li>
<li>200GB EBS disk volume &#8211; for our MySQL database and fast growing log files.</li>
</ul>
<h4>AWS and bill anxiety</h4>
<p><a href="http://gregsramblings.com/wp-content/uploads/2012/05/anxiety.jpg"><img class="alignright size-medium wp-image-3363" title="anxiety" src="http://gregsramblings.com/wp-content/uploads/2012/05/anxiety-200x300.jpg" alt="" width="200" height="300" /></a>Most people exploring Amazon EC2 ask the same question I asked… &#8220;What is this really going to cost me?&#8221;. When you dig into how EC2 is priced, you&#8217;ll find that there are multiple variables, which creates a bit of uncertainty. Basically, it boils down to the server instance type, the disk space used, and the amount of data moved in and out of the instance. There are other small charges for number of I/Os and any unused IP addresses, but these are typically only a few cents and don&#8217;t have much impact on the final bill (based on my experience).</p>
<ul>
<li><strong>The server instance</strong> &#8212; this one is easy and predictable. Amazon charges by the hour. For example, our medium instance is $0.16 per hour. You could fire up a medium server instance and spend a full 8 hour work day playing with it and only pay about $1.30. Not bad! Our app runs 24/7 so 24 hours per day * 30 days = 720 hours per month. So, our monthly cost can be calculated with $0.16 * 720 = <strong>$115/month</strong>.  (later in this article, I explain how reserved instances work and how they can lower this price by nearly half)</li>
<li><strong>Disk volume</strong> &#8211; this one is also easy and predictable as well. It cost $0.10 per GB per month. We have a 200GB volume, so that&#8217;s 200*$0.10 = <strong>$20/month</strong>.</li>
<li><strong>Disk I/Os</strong> &#8212; The EC2 pricing page also shows a $0.10 charge per million I/Os. We do about 300,000 I/Os per day (based on my last bill) so that comes to about 9 million I/Os per month resulting in less than <strong>$1/month</strong>&#8230; so we&#8217;ll just call that a rounding error.</li>
<li><strong>Data transfer charges</strong> &#8212; this is the part that scared us. Amazon charges $0.12 per GB of data transferred out of our EC2 instance. They do not charge for inbound traffic. This method of charging for data is very different than how our data center charges us. The data center uses &#8220;95th percentile peak billing&#8221; which means we are charged based on the average rate that we move data, not the volume of data moved. I&#8217;ll spare you the details, but it doesn&#8217;t translate to Amazon&#8217;s model. However, our data center provider does have a report that shows the total amount of data transferred each month and we used that number to estimate. Now that we&#8217;ve been up and running a few days, I know that we transfer about 250MB of data every hour or 6GB of data per day. So, 6GB * 30 days * $0.12 = <strong>$21/month</strong>.</li>
</ul>
<p><strong>Summary:</strong> $115.20/month for our server instance, $20/month for our disk volume and $21/month for data transfer which comes to about <strong>$156.20/month</strong>. That&#8217;s already about $30 less than we were paying the data center.  That price is already lower than what we were paying&#8230; but with reserved instances, we can lower it considerably.</p>
<h4>Saving money with reserved instances</h4>
<p><a href="http://gregsramblings.com/wp-content/uploads/2012/05/savings1.jpg"><img class="alignright size-full wp-image-3367" title="savings" src="http://gregsramblings.com/wp-content/uploads/2012/05/savings1.jpg" alt="" width="120" height="78" /></a>A lot of companies use Amazon EC2 in a much more &#8220;elastic&#8221; fashion than ChessJam does.  They set up load balancers and auto-scaling to dynamically increase and decrease instances based on the load. However, our app is not nearly that sophisticated (although eventually our usage may justify re-architecting our back end!).  Our app uses a consistent amount of EC2 resources.  Thankfully, Amazon offers special pricing for this type of use-case called <em><strong>reserved instances</strong></em>. Reserved Instances give you the option to make a one-time payment for each instance you want to reserve and in turn, receive a significant discount on the hourly charge for that instance. Basically, Amazon is rewarding you for being predictable. There are three different options, light utilization, medium utilization, and heavy utilization. Our server is up and running 24/7, so our best deal is the heavy utilization model.</p>
<p>I reserved a medium instance for one year by paying an upfront fee of $390. Now, instead of paying $0.16 per hour, we pay $0.032 per hour (just over 3 cents!).  Some simple math shows the savings:</p>
<ul>
<li>With a normal &#8220;demand instance&#8221;, we paid $0.16 per hour * 24 hours per day * 365 days per year resulting in a <strong>yearly cost of $1,401.60</strong> (plus disk, I/O, transfer)</li>
<li>With the reserved instance, we paid $390 up front and then $0.032 per hour * 24 hours per day * 365 days per year resulting in a <strong>yearly cost of $670.32</strong> (plus disk, I/O, transfer)</li>
</ul>
<h4>Bottom line cost including disk, data, etc.</h4>
<ul>
<li>We paid around <strong>$2,280</strong> a year to the data center.</li>
<li>We now pay <strong>$1,160</strong> a year to Amazon EC2 &#8211; saving us over $1,000 per year (not counting any hardware costs we could have incurred).</li>
</ul>
<p>There are two smaller instance types &#8211; micro and small.  You might can get by far cheaper for your app/site.  With reserved instance pricing, you can get a micro instance for about $100 per year!  I currently host 6 low-use websites on a single micro instance (local bagel store, my aerial photo site, etc.).</p>
<p><strong>TIP:</strong> If you plan to use Amazon&#8217;s micro instances, you should be aware of how they throttle CPU.  It&#8217;s unique to the micro instance type.  <a href="http://gregsramblings.com/2011/02/07/amazon-ec2-micro-instance-cpu-steal/" target="_blank">I blogged about this months ago</a>.</p>
<p><strong>TIP:</strong> Amazon&#8217;s billing data is updated several times per day, so you can quickly determine what your run-rate is for everything. I was able to project our monthly cost after 24 hours of activity.</p>
<h4>We didn&#8217;t move to EC2 just to save money</h4>
<p><img class="alignright size-full wp-image-3353" title="serverrepair200" src="http://gregsramblings.com/wp-content/uploads/2012/05/serverrepair200.jpg" alt="" width="200" height="300" />Yes, we&#8217;re saving some money &#8211; that&#8217;s awesome, but to be honest, it&#8217;s not the reason we moved.   The real reason we wanted to move to a cloud solution like EC2 is for peace of mind and to prevent us from dealing with a hardware failures.  We had a backup server in the data center, but if there was a failure in the primary server, it would likely result in a 30 minute drive to the data center and a few hours in a cold room moving hard drives from server to server and hoping it all goes well.  It was a precarious situation!  Now, if there is a hardware failure (rare, but they happen on EC2), I simply launch a new instance with a few clicks of the mouse, mount our disk volume to it, tweak a few things, and get us back online.  All of this while watching Big Bang Theory in my PJs!</p>
<p>I know that a few of you IT-minded folks are seeing some holes in my final architecture, and yes, you&#8217;re correct. The above scheme doesn&#8217;t address a disk volume crash. Disk volume crashes are very rare on EC2, but I do plan to make a few more enhancements to the architecture. I could start up a new instance and use it as a slave server to replicate data from the primary server&#8217;s database (MySQL).  I could start this backup instance in a completely different zone, which basically means that it&#8217;s in a different physical facility.  This would allow us to quickly recover if Amazon has a massive failure like the one a year ago that brought down several popular sites for a few hours. However, I might go the cheap route and create a 2nd disk volume and use a file system that allows me to mirror the database between the two disk volumes. I think this will be adequate until someone buys us for a $1 billion. <img src='http://gregsramblings.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Another option to mention is <a href="http://aws.amazon.com/rds/" target="_blank">Amazon RDS</a> (MySQL in the cloud). If we used RDS for our database, it would give us more redundancy and scalability, but for now, we&#8217;re going to avoid that cost and stay on the single instance until we grow more.</p>
<h4>It may not be for all applications</h4>
<p>Our experience with EC2 was very positive, especially with this application.  However, it&#8217;s not perfect for all applications.  The server is still &#8220;virtual&#8221; so the performance is not perfectly<br />
consistent.  Things like disk I/O speed, network bandwidth, etc., is what it is.  You can&#8217;t tell Amazon that you need a SSD for your swap drive and 10,000RPM drives for your databases. In other words, you don&#8217;t have as many ways to tweak performance as you do by managing your own real hardware.  However, if your app runs well on EC2, why bother with that stuff?!  I personally feel that I&#8217;ve served my time in computer rooms during my career. <img src='http://gregsramblings.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h4>The rest of the Amazon Web Services world</h4>
<p>Everything we&#8217;ve talked about in this article has been specific to the low-end instance types of Amazon EC2.  There are many other instance types and other related features including load balancers, auto-scaling, monitoring, automatic alerts, etc.  Also, EC2 is only one of many services offered by Amazon.  Check them all out at <a href="http://aws.amazon.com/" target="_blank">http://aws.amazon.com/</a>.</p>
<h4><a href="http://aws.amazon.com"><img class="aligncenter size-full wp-image-3369" title="awslogo" src="http://gregsramblings.com/wp-content/uploads/2012/05/awslogo1.png" alt="" width="162" height="64" /></a></h4>
<h4>Check it out for free</h4>
<p>Amazon recently started offering a &#8220;<a href="http://aws.amazon.com/free/" target="_blank">free tier</a>&#8221; for EC2 newbies. You basically get a year free of a micro instance along with some disk space and bandwidth. See <a href="http://aws.amazon.com/free/" target="_blank">http://aws.amazon.com/free</a> for more details. Remember &#8211; you can resize instances anytime. It&#8217;s very common to use a micro instance during development, and then upgrade as needed when you go live.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2012%2F05%2F02%2Famazon-ec2-a-real-world-case-study-of-moving-from-data-center-to-the-cloud-chessjam%2F&amp;title=Amazon%20EC2%20%E2%80%93%20a%20real-world%20case%20study%20of%20moving%20from%20a%20data%20center%20to%20the%20cloud" id="wpa2a_8"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2012/05/02/amazon-ec2-a-real-world-case-study-of-moving-from-data-center-to-the-cloud-chessjam/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>JavaScript Developer Magazine &#8211; Appliness May Issue now Available</title>
		<link>http://gregsramblings.com/2012/04/30/javascript-developer-magazine-may-2012-appliness/</link>
		<comments>http://gregsramblings.com/2012/04/30/javascript-developer-magazine-may-2012-appliness/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 18:57:00 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iOS/iPhone/iPad]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[WebKit]]></category>
		<category><![CDATA[app-ui]]></category>
		<category><![CDATA[appliness]]></category>
		<category><![CDATA[backbone.js]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[DPS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript magazine]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[twitter boostrap]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3336</guid>
		<description><![CDATA[The May 2012 issue of Appliness is now available for your iPad and Android tablet.  This issue has over 100 pages of content including tons of code samples and interactive demos.  If you are a JavaScript developer, this is something you should subscribe to.  It&#8217;s free. May 2012 table of contents: CSS Regions and CSS [...]]]></description>
			<content:encoded><![CDATA[<p>The May 2012 issue of <a href="http://appliness.com" target="_blank">Appliness</a> is now available for your iPad and Android tablet.  This issue has over 100 pages of content including tons of code samples and interactive demos.  If you are a JavaScript developer, this is something you should subscribe to.  It&#8217;s free.</p>
<p><strong>May 2012 table of contents:</strong></p>
<ul>
<li>CSS Regions and CSS Exclusions, by Deepa Subramaniam</li>
<li>Drag and drop with jQuery UI on mobile devices, by Michaël Chaize</li>
<li>JavaScript Object Creation, by Keith Peters</li>
<li>Using Backbone with jQuery Mobile, by Christophe Coenraets</li>
<li>Crafting native looking iOS apps with HTML, by Christophe Coenraets</li>
<li>Demo of Handlebars, by Raymond Camden</li>
<li>Real-time data exchange in HTML5, by Ryan Stewart</li>
<li>Swipe to delete items, by Michaël Chaize</li>
<li>App-UI, a library by Andrew Trice</li>
<li>HTML5 Multimedia components, by Ian Devlin</li>
<li>Interview of Pamela Fox</li>
<li>Colour Match, Cutest Paw, Bit Timer: showcase</li>
<li>Which Element ? Pull quotes, comments</li>
<li>PhoneGap and the File API</li>
<li>WTFJS: False advertising</li>
<li>Generate color palettes from HTML5 video</li>
<li>CSS variables draft</li>
<li>News</li>
</ul>
<p>More information at <a href="http://appliness.com/download-the-second-issue/" target="_blank">http://appliness.com/download-the-second-issue/</a></p>
<p><img class="alignnone size-full wp-image-3345" title="JavaScript Developer Magazine Appliness" src="http://gregsramblings.com/wp-content/uploads/2012/04/collage700.png" alt="" width="700" height="643" /></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2012%2F04%2F30%2Fjavascript-developer-magazine-may-2012-appliness%2F&amp;title=JavaScript%20Developer%20Magazine%20%E2%80%93%20Appliness%20May%20Issue%20now%20Available" id="wpa2a_10"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2012/04/30/javascript-developer-magazine-may-2012-appliness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WANTED &#8211; Rock star C++ programmers to work on WebKit</title>
		<link>http://gregsramblings.com/2012/04/17/wanted-rock-star-c-programmers-to-work-on-webkit/</link>
		<comments>http://gregsramblings.com/2012/04/17/wanted-rock-star-c-programmers-to-work-on-webkit/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 03:00:56 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[Job Postings]]></category>
		<category><![CDATA[WebKit]]></category>
		<category><![CDATA[adobe jobs]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[hiring]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3327</guid>
		<description><![CDATA[Did you know that Adobe is ramping up engineering efforts to build new features for WebKit?  This is not a fork of WebKit for an upcoming product.  This is WebKit trunk code commits!  The WebKit Engineering team in San Francisco contributes features, bug fixes, and engineering system improvements to WebKit.  They work on the WebKit [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that Adobe is ramping up engineering efforts to build new features for WebKit?  This is not a fork of WebKit for an upcoming product.  This is WebKit trunk code commits!  The WebKit Engineering team in San Francisco contributes features, bug fixes, and engineering system improvements to WebKit.  They work on the WebKit trunk, according to the processes of the WebKit development community.  You can get a taste of what the team has been working on by looking at <a href="http://blogs.adobe.com/webplatform/" target="_blank">http://blogs.adobe.com/webplatform/</a>.</p>
<p>If you are a C++ programmer with a desire to work on a highly visible team that is having a huge impact on the future of the web, it&#8217;s time to apply!  You can go to <a href="http://adobe.com/jobs" target="_blank">http://adobe.com/jobs</a> and search for the keyword &#8220;<strong>WebKit</strong>&#8221; to find the current open positions.  You can also email WebKitJobs at adobe dot com to apply.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2012%2F04%2F17%2Fwanted-rock-star-c-programmers-to-work-on-webkit%2F&amp;title=WANTED%20%E2%80%93%20Rock%20star%20C%2B%2B%20programmers%20to%20work%20on%20WebKit" id="wpa2a_12"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2012/04/17/wanted-rock-star-c-programmers-to-work-on-webkit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Appliness &#8211; New digital magazine for JavaScript app developers!</title>
		<link>http://gregsramblings.com/2012/03/28/appliness-javascript-magazine/</link>
		<comments>http://gregsramblings.com/2012/03/28/appliness-javascript-magazine/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 13:24:31 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[Adobe Digital Publishing Suite]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iOS/iPhone/iPad]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[adobe digital publishing suite]]></category>
		<category><![CDATA[Adobe DPS]]></category>
		<category><![CDATA[appliness]]></category>
		<category><![CDATA[DPS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web standards]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3309</guid>
		<description><![CDATA[Today, the Adobe evangelists team has launched a new digital magazine called Appliness. If you have an iPad or Android tablet, you can grab a free copy now! The Kindle Fire version will be available any day (we&#8217;re waiting on Amazon to approve &#8211; their backlog is 2 weeks!). This will be a monthly magazine [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://gregsramblings.com/wp-content/uploads/2012/03/appliness1.png"><img class="alignleft size-full wp-image-3310" title="appliness1" src="http://gregsramblings.com/wp-content/uploads/2012/03/appliness1.png" alt="" width="184" height="239" /></a>Today, the Adobe evangelists team has launched a new digital magazine called Appliness.  If you have an iPad or Android tablet, you can grab a free copy now!  The Kindle Fire version will be available any day (we&#8217;re waiting on Amazon to approve &#8211; their backlog is 2 weeks!).</p>
<p>This will be a monthly magazine with articles about writing applications using web standards. Some of the articles have interactive content and video.</p>
<p>All of this was done using Adobe Digital Publishing Suite (the same technology used for popular magazines such as Wired, National Geographic, and many more).</p>
<p>Michael Chaize was the driving force behind this and has a <a href="http://www.riagora.com/2012/03/appliness-digital-magazine/" target="_blank">blog post</a> with more details.  <a href="https://twitter.com/#!/mailevalentine" target="_blank">Maile Valentine</a> also played a huge role in the creation of Appliness &#8211; THANK YOU BOTH!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2012%2F03%2F28%2Fappliness-javascript-magazine%2F&amp;title=Appliness%20%E2%80%93%20New%20digital%20magazine%20for%20JavaScript%20app%20developers%21" id="wpa2a_14"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2012/03/28/appliness-javascript-magazine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex</title>
		<link>http://gregsramblings.com/2011/11/11/flex/</link>
		<comments>http://gregsramblings.com/2011/11/11/flex/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 01:42:01 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3292</guid>
		<description><![CDATA[The Flex team just provided some insight into what&#8217;s next for Flex - http://blogs.adobe.com/flex/2011/11/your-questions-about-flex.html]]></description>
			<content:encoded><![CDATA[<p><a href="http://gregsramblings.com/wp-content/uploads/2011/11/Flex-Logo.png"><img class="size-thumbnail wp-image-3294 alignleft" title="Flex-Logo" src="http://gregsramblings.com/wp-content/uploads/2011/11/Flex-Logo-150x150.png" alt="" width="150" height="150" /></a>The Flex team just provided some insight into what&#8217;s next for Flex - <a href="http://blogs.adobe.com/flex/2011/11/your-questions-about-flex.html" target="_blank">http://blogs.adobe.com/flex/2011/11/your-questions-about-flex.html</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F11%2F11%2Fflex%2F&amp;title=Flex" id="wpa2a_16"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/11/11/flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PhoneGap Day Videos now available</title>
		<link>http://gregsramblings.com/2011/11/03/relive-phonegap-day-with-videos/</link>
		<comments>http://gregsramblings.com/2011/11/03/relive-phonegap-day-with-videos/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 03:10:13 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[learn phonegap]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[phonegap videos]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3287</guid>
		<description><![CDATA[A great way to learn a lot about PhoneGap &#8212; http://phonegap.com/2011/11/03/relive-phonegap-day-with-videos/]]></description>
			<content:encoded><![CDATA[<p>A great way to learn a lot about PhoneGap &#8212; <a href="http://phonegap.com/2011/11/03/relive-phonegap-day-with-videos/" target="_blank">http://phonegap.com/2011/11/03/relive-phonegap-day-with-videos/</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F11%2F03%2Frelive-phonegap-day-with-videos%2F&amp;title=PhoneGap%20Day%20Videos%20now%20available" id="wpa2a_18"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/11/03/relive-phonegap-day-with-videos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript, CSS, HTML Frameworks and Tools &#8211; my list</title>
		<link>http://gregsramblings.com/2011/10/21/javascript-css-html-frameworks-tools-my-list/</link>
		<comments>http://gregsramblings.com/2011/10/21/javascript-css-html-frameworks-tools-my-list/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 20:57:50 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[angularjs]]></category>
		<category><![CDATA[appmobi]]></category>
		<category><![CDATA[cobiq]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery mobile]]></category>
		<category><![CDATA[jsfiddle]]></category>
		<category><![CDATA[knockout.js]]></category>
		<category><![CDATA[less]]></category>
		<category><![CDATA[leviroutes]]></category>
		<category><![CDATA[modernizr]]></category>
		<category><![CDATA[mustache]]></category>
		<category><![CDATA[saas]]></category>
		<category><![CDATA[sencha]]></category>
		<category><![CDATA[xui]]></category>
		<category><![CDATA[zepto]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3255</guid>
		<description><![CDATA[One of the challenges in the world of HTML/JavaScript/CSS app development is cobbling together your kitchen sink of frameworks, tools and other technologies. When you start looking around, it feels like there is an endless list of options, which is good and bad!  Recently, I&#8217;ve been gathering a list of what&#8217;s popular these days and [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-3260 aligncenter" style="border-width: 1px; border-color: black; border-style: solid;" title="javascript-frameworks-500" src="http://gregsramblings.com/wp-content/uploads/2011/10/javascript-frameworks-500.jpg" alt="" width="500" height="360" /></p>
<p>One of the challenges in the world of HTML/JavaScript/CSS app development is cobbling together your kitchen sink of frameworks, tools and other technologies. When you start looking around, it feels like there is an endless list of options, which is good and bad!  Recently, I&#8217;ve been gathering a list of what&#8217;s popular these days and thought it might be useful for others to share. If you see anything obvious missing, please let me know.  Thanks to the following for helping me put together this list: <a href="http://www.coldfusionjedi.com/" target="_blank">Ray Camden</a>, <a href="http://www.tricedesigns.com/" target="_blank">Andy Trice</a>, <a href="http://wilsonhut.wordpress.com/" target="_blank">Philip Wilson</a>, <a href="http://coenraets.org/" target="_blank">Christophe Coenraets</a>, <a href="http://www.riaspace.net/" target="_blank">Piotr Walczyszyn</a>, and <a href="https://twitter.com/#!/ibjhb" target="_blank">James Brown</a>.</p>
<h4>In no particular order:</h4>
<ul>
<li><strong>Adobe Edge</strong> &#8211; HTML5/JS/CSS animation/interaction tool - <a href="http://labs.adobe.com/technologies/edge/" target="_blank">http://labs.adobe.com/technologies/edge/</a></li>
<li><strong>Less Framework</strong> &#8211; CSS grid system/layout - <a href="http://lessframework.com/" target="_blank">http://lessframework.com/</a></li>
<li><strong>Less</strong> &#8211; alternative CSS syntax &#8211; supports OO-like syntax &#8211; referenced by Google at Google IO &#8211; used in many projects - <a href="http://lesscss.org/" target="_blank">http://lesscss.org/</a></li>
<li><strong>Saas</strong> &#8211; another alternative CSS syntax &#8211; similar to Less - <a href="http://sass-lang.com/" target="_blank">http://sass-lang.com/</a></li>
<li><strong>Kendo UI Framework</strong> (mobile coming soon) - <a href="http://www.kendoui.com/" target="_blank">http://www.kendoui.com/</a></li>
<li><strong>Sencha</strong> - <a href="http://www.sencha.com/" target="_blank">http://www.sencha.com/</a> - multiple products &#8211; including Sencha Touch, Charts, etc.</li>
<li><strong>JQuery UI</strong> - <a href="http://jqueryui.com/" target="_blank">http://jqueryui.com/</a></li>
<li><strong>JQuery (core)</strong> - <a href="http://jquery.com/" target="_blank">http://jquery.com/</a></li>
<li><strong>JQuery Mobile</strong> - <a href="http://jquerymobile.com/" target="_blank">http://jquerymobile.com/</a></li>
<li><strong>xui</strong> -minimalist JQuery-like framework - <a href="http://xuijs.com/" target="_blank">http://xuijs.com/</a></li>
<li><strong>zepto.js</strong> &#8211; minimalist JQuery-like framework - <a href="http://zeptojs.com/" target="_blank">http://zeptojs.com/</a></li>
<li><strong>Backbone.js</strong> MVC framework for JavaScript - <a href="http://documentcloud.github.com/backbone/" target="_blank">http://documentcloud.github.com/backbone/</a></li>
<li><strong>Underscore.js</strong> &#8211; Kitchen-sink utilities for JavaScript - <a href="http://documentcloud.github.com/underscore/" target="_blank">http://documentcloud.github.com/underscore/</a></li>
<li><strong>Modernizr</strong> &#8211; JavaScript library to detect device features &#8211; very popular - <a href="http://modernizr.com/" target="_blank">http://modernizr.com/</a></li>
<li><strong>cubiq.org</strong> &#8211; home of iScroll, a very popular scroll/list lib - <a href="http://cubiq.org/" target="_blank">http://cubiq.org/</a></li>
<li><strong>appMobi</strong> &#8211; web-based dev with emulation, etc.  Also has an HTML5-framework - <a href="http://www.appmobi.com/" target="_blank">http://www.appmobi.com/</a></li>
<li><strong>LeviRoutes</strong> - lightweight routes framework for hooking in to HTML5 history - <a href="https://github.com/PaulKinlan/leviroutes" target="_blank">https://github.com/PaulKinlan/leviroutes</a></li>
<li><strong>Mustache</strong> &#8211; &#8220;logic-less templates&#8221; &#8211; mentioned by Google presenters at Google IO - <a href="http://mustache.github.com/" target="_blank">http://mustache.github.com/</a></li>
<li><strong>Midori</strong> &#8211; JavaScript framework &#8211; JQuery-like with some unique features - <a href="http://www.midorijs.com/" target="_blank">http://www.midorijs.com/</a></li>
<li><strong>Knockout.js</strong> &#8211; JavaScript UI framework &#8211; implements MVVM pattern &#8211; recommended by Greg&#8217;s brother &#8211; popular - <a href="http://knockoutjs.com/" target="_blank">http://knockoutjs.com/</a></li>
<li><strong>AngularJS</strong> &#8211; MVC framework, two-way data binding, JQuery-compatible - <a href="http://angularjs.org/" target="_blank">http://angularjs.org/</a></li>
<li><strong>JSFiddle</strong> &#8211; online tool for doing lint/tidy/debugging - <a href="http://jsfiddle.net/" target="_blank">http://jsfiddle.net/</a></li>
<li><strong>HighCharts</strong> &#8211; fantastic looking charts - <a href="http://www.highcharts.com/" target="_blank">http://www.highcharts.com/</a></li>
<li><strong>ZingCharts</strong> &#8211; HTML5/SVG/VML and Flash charts - <a href="http://www.zingchart.com/#welcome" target="_blank">http://www.zingchart.com/#welcome</a></li>
<li><strong>AMCharts</strong> &#8211; JavaScript/HTML5-based charts.  They also offer Flash-based charts. - <a href="http://www.amcharts.com/javascript/" target="_blank">http://www.amcharts.com/javascript/</a></li>
<li><strong>HTML5 Boiler Plate</strong> &#8211; assist with cross-browser issues and other utils - <a href="http://html5boilerplate.com/" target="_blank">http://html5boilerplate.com/</a></li>
<li><strong>Bootstrap, from Twitter</strong> - Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites. <a href="http://twitter.github.com/bootstrap/" target="_blank">http://twitter.github.com/bootstrap/</a></li>
<li><strong>Popcorn.js</strong> &#8211; HTML5/JS Media Framework - <a href="http://popcornjs.org/" target="_blank">http://popcornjs.org/</a></li>
<li><strong>Three.js</strong> &#8211; JavaScript 3D engine - <a href="https://github.com/mrdoob/three.js" target="_blank">https://github.com/mrdoob/three.js</a> and <a href="http://www.aerotwist.com/lab/getting-started-with-three-js/" target="_blank">http://www.aerotwist.com/lab/getting-started-with-three-js/</a></li>
<li><strong>PhoneGap</strong> &#8211; <a href="http://phonegap.com" target="_blank">http://phonegap.com</a></li>
<li><strong>PhoneGap Plugins</strong> - <a href="https://github.com/phonegap/phonegap-plugins" target="_blank">https://github.com/phonegap/phonegap-plugins</a></li>
<li><strong>Require.js</strong> &#8211; <a href="http://requirejs.org" target="_blank">http://requirejs.org</a> - RequireJS is a JavaScript file and module loader</li>
<li><strong>Brunch</strong> - <a href="http://brunch.io/" target="_blank">http://brunch.io/</a> - A lightweight approach to building HTML5 applications with emphasis on elegance and simplicity.</li>
</ul>
<div>I&#8217;m also collecting a list of great learning resources, especially videos from Google IO and other conferences.  I&#8217;ll blog this list soon.</div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F10%2F21%2Fjavascript-css-html-frameworks-tools-my-list%2F&amp;title=JavaScript%2C%20CSS%2C%20HTML%20Frameworks%20and%20Tools%20%E2%80%93%20my%20list" id="wpa2a_20"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/10/21/javascript-css-html-frameworks-tools-my-list/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Upgrading my MacBook Pro to a SSD (solid state drive)</title>
		<link>http://gregsramblings.com/2011/10/12/upgrading-my-macbook-pro-to-a-ssd-solid-state-drive/</link>
		<comments>http://gregsramblings.com/2011/10/12/upgrading-my-macbook-pro-to-a-ssd-solid-state-drive/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 21:31:29 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[Cool Technology]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[macbook pro]]></category>
		<category><![CDATA[solid-state drive]]></category>
		<category><![CDATA[ssd]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3240</guid>
		<description><![CDATA[Solid-state drives (SSDs) have been available for a few years now, but I&#8217;ve been reluctant to move to one due to some early problems that friends of mine had.  When a SSD fails, there is no warning&#8230; no clicking drive sound, and no opportunity to save a few files.  When it crashes, it&#8217;s instant death. [...]]]></description>
			<content:encoded><![CDATA[<p>Solid-state drives (SSDs) have been available for a few years now, but I&#8217;ve been reluctant to move to one due to some early problems that friends of mine had.  When a SSD fails, there is no warning&#8230; no clicking drive sound, and no opportunity to save a few files.  When it crashes, it&#8217;s instant death.  I&#8217;m usually a bleeding edge guy when it comes to technology, but converting my primary drive on my primary development machine was a bit scary, so I&#8217;ve waited.  Current SSDs are much more reliable and I don&#8217;t hear of any crash stories any more, so I felt it was time.  Yesterday I upgraded my MacBook Pro 15&#8243; (early 2011 model) from a 500GB 7200RPM drive to a 300GB SSD. After tweeting about it, I had a few people ask me what steps I took, so I have documented it:</p>
<p><strong>Stuff needed:</strong></p>
<ul>
<li>Small Phillips-head screwdriver</li>
<li>T6 Torx screwdriver (I found one at the local CompUSA as part of a small computer toolkit that cost less than $15)</li>
<li>New hard drive &#8211; in my case, it&#8217;s the <a href="http://www.amazon.com/gp/product/B004T0DNI8" target="_blank">Intel 320 Series 300GB SATA 3.0 GB-s 2.5&#8243; Solid State drive</a></li>
<li>SATA USB Docking station &#8211; allows you to access the new hard drive as a USB drive.  There are many alternatives.  I&#8217;ve had the <a href="http://www.amazon.com/gp/product/B001A4HAFS/" target="_blank">Thermaltake BlacX</a> for a couple of years.</li>
<li>Software to clone hard drives.  There are a few options, but I use <a href="http://www.bombich.com/" target="_blank">Carbon Copy Cloner</a>.  This software is also good for creating bootable USB drive images of your main drive.  In a pinch, you could boot off your USB drive and keep going if your main drive crashes.</li>
<li>Good directions on replacing the hard drive.  The iFixit site always has good directions.  For my early-2011 MacBook pro 15&#8243;, I used <a href="http://www.ifixit.com/Guide/Installing-MacBook-Pro-15-Inch-Unibody-Early-2011-Hard-Drive-Replacement/5895/1" target="_blank">this page</a>.</li>
</ul>
<p><center><a href="http://gregsramblings.com/wp-content/uploads/2011/10/intel320a.png"><img class="size-thumbnail wp-image-3242 alignnone" title="intel320a" src="http://gregsramblings.com/wp-content/uploads/2011/10/intel320a-150x150.png" alt="" width="150" height="150" /> </a>    <a href="http://gregsramblings.com/wp-content/uploads/2011/10/blacxa.png"><img class="size-thumbnail wp-image-3243 alignnone" title="blacxa" src="http://gregsramblings.com/wp-content/uploads/2011/10/blacxa-150x150.png" alt="" width="150" height="150" /></a></center><strong>Steps I took:</strong></p>
<ol>
<li>I cleaned up my existing hard drive.  Since I was downsizing (for the first time in my life!), I had to do some serious space making (long overdue).</li>
<li>I plugged my new SSD into the SATA USB Dock and connected it to my computer.</li>
<li>I formatted the drive using Disk Utility.  I used the same format as my main drive (Mac OS Extended (Journaled)).</li>
<li>I ran Carbon Copy Cloner and set it to copy everything.  This took about 4 hours on my machine.  During that 4 hours, I continued to work knowing that I would be slightly out of sync when the cloning process was complete.</li>
<li>After the clone was finished, I shut down Mail, Calendar, Eclipse, Evernote, etc., and ran the clone process again as an incremental update.  This took less than 30 minutes.</li>
<li>I then shut down the MacBook Pro, unplugged it and flipped it upside down to start the surgery.</li>
<li>I followed the instructions at <a href="http://www.ifixit.com/Guide/Installing-MacBook-Pro-15-Inch-Unibody-Early-2011-Hard-Drive-Replacement/5895/1" target="_blank">http://www.ifixit.com/Guide/Installing-MacBook-Pro-15-Inch-Unibody-Early-2011-Hard-Drive-Replacement/5895/1</a> to swap the drives.  Depending on which model of MacBook you have, you may need to find alternative instructions.  For the early 2011 MacBook Pro 15&#8243;, it&#8217;s a piece of cake.  The only nervous moment was getting the bottom panel to snap off.  It takes some gentle prying.  Everything else was easy.  Since I was only replacing the hard drive, I skipped the step about disconnecting the battery.  (Do this at your own risk)</li>
<li>I put everything back together and booted it up.</li>
<li>After it was up and going, I turned off the hard drive sleep feature in SETTINGS, ENERGY SAVER (uncheck the &#8220;Put the hard disks(s) to sleep when possible&#8221; on both BATTERY and POWER ADAPTER).</li>
<li>All modern MacBooks have sudden motion sensors that halt the hard drive when motion is detected to save the drive heads.  Since this is a solid state drive with no moving parts, I turned off this feature using the following command in terminal: <strong>sudo pmset -a sms 0</strong></li>
<li>I then went to disk utility and verified the disk, and ran the repair permissions function.  This is always a good idea after doing any drive swap.</li>
</ol>
<div><strong>Results:</strong></div>
<div>I expected things to be faster, but WOW!  Boot time is crazy fast.  There is no pause between logging in and being able to launch an app.  Everything on the system is faster!  Build time for Flex apps is cut in half!  The drive will pay for itself in a few weeks in saved time.  The silence is a little eerie at first, but I&#8217;ve quickly adjusted.  :)</div>
<p>&nbsp;</p>
<div><strong>UPDATE</strong>: I put a 500GB regular hard drive in the optical bay using the <a href="http://eshop.macsales.com/item/Other+World+Computing/DDAMBS0GB/" target="_blank">OWC Data Doubler</a>.  The kit is fantastic and worth every penny.  It contains all of the tools that you need and their website has videos clearly documenting the hardware replacement.  I use the 2nd drive for backups, VMWare images and other media.  After I put this drive in, I decided to undo the command above that turns off hard drive sleep mode.  So far, everything has been working great.  To conserve battery life, I manually eject the drive.  Here are two command-line tricks for managing the 2nd hard drive:</div>
<p>&nbsp;</p>
<div>
<ul>
<li><strong>diskutil eject /dev/disk1</strong>  &#8211; ejects my 2nd hard drive which forces it to power down.  The drive is then unavailable until you remount it using the following command.</li>
<li><strong>diskutil mountDisk /dev/disk1</strong>  &#8212; mounts the drive again.</li>
</ul>
<p><strong>The OWC Data Doubler:</strong></p>
<div><a href="http://eshop.macsales.com/item/Other+World+Computing/DDAMBS0GB/"><img class="size-medium wp-image-3283" title="OWC Data Doubler" src="http://gregsramblings.com/wp-content/uploads/2011/10/datadoubler_hero10-300x186.jpg" alt="" width="300" height="186" /></a></div>
</div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F10%2F12%2Fupgrading-my-macbook-pro-to-a-ssd-solid-state-drive%2F&amp;title=Upgrading%20my%20MacBook%20Pro%20to%20a%20SSD%20%28solid%20state%20drive%29" id="wpa2a_22"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/10/12/upgrading-my-macbook-pro-to-a-ssd-solid-state-drive/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Stupid PhoneGap Tricks &#8211; loading external content</title>
		<link>http://gregsramblings.com/2011/10/12/stupid-phonegap-tricks-loading-external-content/</link>
		<comments>http://gregsramblings.com/2011/10/12/stupid-phonegap-tricks-loading-external-content/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 06:18:15 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3229</guid>
		<description><![CDATA[Most PhoneGap apps are built so that the HTML/JS/CSS content is bundled into the app (see my previous blog post).  I wondered if it was possible to load external content into the PhoneGap container, and after a few minutes of looking at the APIs, I discovered that it is doable, at least on Android (I&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>Most PhoneGap apps are built so that the HTML/JS/CSS content is bundled into the app (see my <a href="http://gregsramblings.com/2011/10/06/what-is-phonegap/">previous blog post</a>).  I wondered if it was possible to load external content into the PhoneGap container, and after a few minutes of looking at the APIs, I discovered that it is doable, at least on Android (I&#8217;ll try iOS later, but if you are reading this and already know how to do it on iOS, please comment).</p>
<p>Simply modify the main Java Class of your PhoneGap Android project and set the <strong>loadInWebView</strong> property to <strong>true</strong> &#8211; then simply load your content using http:// instead of file://.  If you try using http:// without setting the loadInWebView property, it will open the page in the device&#8217;s browser and your code won&#8217;t have access to the device APIs.</p>
<p>For example:</p>
<pre class="brush: java; title: ; notranslate">
package com.gregwilson.gregpg1;

import com.phonegap.*;

public class GregPG1Activity extends DroidGap {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.setBooleanProperty(&quot;loadInWebView&quot;, true);
        super.loadUrl(&quot;http://somewebsite/index.html&quot;);
        //ORIGINAL--&gt; super.loadUrl(&quot;file:///android_asset/www/index.html&quot;);
    }
}
</pre>
<p>Since the web content is loaded and executed in the PhoneGap container, you can use any PhoneGap JavaScript APIs you desire just as if the code was loaded from the device. A few thoughts:</p>
<ul>
<li>This could actually speed up parts of the development workflow because now I can simply modify the HTML/CSS/JS and reload the page (once I add a reload button!).  It avoids having to deploy the app over and over.</li>
<li>This opens up a huge security hole.  Imagine if someone could hack your web server and inject some new JavaScript.  Since the JavaScript executes on the device, in the PhoneGap container, it could easily extract or delete your contacts, determine your location and many other devious things.  Therefore, I would NOT recommend doing this for anything other than testing.
<li>There might be some interesting hybrid apps where some of the content is sourced from the server while other content is on the device, but I&#8217;m fairly sure this would not be a &#8220;best practice&#8221; without further code changes to avoid the security issues.</li>
<li>Assuming this is possible on iOS, I&#8217;m fairly certain that your app could be rejected since you are loading external code (a no-no in iOS-land).</li>
</ul>
<p>I&#8217;m not a PhoneGap expert (yet!), so feel free to correct me.  I&#8217;m basically blogging as I learn!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F10%2F12%2Fstupid-phonegap-tricks-loading-external-content%2F&amp;title=Stupid%20PhoneGap%20Tricks%20%E2%80%93%20loading%20external%20content" id="wpa2a_24"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/10/12/stupid-phonegap-tricks-loading-external-content/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How PhoneGap impacts how we evangelize Flex</title>
		<link>http://gregsramblings.com/2011/10/06/how-phonegap-impacts-how-we-evangelize-flex/</link>
		<comments>http://gregsramblings.com/2011/10/06/how-phonegap-impacts-how-we-evangelize-flex/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 03:40:09 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Adobe MAX 2011]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Flex on Mobile]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iOS/iPhone/iPad]]></category>
		<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[adobe evangelist]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3197</guid>
		<description><![CDATA[DISCLAIMER:  The following is my personal opinion and not necessarily that of my employer (Adobe Systems, Inc.). The PhoneGap announcement at MAX 2011 really got a lot of people excited (including me!), and it raised a few questions about how it changes our jobs as evangelists.  PhoneGap gives us the means to build cross-platform apps with [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-3215 alignright" style="margin-left: 8px; margin-right: 8px;" title="mobiledevelopmentadobe" src="http://gregsramblings.com/wp-content/uploads/2011/10/mobiledevelopmentadobe.jpg" alt="" width="278" height="200" /><strong>DISCLAIMER:</strong>  The following is my personal opinion and not necessarily that of my employer (Adobe Systems, Inc.).</p>
<p>The <a href="PhoneGap announcement at MAX 2011" target="_blank">PhoneGap announcement at MAX 2011</a> really got a lot of people excited (including me!), and it raised a few questions about how it changes our jobs as evangelists.  PhoneGap gives us the means to build cross-platform apps with HTML5 with hooks into the device&#8217;s native APIs (see my <a href="http://gregsramblings.com/2011/10/06/what-is-phonegap/">previous post</a>).  Having new things to show off to developers and customers is always a good thing, especially when this new thing lets us stretch our new HTML5 muscles on mobile devices.  I&#8217;m already playing around with using <a href="http://labs.adobe.com/technologies/edge/" target="_blank">Adobe Edge</a> to animate some interactions in a mobile app (stay tuned!).</p>
<p>As a technical evangelist talking to developers, having PhoneGap in my arsenal removes the  &#8221;HTML vs Flash/Flex&#8221; religion  from the discussion and allows us to have a real conversation about which technology is the best solution for the requirements at hand.</p>
<p>Here&#8217;s an analogy:  If I worked for a company that sells tile flooring, it would be tough for me to convince someone that tile is the best choice for a particular room because they will expect me to say that tile is best for everything.  Conversely, if I worked for a company that sells wood flooring, they expect me to say wood is best.  However, if I work for a company that sells both types of flooring, I can have a real discussion about which is best on a room by room basis because I will have credibility in both types of flooring.</p>
<p>Now the conversation starts at a higher level and allows me to be more effective at demonstrating the value that Adobe offers to anyone building mobile apps.</p>
<p>There are clearly use-cases where PhoneGap will indeed be the better choice because of the lightweight nature, broader device support and the availability of the required skillset to build these types of apps.  However, there will continue to be use-cases that go beyond the capabilities of HTML5 and will demand the more capable Flash/Flex platform.  Features such as collaboration, complex UIs, handling of large data sets, real-time data processing, and rich data visualization are just a few examples where HTML5 simply won&#8217;t cut it today.  However, as the capabilities of the platforms evolve, Adobe is in a good position to provide solutions across the spectrum.</p>
<p>Our team is in rapid learning mode now, but that&#8217;s why we do this job.  New products, new technologies and new ways of approaching problems is what fuels us.  We&#8217;re basically professional learners.  During the next few months, you&#8217;ll see more content related to PhoneGap as well as the new features coming in Flex 4.6, and much more.  Fun, fun!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F10%2F06%2Fhow-phonegap-impacts-how-we-evangelize-flex%2F&amp;title=How%20PhoneGap%20impacts%20how%20we%20evangelize%20Flex" id="wpa2a_26"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/10/06/how-phonegap-impacts-how-we-evangelize-flex/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>What is PhoneGap?</title>
		<link>http://gregsramblings.com/2011/10/06/what-is-phonegap/</link>
		<comments>http://gregsramblings.com/2011/10/06/what-is-phonegap/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 02:45:59 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iOS/iPhone/iPad]]></category>
		<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[uiwebview]]></category>
		<category><![CDATA[webview]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3183</guid>
		<description><![CDATA[Earlier this week at Adobe MAX, it was announced that Adobe had started the process (signed a definitive agreement) of acquiring Nitobi, the makers of PhoneGap. After this announcement, I had multiple conversations with conference attendees and found that several of them really had no idea what PhoneGap is. Some thought it was a JavaScript [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this week at Adobe MAX, it was <a href="http://www.phonegap.com/2011/10/03/nitobi-enters-into-acquisition-agreement-with-adobe-2/" target="_blank">announced</a> that Adobe had started the process (signed a definitive agreement) of acquiring Nitobi, the makers of PhoneGap. After this announcement, I had multiple conversations with conference attendees and found that several of them really had no idea what PhoneGap is. Some thought it was a JavaScript framework that competes with JQuery or Sencha; others thought it was something that converted JavaScript to native Objective C or Java.  Both of these are incorrect &#8211; not even close&#8230; so I decided to write a quick blog post to explain.</p>
<p>Since I&#8217;m more familiar with Android than iOS, I&#8217;ll explain how it works for Android.</p>
<p>First, you create a new Android project in Eclipse (requires the Android SDK), add the phonegap.jar file to the lib folder, and make a few tweaks to the manifest and other files (details <a href="http://www.phonegap.com/start#android" target="_blank">here</a>). The main java file is modified as follows:</p>
<pre class="brush: java; highlight: [11]; title: ; notranslate">
package com.gregwilson.gregpg1;

import com.phonegap.*;
import android.os.Bundle;

public class GregPG1Activity extends DroidGap {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl(&quot;file:///android_asset/www/index.html&quot;);
    }
}
</pre>
<p>Notice the highlighted line (line 11) &#8212;  We&#8217;ve created a native Android app, and this native app loads <strong>android_assets/www/index.html</strong> in WebView when launched.  WebView is a class in the Android SDK that allows you to display web pages as a part of your layout.  It&#8217;s like having a web browser inside of your app and uses the device&#8217;s existing implementation of WebKit.  In iOS, it&#8217;s UIWebView.  Other mobile OSes use similar techniques.</p>
<p>Below is my project in both Eclipse (Android) and Xcode (iOS).  The web application is in the www folder indicated by the red arrows.</p>
<p><img class="aligncenter size-full wp-image-3184" title="adobephonegap" src="http://gregsramblings.com/wp-content/uploads/2011/10/adobephonegap.png" alt="" width="900" height="361" /></p>
<p>Now you simply compile, build, deploy like any other Android project.</p>
<p>Basically, PhoneGap apps are HTML/JS/CSS apps that run within the WebView (or equiv) component. If you are like me, at this point you are thinking, &#8220;Uh &#8211; that&#8217;s lame &#8211; is that it? I can do that today without any additional software&#8221;.</p>
<p>But there&#8217;s more&#8230; PhoneGap extends the WebView class to give it hooks back to the device itself and exposed them as JavaScript.  Remember the jar file that is in the project?  The project also includes a <strong>phonegap.js</strong> file, which exposes many new functions that make this much more than simply displaying a web page in a WebView component.</p>
<p>Check out the code below for accessing the device GPS (copied from one of the many great examples from <a href="http://docs.phonegap.com" target="_blank">http://docs.phonegap.com</a>).  If you create an PhoneGap project and copy the code below to your index.html file, you can see it run.</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Device Properties Example&lt;/title&gt;

    &lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot; src=&quot;phonegap.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;

    // Wait for PhoneGap to load
    //
    document.addEventListener(&quot;deviceready&quot;, onDeviceReady, false);

    // PhoneGap is ready
    //
    function onDeviceReady() {
        navigator.geolocation.getCurrentPosition(onSuccess, onError);
    }

    // onSuccess Geolocation
    //
    function onSuccess(position) {
        var element = document.getElementById('geolocation');
        element.innerHTML = 'Latitude: '           + position.coords.latitude              + '&lt;br /&gt;' +
                            'Longitude: '          + position.coords.longitude             + '&lt;br /&gt;' +
                            'Altitude: '           + position.coords.altitude              + '&lt;br /&gt;' +
                            'Accuracy: '           + position.coords.accuracy              + '&lt;br /&gt;' +
                            'Altitude Accuracy: '  + position.coords.altitudeAccuracy      + '&lt;br /&gt;' +
                            'Heading: '            + position.coords.heading               + '&lt;br /&gt;' +
                            'Speed: '              + position.coords.speed                 + '&lt;br /&gt;' +
                            'Timestamp: '          + new Date(position.timestamp)          + '&lt;br /&gt;';
    }

    // onError Callback receives a PositionError object
    //
    function onError(error) {
        alert('code: '    + error.code    + '\n' +
              'message: ' + error.message + '\n');
    }

    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;p id=&quot;geolocation&quot;&gt;Finding geolocation...&lt;/p&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Now your &#8220;web app&#8221; has access to Accelerometer, Camera, Compass, Contacts, and many other device capabilities.</p>
<h3>Some observations:</h3>
<ul>
<li>Since the app itself is super small, it loads crazy fast &#8211; less than one second on my HTC Inspire and iPad 2.  You probably won&#8217;t even need a splash screen.</li>
<li>The framework is simple and lightweight, so the resulting app has a very small memory footprint. This allows apps to work on older and slower hardware like the original iPhone and older BlackBerry phones.</li>
<li>The PhoneGap docs and examples are fantastic &#8211; clear and concise.  I was able to copy/paste every sample and see the results. (one note &#8212; the phonegap-1.1.0.js for Android is different than the phonegap-1.1.0.js for iOS &#8211; I initially made the mistake of assuming they were identical and killed a few hours trying to figure out why certain samples wouldn&#8217;t run)</li>
<li>The platform support is broad. As of this article, PhoneGap supports iOS (iPhone, iPhone 3G/3Gs/4/4S, iPad 1/2, Android (all versions), BlackBerry OS 4.6 and newer, WebOS, Symbian, Bada and they have recently started to support Windows Mobile. See <a href="http://www.phonegap.com/about/features" target="_blank">http://www.phonegap.com/about/features</a> for a list of what&#8217;s supported on each.</li>
<li>Your HTML/JS/CSS run in the native WebView so you are free to use any frameworks you desire such as JQuery Mobile, Sencha, whatever. PhoneGap gives you a WebView/UIWebView with hooks to the device. The rest is up to you.</li>
<li>PhoneGap is free, open-source and will become an Apache project very soon (translation &#8211; it will remain free).</li>
<li>PhoneGap is extendable via a plugin model giving you a bridge between native code capabilities and JavaScript.</li>
<li>There is already a great collection of community-created plugins at <a href="https://github.com/phonegap/phonegap-plugins" target="_blank">https://github.com/phonegap/phonegap-plugins</a>.</li>
<li>I haven&#8217;t figured out a good way to debug these types of apps yet.  I suspect that this will be a bit of a challenge.  There is a console.log() function that will send messages back to your Eclipse console.  When the camera sample wasn&#8217;t working, I really had no clues as to why.  It&#8217;s likely that I&#8217;m missing something, so it&#8217;s too early to judge.</li>
</ul>
<h3>PhoneGap Build</h3>
<p>As you start building mobile apps in any technology, you soon discover that each platform has it&#8217;s own deployment steps and tooling requirments (some of which are amazingly tedious and error-prone).  For example, to build a native iOS app, you use Xcode, which only runs on Mac OS X.  To build for BlackBerry phones, you have to use their tooling that only runs on Windows.  To build for both platforms, you&#8217;ll need two machines (or use virtualization).  This is why <a href="http://build.phonegap.com" target="_blank">http://build.phonegap.com</a> was created.  The service allows you to upload your www project folder (or give it a GitHub URL) and it will package your app for the supported platforms.  The specific steps are documented at <a href="https://build.phonegap.com/docs/start" target="_blank">https://build.phonegap.com/docs/start</a>.  NOTE: Adobe has stated that this service will continue as part of the recently announced &#8220;<a href="http://www.adobe.com/products/creativecloud.html" target="_blank">Adobe Creative Cloud</a>&#8221; but no details have been provided nor has any pricing been announced.</p>
<h3>What&#8217;s next</h3>
<p>If you&#8217;re intrigued, I encourage you to go to <a href="http://phonegap.com" target="_blank">http://phonegap.com</a>, where you&#8217;ll find everything you need to build an app. I was able to get a Hello World app running on both Android and iOS in under 30 minutes (not counting the downloading of Xcode).  The &#8220;Getting Started&#8221; section is excellent.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F10%2F06%2Fwhat-is-phonegap%2F&amp;title=What%20is%20PhoneGap%3F" id="wpa2a_28"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/10/06/what-is-phonegap/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>A super simple approach to Splash Screens for Flex Mobile Apps</title>
		<link>http://gregsramblings.com/2011/09/25/flex-splash-screen-sizes-easy-approach/</link>
		<comments>http://gregsramblings.com/2011/09/25/flex-splash-screen-sizes-easy-approach/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 03:35:31 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[AIR for Android]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Flex on Mobile]]></category>
		<category><![CDATA[air splash]]></category>
		<category><![CDATA[flash splash]]></category>
		<category><![CDATA[flex splash]]></category>
		<category><![CDATA[splash screen]]></category>
		<category><![CDATA[splashScreenScaleMode]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3144</guid>
		<description><![CDATA[If you are fairly new to mobile app development with Flash or Flex, I bet you have run into the following issue when creating your splash screens &#8212; You create a splash image that looks great when the device is held in portrait orientation: &#8230;but then when you turn it landscape, you get the white [...]]]></description>
			<content:encoded><![CDATA[<p>If you are fairly new to mobile app development with Flash or Flex, I bet you have run into the following issue when creating your splash screens &#8212; You create a splash image that looks great when the device is held in portrait orientation:</p>
<p><a href="http://gregsramblings.com/wp-content/uploads/2011/09/app-portrait-good-orig.jpg"><img class="aligncenter size-full wp-image-3160" title="app-portrait-good-orig" src="http://gregsramblings.com/wp-content/uploads/2011/09/app-portrait-good-orig.jpg" alt="" width="215" height="388" /></a></p>
<p>&#8230;but then when you turn it landscape, you get the white borders (or whatever your app background color is):</p>
<p><img class="aligncenter size-full wp-image-3157" title="app-landscape-letterbox-bad" src="http://gregsramblings.com/wp-content/uploads/2011/09/app-landscape-letterbox-bad.jpg" alt="" width="391" height="207" /></p>
<p>&#8230;so you change the splashScreenScaleMode property to &#8220;<em>stretch</em>&#8221; and you get this (destroys the image):</p>
<p><img class="aligncenter size-full wp-image-3161" title="app-landscape-stretched-bad" src="http://gregsramblings.com/wp-content/uploads/2011/09/app-landscape-stretched-bad.jpg" alt="" width="391" height="207" /></p>
<p>&#8230;so then you start looking into how to include multiple splash screens, which requires a custom preloader and additional image work.</p>
<div class="woo-sc-box note  square " style="padding-left:15px;background-image:none;"><strong>Here&#8217;s a quick and simple solution</strong>: Put your splashScreenScaleMode back to &#8220;none&#8221;. Create your splash screen image as a square, and make the side dimensions equal to the length of the device. For example, if the screen is 480&#215;320, make it 480&#215;480, but make sure your artwork fits within the center 320&#215;320. When the app starts, the splash screen is auto centered.</div>
<p>Below is the same splash screen, but as you can see, I used a single square image that works with both orientations.</p>
<p><img class="aligncenter size-full wp-image-3163" title="app-autoorient-good" src="http://gregsramblings.com/wp-content/uploads/2011/09/app-autoorient-good.jpg" alt="" width="665" height="392" /></p>
<p>What about handling multiple device sizes? The same technique works, as long as you keep the content within the center square that has a width/height equal to the short side of the smallest device you intend to install on.</p>
<p>Below are two images; one for tablets, and one for phones. I&#8217;ve drawn the portrait and landscape edges of several popular devices.</p>
<p><strong>Tablets:</strong><br />
The largest tablet I&#8217;ve seen is the Motorola Zoom and Samsung Galaxy Tab 10.1, both of which are 1280&#215;800, so my diagram below assumes that it is the largest possible resolution by making the splash screen image 1280&#215;1280:</p>
<div id="attachment_3151" class="wp-caption aligncenter" style="width: 810px"><a href="http://gregsramblings.com/wp-content/uploads/2011/09/easy-splash-tablet.jpg"><img class="size-full wp-image-3151 " title="easy-splash-tablet-800" src="http://gregsramblings.com/wp-content/uploads/2011/09/easy-splash-tablet-800.jpg" alt="" width="800" height="800" /></a><p class="wp-caption-text">Click for full-size</p></div>
<p><strong>Phones:</strong><br />
Phones come in many resolutions. The image below assumes that the largest resolution is 960&#215;640 (iPhone 4), so the image is 960&#215;960:</p>
<div id="attachment_3152" class="wp-caption aligncenter" style="width: 620px"><a href="http://gregsramblings.com/wp-content/uploads/2011/09/easy-splash-phones.jpg"><img class="size-full wp-image-3152 " title="easy-splash-phones-600" src="http://gregsramblings.com/wp-content/uploads/2011/09/easy-splash-phones-600.jpg" alt="" width="610" height="610" /></a><p class="wp-caption-text">Click for full-size</p></div>
<p>Depending on your splash screen design, you could get away with only two images, one for tablets and one for phones. I typically do three images, one for the low-resolution iPhone 3Gs, one for other phones, and one for tablets.</p>
<p>If you are building an app that targets multiple device resolutions, I suggest you use the code below as your preloader. It assumes three images &#8211; tablet, high-res phones, low-res phones. It selects the image based on the length of the longest edge of the screen.</p>
<pre class="brush: as3; title: ; notranslate">
// Based on original DPI-based code by Jason San Jose at http://www.adobe.com/devnet/flex/articles/mobile-skinning-part2.html#articlecontentAdobe_numberedheader_5
// Improved by Christophe Coenraets to select image based on length of longest edge of device - http://coenraets.org
// Simplied by Greg Wilson to use only 3 images for all devices
package
{
	import flash.desktop.NativeApplication;
	import flash.display.NativeWindow;
	import flash.display.Stage;
	import flash.display.StageAspectRatio;
	import flash.display.StageOrientation;
	import flash.system.Capabilities;

	import mx.core.DPIClassification;
	import mx.core.mx_internal;

	import spark.preloaders.SplashScreen;

	use namespace mx_internal;

	public class MultiDPISplashScreen extends SplashScreen
	{
		[Embed(source=&quot;assets/splash-tablet.png&quot;)]
		private var SplashImageTablet:Class;

		[Embed(source=&quot;assets/splash-high-phone.png&quot;)]
		private var SplashImageHighPhone:Class;

		[Embed(source=&quot;assets/splash-low-phone.png&quot;)]
		private var SplashImageLowPhone:Class;

		public function MultiDPISplashScreen()
		{
			super();
		}

		override mx_internal function getImageClass(dpi:Number, aspectRatio:String):Class
		{
			var min:int = Math.min(Capabilities.screenResolutionX, Capabilities.screenResolutionY);

			if (min &gt; 960)
				return SplashImageTablet;
			else if (min &gt; 320)
				return SplashImageHighPhone;
			else
				return SplashImageLowPhone;
		}
	}
}
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F09%2F25%2Fflex-splash-screen-sizes-easy-approach%2F&amp;title=A%20super%20simple%20approach%20to%20Splash%20Screens%20for%20Flex%20Mobile%20Apps" id="wpa2a_30"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/09/25/flex-splash-screen-sizes-easy-approach/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>VShieldUpdate process spiking CPU after Mac OS X Lion upgrade &#8211; FIX</title>
		<link>http://gregsramblings.com/2011/09/20/vshieldupdate-cpu-lion-macosx/</link>
		<comments>http://gregsramblings.com/2011/09/20/vshieldupdate-cpu-lion-macosx/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 21:39:39 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[Mac OS X Tricks]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[VMWare]]></category>
		<category><![CDATA[vshieldupdate]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3137</guid>
		<description><![CDATA[I&#8217;m writing this article because it took me longer than expected to find an answer to this fairly simple problem.  Hopefully this post will save you some time. Problem: After updating to OS X Lion, I noticed that the fans were spinning constantly and my battery was being quickly drained.  A quick look at the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m writing this article because it took me longer than expected to find an answer to this fairly simple problem.  Hopefully this post will save you some time.</p>
<p><strong>Problem</strong>: After updating to OS X Lion, I noticed that the fans were spinning constantly and my battery was being quickly drained.  A quick look at the activity monitor showed a process called VShieldUpdate.</p>
<p>VShieldUpdate is a virus scanning app that is part of VMWare Fusion.  For some reason, the updater for this app gets hung after updating to Lion.</p>
<p><strong>Solution</strong>:  Uninstall it with the following commands (from Terminal):</p>
<div class="woo-sc-box note   " style="padding-left:15px;background-image:none;">
cd /usr/local/vscanx<br />
./VirusScan\ Uninstall.command<br />
</div>
<p>After a couple of seconds, life returns to normal.  My VMWare images might be missing some virus protection, but for me, that&#8217;s not a problem.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F09%2F20%2Fvshieldupdate-cpu-lion-macosx%2F&amp;title=VShieldUpdate%20process%20spiking%20CPU%20after%20Mac%20OS%20X%20Lion%20upgrade%20%E2%80%93%20FIX" id="wpa2a_32"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/09/20/vshieldupdate-cpu-lion-macosx/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>My Adobe MAX session &#8211; Migration to the Cloud &#8211; How Do I Get There?</title>
		<link>http://gregsramblings.com/2011/09/20/my-adobe-max-session-migration-to-the-cloud-how-do-i-get-there/</link>
		<comments>http://gregsramblings.com/2011/09/20/my-adobe-max-session-migration-to-the-cloud-how-do-i-get-there/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 19:14:40 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[Adobe MAX 2011]]></category>
		<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[Amazon CloudFront]]></category>
		<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Adobe MAX]]></category>
		<category><![CDATA[amazon ec2]]></category>
		<category><![CDATA[amazon s3]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[cloudfoundary]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[max 2011]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[salesforce.com]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3123</guid>
		<description><![CDATA[During the past year, I&#8217;ve learned a lot about various cloud computing offerings including Amazon EC2 / S3 / CloudFront / Beanstalk / RDS / etc., Rackspace Cloud, Salesforce.com, Cloud Foundry, Heroku, and of course, the growing number of Adobe cloud-related offerings.  I&#8217;ve also learned that &#8220;cloud&#8221; is probably the most overused word I&#8217;ve come [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 410px"><img class=" " src="http://gallery.tigeraerial.com/Photography/Looking-out-the-airplane/DSCF0664/147004441_QDFbC-S.jpg" alt="" width="400" height="300" /><p class="wp-caption-text">I had WiFi on this flight... Cloud Computing? <img src='http://gregsramblings.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p></div>
<p>During the past year, I&#8217;ve learned a lot about various cloud computing offerings including Amazon EC2 / S3 / CloudFront / Beanstalk / RDS / etc., Rackspace Cloud, Salesforce.com, Cloud Foundry, Heroku, and of course, the growing number of Adobe cloud-related offerings.  I&#8217;ve also learned that &#8220;cloud&#8221; is probably the most overused word I&#8217;ve come across in 20+ years in technology!  I&#8217;ve put together a crash course MAX session to introduce people to what cloud computing is really all about.  My goal is to use only a few slides and spend most of the session doing some real demos that really show off what&#8217;s cool in cloud computing.   It&#8217;ll be action packed, so come check it out!  The information is below:</p>
<p><strong>When: Wednesday, October 5, 11:00 a.m. &#8211; 12:00 p.m, I&#8217;m doing the following session at Adobe MAX 2011</strong></p>
<p><a href="https://max.adobe.com/schedule/by-session/session/S4660" target="_blank"><strong>Migration to the Cloud: How Do I Get There?</strong></a></p>
<p>Cut through the hype and see what cloud computing is really all about. Take a tour of cloud infrastructure-as-a-service (IaaS) and platform-as-a-service (PaaS) solutions. Watch a live deployment of a server infrastructure that supports a new mobile app built with Adobe Flex. Learn how to create a new virtual server, configure it, and bring it online—all in a few minutes. Then see how the infrastructure is horizontally scaled to support 1,000,000+ users. During the demonstration, you&#8217;ll learn about reliability, redundancy, disaster recovery, geographic distribution, and other important considerations for migrating to the cloud.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F09%2F20%2Fmy-adobe-max-session-migration-to-the-cloud-how-do-i-get-there%2F&amp;title=My%20Adobe%20MAX%20session%20%E2%80%93%20Migration%20to%20the%20Cloud%20%E2%80%93%20How%20Do%20I%20Get%20There%3F" id="wpa2a_34"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/09/20/my-adobe-max-session-migration-to-the-cloud-how-do-i-get-there/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Finding the current location in your mobile app using Geolocation</title>
		<link>http://gregsramblings.com/2011/09/08/finding-the-current-location-in-your-mobile-app-using-geolocation/</link>
		<comments>http://gregsramblings.com/2011/09/08/finding-the-current-location-in-your-mobile-app-using-geolocation/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 18:25:14 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Flex on Mobile]]></category>
		<category><![CDATA[iOS/iPhone/iPad]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex.org]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[here i am]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3094</guid>
		<description><![CDATA[Yesterday, I blogged about Geolocation. I thought it would be helpful to show some code that determines the current location in your app. CODE:]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I <a href="http://gregsramblings.com/2011/09/08/geolocation-tips-quirks-bugs-flash-actionscript/">blogged</a> about Geolocation. I thought it would be helpful to show some code that determines the current location in your app.</p>
<div class="woo-sc-box info   " style="padding-left:15px;background-image:none;">
<p>Notes:</p>
<ul>
<li>The first location event is thrown away because as noted in <a title="Geolocation tips, quirks, and possible bugs (flash.sensors.Geolocation)" href="http://gregsramblings.com/2011/09/08/geolocation-tips-quirks-bugs-flash-actionscript/">yesterday&#8217;s blog post</a>, it&#8217;s not the current location. It&#8217;s the last known location (cached location).</li>
<li>The code below will keep trying to improve the location until it gets an accuracy of 150 meters or better, or, until it times out (30-second timeout).</li>
<li>Once the 30-second timeout occurs, it will report the last location event (if available).</li>
</ul>
</div>
<p><strong>CODE:</strong></p>
<pre class="brush: as3; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
			   xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
			   applicationComplete=&quot;init()&quot;&gt;

	&lt;fx:Script&gt;
		&lt;![CDATA[
			import flash.sensors.Geolocation;

			protected var geo:Geolocation;
			protected var geoLastEvent:GeolocationEvent;
			protected var geoCheckCount:int;
			protected var geoTimer:Timer;

			protected function init():void
			{
				log.text = &quot;App Starting\n&quot;;
				if(Geolocation.isSupported)
				{
					geoCheckCount = 0;
					geo = new Geolocation();
					geo.setRequestedUpdateInterval(500); 		// suggest a very frequent update of 500ms
					geo.addEventListener(GeolocationEvent.UPDATE, onUpdate);

					// Create a timer
					geoTimer = new Timer(30000,1);
					geoTimer.addEventListener(TimerEvent.TIMER_COMPLETE,onTimeout);
					geoTimer.start();
				} else {
					log.appendText(&quot;GPS not supported on this device\n&quot;);
				}
			}

			protected function onUpdate(event:GeolocationEvent):void
			{
				++geoCheckCount;
				if(geoCheckCount &lt;= 1) return; // Throw away the first location event because it's almost always the last known location, not current location
				geoLastEvent = event;

				if(event.horizontalAccuracy &lt;= 150)
				{
					geoTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,onTimeout);
					geoTimer.stop();
					log.appendText(&quot;LOCATION: &quot; + event.latitude + &quot; / &quot; + event.longitude + &quot; - &quot; + event.horizontalAccuracy + &quot;\n&quot;);
					geo.removeEventListener(GeolocationEvent.UPDATE, onUpdate);
					geo = null;
				}
			}

			protected function onTimeout(event:TimerEvent):void
			{
				geoTimer.removeEventListener(TimerEvent.TIMER_COMPLETE,onTimeout);
				geoTimer.stop();
				geoTimer = null;
				if(geoLastEvent != null)
				{
					log.appendText(&quot;Timed out - best location is: &quot; + geoLastEvent.latitude + &quot; / &quot; + geoLastEvent.longitude + &quot; - &quot; + geoLastEvent.horizontalAccuracy + &quot;\n&quot;);
				} else {
					log.appendText(&quot;Unable to determine location before timeout\n&quot;);
				}
				geo.removeEventListener(GeolocationEvent.UPDATE, onUpdate);
				geo = null;
			}

		]]&gt;

	&lt;/fx:Script&gt;
	&lt;s:TextArea id=&quot;log&quot; width=&quot;100%&quot; height=&quot;100%&quot;/&gt;
&lt;/s:Application&gt;
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F09%2F08%2Ffinding-the-current-location-in-your-mobile-app-using-geolocation%2F&amp;title=Finding%20the%20current%20location%20in%20your%20mobile%20app%20using%20Geolocation" id="wpa2a_36"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/09/08/finding-the-current-location-in-your-mobile-app-using-geolocation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Geolocation tips, quirks, and possible bugs (flash.sensors.Geolocation)</title>
		<link>http://gregsramblings.com/2011/09/08/geolocation-tips-quirks-bugs-flash-actionscript/</link>
		<comments>http://gregsramblings.com/2011/09/08/geolocation-tips-quirks-bugs-flash-actionscript/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 04:27:38 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Flex on Mobile]]></category>
		<category><![CDATA[iOS/iPhone/iPad]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash.sensors.geolocation]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex.org]]></category>
		<category><![CDATA[geolocation]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3063</guid>
		<description><![CDATA[ I&#8217;ve been working on a couple of apps recently that use the Geolocation APIs. I&#8217;ve discovered a few tips and quirks that I felt were worthy of sharing. Geolocation object There are two classes that you need in order to implement location in your app &#8211; Geolocation and GeolocationEvent. When you create a Geolocation object, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-3082" style="margin-left: 5px; margin-right: 5px;" title="748px-GPS_Satellite_NASA_art-iif" src="http://gregsramblings.com/wp-content/uploads/2011/09/748px-GPS_Satellite_NASA_art-iif-300x240.jpg" alt="" width="300" height="240" /> I&#8217;ve been working on a couple of apps recently that use the Geolocation APIs. I&#8217;ve discovered a few tips and quirks that I felt were worthy of sharing.</p>
<h4>Geolocation object</h4>
<p>There are two classes that you need in order to implement location in your app &#8211; <strong><a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/sensors/Geolocation.html" target="_blank">Geolocation</a></strong> and <strong><a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/GeolocationEvent.html" target="_blank">GeolocationEvent</a></strong>. When you create a Geolocation object, it turns on the GPS sensors on the device and provides you with a couple of important properties: <em>isSupported</em> and <em>muted</em>.  The <em>isSupported</em> property is used to determine if the device has location support. If you run this on your desktop computer or on a Barnes and Noble Nook, this property will be false because no location capability exists on the device. The <em>muted</em> property is slightly different. This property indicates whether the user has turned off location support for the device or denied permission for the app itself.</p>
<p><strong>iOS muted BUG</strong>: There is a known bug with the <em>muted</em> property on iOS devices with the SDK that ships with Flash Builder 4.5.1. On iOS, the Geolocation muted property is always true, so it should be ignored in the current version. This is already fixed in the next release.</p>
<p>There is one method to be aware of on Geolocation &#8212; <em>setRequestedUpdateInterval()</em> &#8212; it&#8217;s used to request a more (or less) frequent location update event. In other words, you are telling the Geolocation object to check for location changes more (or less) often. However, it&#8217;s important to note that the OS may choose a different interval to conserve battery power. The name of the method should actually be <em>setRequestedUpdateIntervalPLEASE()</em> because you are only requesting the interval, not commanding it. <img src='http://gregsramblings.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h4>GeolocationEvent object</h4>
<p>After adding an event listener to the Geolocation object to receive location change events, you will start receiving location events in your event listener. The event contains the latitude, longitude, accuracy, speed, altitude, and heading. Here&#8217;s some important facts about location events:</p>
<ul>
<li><strong>The first location event received is usually NOT the current location</strong>. It is often the &#8220;last known location&#8221; or the cached location. Your app will get this first event almost immediately, but remember, it might be an out of date location along with the associated out of date accuracy. For example, I created a simple test app that logged my location. I ran it from home and let it run for a few seconds until I was getting good accuracy of about 10 meters. I shutdown the app and drove 10 miles away and ran it again. I immediately received a location event that was the location of my house with an accuracy of 10m! If you don&#8217;t know to expect this, your app could make a bad conclusion about the location. Also, the timestamp is no help here (contrary to popular belief). I talked to the Flex engineering team to confirm this. The documentation will be updated shortly. In my opinion, it&#8217;s a bug until documented. Once documented, it&#8217;s actually a cool feature.  One of the apps I&#8217;m working on has a &#8220;I am here&#8221; button that captures the current location and sends it to the server.  In my code, I ignore the first event.  The second location event is a real attempt to report my current location.  I&#8217;ll share the full code of this in the next blog post.  <strong>UPDATE</strong>: Docs will be fixed soon.</li>
<li><strong>verticalAccuracy is always wrong in my testing (Android)</strong> &#8212; There are two properties related to location accuracy &#8211; <em>horizontalAccuracy</em> and <em>verticalAccuracy</em>. The horizontalAccuracy is exactly what you think it is. However, in all of my testing across multiple devices, the verticalAccuracy is <em>always</em> identical to the horizontalAccuracy, which is practically impossible. I won&#8217;t go into details because it would quadruple the size of this article, but some simple web searches will confirm what I&#8217;m saying. Vertical accuracy is usually 2 to 3 times less accurate than horizontal accuracy of any GPS device (unless it uses WAAS or another augmentation system, which no Android or iOS devices supports yet). Therefore, verticalAccuracy should be ignored because it&#8217;s simply not correct. I&#8217;ve yet to figure out if this is a bug with the flash.sensors.Geolocation class or a limitation of the underlying OS. I&#8217;ve looked through the Android SDK documentation and can&#8217;t find a vertical accuracy property anywhere. If anyone can clarify, please add a comment below. If it is indeed not being reported by the underlying OS, I think it is a bug in flash.sensors.Geolocation because the expected behavior is to report either a NaN or some other obvious invalid value rather than a value that is wrong and misleading.  <strong>UPDATE</strong>: On Android, the underlying OS returns &#8220;radialAccuracy&#8221; and both horizontalAccuracy and verticalAccuracy are being set to that single value.  This is a bug that will be addressed.  Android does not return a vertical accuracy so the value should be set to either NaN or a negative number.  On iOS, the vertical accuracy is set correctly to the vertical accuracy reported by the underlying OS.</li>
<li><strong>heading is always NaN in my testing (Android)</strong> &#8212; I&#8217;ve yet to test on a device where I get a value for heading. You could write some code to calculate it based on the location history/track, but the property itself is always NaN. I highly suspect that this is a device limitation, not a bug. If anyone has seen a value for heading, let me know in the comments.  <strong>UPDATE</strong>: On iOS, I get heading information.</li>
<li><strong>Two different types of determining location and a possible bug</strong> &#8212; Most modern mobile devices have two different means of determining  location &#8211; WiFi/Cell-ID (coarse location) and GPS (fine location). GPS is much more accurate.  I have discovered what I think is a bug with how the two types of locations are used (I&#8217;m working with engineering to confirm) &#8212; If the GPS is enabled on your device, you will not receive any WiFi/Cell-ID-based location events, so if you are out of range of GPS satellites (e.g. in the basement), you will get no location events at all (other than the initial last-known-location as mentioned above). The expected behavior (IMO) is to receive WiFi/Cell-ID-based location events until the GPS signal is acquired.  You can see this behavior in the Google Maps app.  When you first run Google Maps, it will show your location almost instantly but it will have a wide circle of accuracy.  This is the WiFi/Cell-ID-based location.  Once the GPS signal is locked in, the circle shrinks to only a few meters.  However, I am unable to recreate this functionality using the flash.sensors.Geolocation class. Oddly, if you disable the GPS on your device, you <em>will</em> then receive WiFi-Cell-ID-based location events as expected.  This feels like a bug to me and I suspect that the code uses either WiFi/Cell-ID <em>or</em> GPS and is not sophisticated enough to use both as I just described.</li>
<li><strong>Location permissions</strong> &#8211;  On Android, there are two relevant permissions related to location &#8211;  <em>android.permission.ACCESS_FINE_LOCATION</em> and <em>android.permission.ACCESS_COARSE_LOCATION</em>.  I have confirmed that setting the <em>android.permission.ACCESS_FINE_LOCATION</em> includes the COARSE permission. In other words, you do not have to specify both permissions because FINE includes COARSE. This is confirmed at <a href="http://developer.android.com/guide/topics/location/obtaining-user-location.html" target="_blank">http://developer.android.com/guide/topics/location/obtaining-user-location.html</a>.</li>
</ul>
<p>Hopefully this clears up some confusion on Geolocation.  It&#8217;s hard to test this stuff, so if you find any evidence of my conclusions being wrong, please don&#8217;t hesitate to let me know in the comments.</p>
<p>Writing location-based apps is incredibly fun and really creates some interesting app opportunities.  In my next post, I&#8217;ll share some code for a typical &#8220;Here I am&#8221; app that handles the last-known-location event and implements a simple timeout.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F09%2F08%2Fgeolocation-tips-quirks-bugs-flash-actionscript%2F&amp;title=Geolocation%20tips%2C%20quirks%2C%20and%20possible%20bugs%20%28flash.sensors.Geolocation%29" id="wpa2a_38"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/09/08/geolocation-tips-quirks-bugs-flash-actionscript/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Flex versus ActionScript &#8211; the debate gets new life</title>
		<link>http://gregsramblings.com/2011/09/06/flex-vs-actionscript-the-debate-gets-new-life/</link>
		<comments>http://gregsramblings.com/2011/09/06/flex-vs-actionscript-the-debate-gets-new-life/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 20:08:45 +0000</pubDate>
		<dc:creator>Greg Wilson</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Flex on Mobile]]></category>
		<category><![CDATA[iOS/iPhone/iPad]]></category>
		<category><![CDATA[actionscript vs flex]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex.org]]></category>

		<guid isPermaLink="false">http://gregsramblings.com/?p=3028</guid>
		<description><![CDATA[A few days ago, a reader commented on my blog post, &#8220;The Flex Team discusses the future of Flex&#8221; and brought up the frequent debate of Flex versus ActionScript. This subject has been debated many times since Flex was born, but lately it is becoming a hot topic again, especially with developers shifting their focus [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-3051 alignright" title="buildingblocks" src="http://gregsramblings.com/wp-content/uploads/2011/09/buildingblocks-287x300.jpg" alt="" width="287" height="300" />A few days ago, a reader commented on my blog post, &#8220;<a href="http://gregsramblings.com/2011/08/25/the-flex-team-discusses-the-future-of-flex/" target="_blank">The Flex Team discusses the future of Flex</a>&#8221; and brought up the frequent debate of <em>Flex versus ActionScript</em>. This subject has been debated many times since Flex was born, but lately it is becoming a hot topic again, especially with developers shifting their focus to mobile apps.</p>
<p>Developers need to know enough to use the right tool for the job at hand&#8211;and that holds true for any technology, not just Flex. Yes, some developers are using Flex for things that Flex should not be used for (this has always been the case). Flex is a framework that gives us components, a declarative language (MXML), a sophisticated event model, data binding, view management and many other useful, time-saving features. When you compile a Flex app, everything is converted to pure ActionScript as step one of the build process. Is this generated ActionScript optimized for every possible use case? Of course not. The Flex product managers and engineers put a lot of effort into prioritizing where to invest engineering time based on a wide array of use cases, but they obviously can&#8217;t optimize for every possible scenario. On the other hand, a ton of engineering hours have been invested in optimizing the Flex framework, and you should take advantage of this where possible rather than investing your own time in building custom ActionScript. It simply depends on your requirements.</p>
<p>So, when considering whether to build an app with the Flex framework or to build it in pure ActionScript, you are really making a decision between using prewritten/generated ActionScript that was created for a multitude of use cases or to write your own ActionScript that is specific to your specific use case. Of course, the latter is sometimes going to perform better because your code will be exactly what you need it to be, but it&#8217;s usually going to take you much longer to write your app.</p>
<p>You can take the quest for performance to the extreme. If you want the absolute best performance possible, write your app in machine code that targets a specific device and create a different version for each processor that your app will run on. The performance will be insane because every instruction will be specific to your app, but the development effort will take years! I realize that this is a crazy comparison, but again, we developers have to make some intelligent decisions when deciding what to use. Frameworks like Flex save us time, but they do have some costs in terms of performance. By the way, the same holds true for JavaScript. I recently wrote an application that utilized a lot of jQuery. jQuery saved me a TON of time, and thankfully in my app, the performance was adequate without me having to replace any of the jQuery functions with my own JavaScript. (If you search around, you&#8217;ll find people having the same debate on when to use jQuery versus straight JavaScript though).</p>
<p><a href="http://gregsramblings.com/wp-content/uploads/2011/09/FlashBuilderNewProjectDialog.png"><img class="alignright size-medium wp-image-3053" title="FlashBuilderNewProjectDialog" src="http://gregsramblings.com/wp-content/uploads/2011/09/FlashBuilderNewProjectDialog-172x300.png" alt="" width="172" height="300" /></a>We are seeing new life in the Flex versus ActionScript debate because of the recently released 4.5.x version of Flash Builder, which supports building Flex apps that target iOS, Android, and BlackBerry Tablet OS. All of us who have been building mobile apps are having to think about performance a lot more than usual because these devices have dramatically fewer resources than the modern desktop/laptop computers that we&#8217;ve been spoiled by. Suddenly we are worrying about every optimization and every byte of memory just like &#8220;back in the good ol&#8217; days&#8221;. When performance is an issue, the choice to use a framework that trades performance for a shortened development process is not to be taken lightly, so the cost versus benefit analysis is key. However, it&#8217;s not an all or nothing proposition&#8230;</p>
<p>The guys at <a href="http://hdinteractive.com" target="_blank">HD Interactive</a> have written some great games that are in the Apple app store, Android Market, B&amp;N Nook store, and other markets. The games include Kung Fu Battle Slots, Pyramix, MrMixit, Neptune, and more (their home page has all of the links so you can check them out). I have been super impressed by their app performance, so I sat down with them and looked at how they do it. The apps are indeed Flex apps and they take advantage of Flex views, the component model, and the event model. However, many of the animations, transitions, and effects were written in pure ActionScript that is specific for the game because they needed the best performance possible for the specific use case. For example, some of the effects and transitions in Flex are great for most apps, but they were not fast enough to handle the types of animations and the rich graphics that HD&#8217;s games demanded, so they made the smart decision to invest some extra time writing <a href="http://www.taterboy.com/blog/2011/02/movethis-another-as3-tweening-animation-engine/" target="_blank">their own animation code</a>. They even go to Flash Pro to build some of the animations because the tooling made more sense for a couple of specific items. They are masters at using the right tool for the job at hand. They utilize Flex where it saves them time, and they write specific ActionScript as needed.</p>
<p>Most of the apps I&#8217;m involved in are data-driven business apps, which are very well suited for Flex. Flex saves me a huge amount of time because the framework provides a lot of the building blocks that these apps typically require. For these apps, the decision to use Flex is a no-brainer. This is usually the case for enterprise apps. However, for other apps, the decision may not be as clear. Like many decisions we developers make, the answer is &#8220;IT DEPENDS&#8221;. <img src='http://gregsramblings.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgregsramblings.com%2F2011%2F09%2F06%2Fflex-vs-actionscript-the-debate-gets-new-life%2F&amp;title=Flex%20versus%20ActionScript%20%E2%80%93%20the%20debate%20gets%20new%20life" id="wpa2a_40"><img src="http://gregsramblings.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://gregsramblings.com/2011/09/06/flex-vs-actionscript-the-debate-gets-new-life/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

