<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Joe Lambert</title>
	
	<link>http://blog.joelambert.co.uk</link>
	<description />
	<lastBuildDate>Fri, 24 Feb 2012 07:39:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/joelambert" /><feedburner:info uri="joelambert" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Taking the plunge</title>
		<link>http://feedproxy.google.com/~r/joelambert/~3/irJSGXuqFWk/</link>
		<comments>http://blog.joelambert.co.uk/2012/02/24/taking-the-plunge/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 07:33:19 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.joelambert.co.uk/?p=1084</guid>
		<description><![CDATA[As of today I am no longer in full time employment! After a number of years of working for others I&#8217;ve decided its time to take a risk and go it alone. Well almost alone, I&#8217;ll be joining forces with a good friend Steve Cross (aka @artfulbadger) in the form of Rareloop, our recently incorporated [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.joelambert.co.uk/wp-content/uploads/2011/12/rareloop_logo.png" alt="Rareloop Logo" /></p>

<p>As of today I am no longer in full time employment! After a number of years of working for others I&#8217;ve decided its time to take a risk and go it alone. Well almost alone, I&#8217;ll be joining forces with a good friend <a href="http://theartfulbadger.co.uk">Steve Cross</a> (aka <a href="http://twitter.com/artfulbadger">@artfulbadger</a>) in the form of <a href="http://rareloop.com">Rareloop</a>, our recently incorporated company.</p>

<p>As a company, <a href="http://rareloop.com">Rareloop</a> will be primary focused on mobile and web development. We&#8217;ve a wealth of experience in this area including website development, HTML5 web apps, cross platform PhoneGap development etc. If you have a project you&#8217;d like to work with us on please don&#8217;t hesitate to <a href="http://www.rareloop.com/about">get in contact</a>!</p>

<p>We&#8217;ve also been working on a number of products in our spare time &amp; intend to further develop these now that we&#8217;re able to give them our focus. Most notably we&#8217;ve been building an incredibly powerful surveying app for tablet devices thats able to handle everything from simple customer feedback forms up to vastly complex research initiatives (some case studies are available <a href="http://rareloop.com/casestudies">on the website</a>).</p>

<p>I&#8217;m also hoping that the change will free up some time so that I can play with even more open source projects/experiments &amp; work on my existing bits such as <a href="http://www.joelambert.co.uk/flux">Flux</a> &amp; <a href="http://www.joelambert.co.uk/morf">Morf</a>.</p>

<p>2012 is going to be an exciting year!</p>
<img src="http://feeds.feedburner.com/~r/joelambert/~4/irJSGXuqFWk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.joelambert.co.uk/2012/02/24/taking-the-plunge/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.joelambert.co.uk/2012/02/24/taking-the-plunge/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=taking-the-plunge</feedburner:origLink></item>
		<item>
		<title>A simple design pattern for feature detection with non-dependant Modernizr support</title>
		<link>http://feedproxy.google.com/~r/joelambert/~3/_n2PxcjGtYs/</link>
		<comments>http://blog.joelambert.co.uk/2012/02/22/a-simple-design-pattern-for-feature-detection-with-non-dependant-modernizr-support/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 09:12:10 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.joelambert.co.uk/?p=1078</guid>
		<description><![CDATA[Modernizr is the gold standard for client side feature detection and is widely used but what if you&#8217;re writing a JavaScript library and want to minimise the dependencies? Here&#8217;s a simple design pattern for feature detection with non-dependant Modernizr support. In v1.3 of Flux Slider I added support for Modernizr, prior to this Flux just [...]]]></description>
			<content:encoded><![CDATA[<p>Modernizr is the gold standard for client side feature detection and is widely used but what if you&#8217;re writing a JavaScript library and want to minimise the dependencies? Here&#8217;s a simple design pattern for feature detection with non-dependant Modernizr support.</p>

<p><span id="more-1078"></span></p>

<p>In v1.3 of <a href="http://www.joelambert.co.uk/flux">Flux Slider</a> I added support for <a href="http://modernizr.com">Modernizr</a>, prior to this Flux just used some simple test I&#8217;d written to detect features. I wanted to make use of the advanced feature detection when the library was available but to also not require others to use Modernizr in order to use Flux.</p>

<p>To implement non-dependant support I modified my feature test code to first check for Modernizr, use it where possible but fallback to my own tests where not.</p>

<p>The coding required is pretty trivial but I think its a useful design pattern to adopt.</p>

<h1>Example</h1>

<pre><code>myApp.browser = {
    supportsTransitions: false,
    supports3d: false
};

// Detect required browser features
(function() {
    // Check for CSS Transition support
    if(window.Modernizr &amp;&amp; Modernizr.csstransitions !== undefined) {
        myApp.browser.supportsTransitions = Modernizr.csstransitions;
    }
    else {
        // Custom detect code
    }

    // Check for 3D CSS support
    if(window.Modernizr &amp;&amp; Modernizr.csstransforms3d !== undefined) {
        myApp.browser.supports3d = Modernizr.csstransforms3d;
    }
    else {
        // Custom detect code
    }
});
</code></pre>

<p>If you want to see how Flux implements this take a look at <a href="https://github.com/joelambert/Flux-Slider/blob/master/js/src/flux.browser.js">flux.browser.js</a> on GitHub.</p>

<h1>Whats the benefit?</h1>

<p>Modernizr is an established open source library, trusted by some of the nets largest sites. Its sole purpose is to accurately detect features across a range of browsers and to keep up with new versions (and possible new quirks!) as they are released.</p>

<p>Whilst I&#8217;m happy to write some simple tests to check for the features that Flux requires, I&#8217;m never going to be able to replicate the time and research that has gone into Modernizr.</p>

<p>Essentially, feature detection for Flux will be adequate without Modernizr but will be even more accurate and cover more edge cases with it! A case in point is the recent release of Firefox10 which added support for 3D transforms. My detection code failed to recognise this but anyone using Flux with Modernizr would have had access to its 3D effects on release day without having to wait for me to update my code.</p>
<img src="http://feeds.feedburner.com/~r/joelambert/~4/_n2PxcjGtYs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.joelambert.co.uk/2012/02/22/a-simple-design-pattern-for-feature-detection-with-non-dependant-modernizr-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.joelambert.co.uk/2012/02/22/a-simple-design-pattern-for-feature-detection-with-non-dependant-modernizr-support/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=a-simple-design-pattern-for-feature-detection-with-non-dependant-modernizr-support</feedburner:origLink></item>
		<item>
		<title>New sales platform for Flux WordPress plugin</title>
		<link>http://feedproxy.google.com/~r/joelambert/~3/kE3HJncFDqU/</link>
		<comments>http://blog.joelambert.co.uk/2012/02/16/new-sales-platform-for-flux-wordpress-plugin/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 10:51:41 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.joelambert.co.uk/?p=1073</guid>
		<description><![CDATA[I&#8217;m pleased to announce that I&#8217;ve now moved the sales of the Flux Slider WordPress plugin to a brand new custom built system. All existing customers have been migrated and will start to reap the benefits of the new system as an when new updates to the plugin become available. The new system most importantly [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.joelambert.co.uk/wp-content/uploads/2012/02/Screen-Shot-2012-02-16-at-11.52.13.png" alt="Screenshot" /></p>

<p>I&#8217;m pleased to announce that I&#8217;ve now moved the sales of the <a href="http://www.joelambert.co.uk/flux-wp">Flux Slider WordPress plugin</a> to a brand new custom built system. All existing customers have been migrated and will start to reap the benefits of the new system as an when new updates to the plugin become available. The new system most importantly enables me to better manage delivery of updates to all existing and new customers, but also gives me more control over the whole user experience.</p>

<p>Quixly served me well when the plugin was first released but in recent months the service has been unreliable in terms of uploading updates and sending notifications to customers.</p>

<p>I&#8217;m also planning to add support for referrals to the system over the next couple of months, so if you&#8217;d be interested in joining the programme keep an eye on the blog or drop me a line on <a href="http://twitter.com/joelambert">Twitter</a>.</p>
<img src="http://feeds.feedburner.com/~r/joelambert/~4/kE3HJncFDqU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.joelambert.co.uk/2012/02/16/new-sales-platform-for-flux-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.joelambert.co.uk/2012/02/16/new-sales-platform-for-flux-wordpress-plugin/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=new-sales-platform-for-flux-wordpress-plugin</feedburner:origLink></item>
		<item>
		<title>DroidLog – A console/error log for Android PhoneGap apps</title>
		<link>http://feedproxy.google.com/~r/joelambert/~3/KRyEWoR0q7E/</link>
		<comments>http://blog.joelambert.co.uk/2012/02/14/droidlog-a-consoleerror-log-for-android-phonegap-apps/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 14:51:52 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.joelambert.co.uk/?p=1065</guid>
		<description><![CDATA[Here&#8217;s a small script that might be useful for anyone doing PhoneGap development on Android. I previously wrote about a terminal command that could be used to view just the PhoneGap output from a devices console log. DroidLog is simpler to execute &#38; also formats the output so its easier to read. Download from GitHub [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.joelambert.co.uk/wp-content/uploads/2012/02/droidlog_output.png" alt="droidlog output" /></p>

<p>Here&#8217;s a small script that might be useful for anyone doing PhoneGap development on Android. I previously wrote about a <a href="http://blog.joelambert.co.uk/2011/09/20/monitoring-console-log-on-phonegap-android/">terminal command</a> that could be used to view just the PhoneGap output from a devices console log. <a href="https://github.com/joelambert/droidlog">DroidLog</a> is simpler to execute &amp; also formats the output so its easier to read.</p>

<p><a href="https://github.com/joelambert/droidlog">Download from GitHub</a></p>

<p>I hope this is useful for others! I&#8217;ve made it available under the MIT license so feel free to use it as you need. If you find any bugs and make fixes or you make some improvements then do please send a pull requests.</p>
<img src="http://feeds.feedburner.com/~r/joelambert/~4/KRyEWoR0q7E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.joelambert.co.uk/2012/02/14/droidlog-a-consoleerror-log-for-android-phonegap-apps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.joelambert.co.uk/2012/02/14/droidlog-a-consoleerror-log-for-android-phonegap-apps/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=droidlog-a-consoleerror-log-for-android-phonegap-apps</feedburner:origLink></item>
		<item>
		<title>3D transformations with Firefox 10+</title>
		<link>http://feedproxy.google.com/~r/joelambert/~3/M2TiDtEju9k/</link>
		<comments>http://blog.joelambert.co.uk/2012/02/13/3d-transformations-with-firefox-10/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 10:07:27 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.joelambert.co.uk/?p=1052</guid>
		<description><![CDATA[Firefox 10 was released toward the end of January and added support for 3D transforms. Here are some lessons learned whilst ensuring Flux Slider worked with Firefox. There are some definite differences between the Firefox &#38; WebKit implementation of 3D transforms, I&#8217;m not familiar enough with the details of the spec to know which is [...]]]></description>
			<content:encoded><![CDATA[<p>Firefox 10 was released toward the end of January and added support for 3D transforms. Here are some lessons learned whilst ensuring Flux Slider worked with Firefox.</p>

<p>There are some definite differences between the Firefox &amp; WebKit implementation of 3D transforms, I&#8217;m not familiar enough with the details of <a href="http://www.w3.org/TR/css3-3d-transforms/">the spec</a> to know which is &#8220;correct&#8221; but I&#8217;ve outlined what I&#8217;ve found.</p>

<p><span id="more-1052"></span></p>

<h1>Perspective doesn&#8217;t propagate</h1>

<p>In a WebKit browser, when <code>perspective</code> is applied to an element the effect propagates to all child elements irrespective of depth. In Firefox it appears that the effect is only applied to the elements direct child elements.</p>

<p><a href="http://jsfiddle.net/ctJnS/8/">JSFiddle Example</a></p>

<p><strong>Update:</strong> You can work around this issue in Firefox by adding <code>-moz-transform-style: preserve-3d</code> at each depth, <a href="http://t.co/LgHImy9D">JSFiddle Example</a>. <em>Thanks to <a href="http://twitter.com/gustaff_weldon">Gustaff Weldon</a> &amp; <a href="http://twitter.com/bartaz">Bartek Szopka</a> for the fix.</em></p>

<h1>Perspective origin doesn&#8217;t work the same</h1>

<blockquote>
  <p>The <code>perspective-origin</code> CSS property determines the position the viewer is looking at. It is used as the vanishing point (<em>abscissa</em>) by the perspective property. (<a href="https://developer.mozilla.org/en/CSS/perspective-origin">MDN</a>)</p>
</blockquote>

<p>I use this property in the <code>bars3D</code> transition in Flux and the desired effect is that all the &#8220;slices&#8221; created, and subsequently rotated, have a common vanishing point.</p>

<p>In WebKit if you apply <code>perspective</code> and <code>perspective-origin</code> on an element then all child elements calculate the vanishing point based on the vanishing point for that element.</p>

<p>In Firefox however the <code>perspective-origin</code> property seems to be inherited by child elements and the value calculated for each element. For example if <code>perspective-origin</code> property is set to <code>50% 50%</code> then instead of the vanishing point for each child being the parents centre, they become the centre of each element.</p>

<p><a href="http://jsfiddle.net/4zDP6/7/">JSFiddle Example</a></p>

<h1>Don&#8217;t mix z-index with 3D transforms</h1>

<p>When Chrome added support for 3D transforms it was sometimes needed to add <code>z-index</code> values to help it correctly stack layers in 3D space. Firefox however appears to behave quite erratically when you mix 3D transforms with <code>z-index</code>.</p>

<p>The most repeatable example is that <code>backface-visibilty</code> appears to be ignored when <code>z-index</code> is applied.</p>

<p><a href="http://jsfiddle.net/KWxZF/6/">JSFiddle Example</a></p>

<h1>Detecting 3D transform support</h1>

<p>The Media Query technique Modernizr uses to detect 3D transform support in WebKit doesn&#8217;t work in Firefox. Instead you can just check for the existance of the <code>MozPerspective</code> CSS property:</p>

<pre><code>'MozPerspective' in document.body.style
</code></pre>

<p><strong>Update</strong>: To prevent confusion, Modernizr correctly identifies 3D transform support for Firefox 10 by using a combination of the two techniques above <em>(apologies if it sounded like I was suggesting otherwise)</em>. If like me you need to support a library that isn&#8217;t dependant on Modernizr then you&#8217;ll need to add the <code>perspective</code> check to your detection code. <a href="https://github.com/joelambert/Flux-Slider/blob/master/js/src/flux.browser.js#L31">Here is the code Flux uses</a>.</p>

<h1>Still no matrix object</h1>

<p>There is still no <code>MozCSSMatrix</code> object to replicate the functionality of the <code>WebKitCSSMatrix</code> object. This means that there are a still a lot of cool things you can do with JavaScript &amp; transforms in WebKit that you can&#8217;t in Firefox (e.g. <a href="http://joelambert.co.uk/morf">Morf.js</a>);</p>
<img src="http://feeds.feedburner.com/~r/joelambert/~4/M2TiDtEju9k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.joelambert.co.uk/2012/02/13/3d-transformations-with-firefox-10/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.joelambert.co.uk/2012/02/13/3d-transformations-with-firefox-10/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=3d-transformations-with-firefox-10</feedburner:origLink></item>
		<item>
		<title>Flux Slider v1.4.3 Released</title>
		<link>http://feedproxy.google.com/~r/joelambert/~3/U2rl8RKnxP8/</link>
		<comments>http://blog.joelambert.co.uk/2012/02/13/flux-slider-v1-4-3-released/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 10:02:08 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.joelambert.co.uk/?p=1048</guid>
		<description><![CDATA[Version 1.4.3 of the Flux Slider JavaScript library is now available. This release add&#8217;s support for FireFox 10&#8242;s new implementation of 3D transforms1. View Transition Gallery &#124; Download @ GitHub Change Log (v1.4.3) Fixed feature detect code for Firefox 10+. 3D transitions now mostly work with Firefox 10+. Reverted to setInterval for play loop better [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.joelambert.co.uk/wp-content/uploads/2012/02/flux_slider_v143.png" alt="Flux Slider v1.4.3" /></p>

<p>Version 1.4.3 of the Flux Slider JavaScript library is now available. This release add&#8217;s support for FireFox 10&#8242;s new implementation of 3D transforms<sup><a href="http://blog.joelambert.co.uk/2012/02/13/flux-slider-v1-4-3-released/#footnote_0_1048" id="identifier_0_1048" class="footnote-link footnote-identifier-link" title="There are a couple of peculiarities with the FireFox implementation which I&amp;#8217;ve discussed in this post">1</a></sup>.</p>

<p><a href="http://www.joelambert.co.uk/flux/transgallery.html">View Transition Gallery</a> | <a href="http://github.com/joelambert/Flux-Slider">Download @ GitHub</a></p>

<h1>Change Log (v1.4.3)</h1>

<ul>
<li>Fixed feature detect code for Firefox 10+.</li>
<li>3D transitions now <em>mostly</em> work with Firefox 10+.</li>
<li>Reverted to setInterval for play loop better timing.</li>
<li>Fixed a few syntax issues with JSLint.</li>
<li>Fixed a bug with the jQuery Widget that prevented <code>isPlaying</code> from working.</li>
<li>Added <code>getImages</code> function to the jQuery Widget.</li>
</ul>
<ol class="footnotes"><li id="footnote_0_1048" class="footnote">There are a couple of peculiarities with the FireFox implementation which I&#8217;ve discussed in <a href="http://blog.joelambert.co.uk/2012/02/13/3d-transformations-with-firefox-10/">this post</a></li></ol><img src="http://feeds.feedburner.com/~r/joelambert/~4/U2rl8RKnxP8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.joelambert.co.uk/2012/02/13/flux-slider-v1-4-3-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.joelambert.co.uk/2012/02/13/flux-slider-v1-4-3-released/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=flux-slider-v1-4-3-released</feedburner:origLink></item>
		<item>
		<title>Getting started with PhoneGap on BlackBerry PlayBook</title>
		<link>http://feedproxy.google.com/~r/joelambert/~3/JhvKmfy_e5A/</link>
		<comments>http://blog.joelambert.co.uk/2012/02/07/getting-started-with-phonegap-on-blackberry-playbook/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 15:56:28 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.joelambert.co.uk/?p=1035</guid>
		<description><![CDATA[PhoneGap is a great tool for creating cross platform mobile apps. Whilst the documentation for deploying to iOS and Android is really thorough, I&#8217;ve found the BlackBerry PlayBook guide, especially when using a Mac, to be quite sparse. Here are the steps I took to setup a development environment for both the simulator and an [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.joelambert.co.uk/wp-content/uploads/2012/02/playbook_screenshot.png" alt="Playbook Screenshot" /></p>

<p>PhoneGap is a great tool for creating cross platform mobile apps. Whilst the documentation for deploying to iOS and Android is really thorough, I&#8217;ve found the BlackBerry PlayBook guide, especially when using a Mac, to be quite sparse.</p>

<p>Here are the steps I took to setup a development environment for both the simulator and an actual device.<span id="more-1035"></span>#Prerequisites</p>

<p>Before you get started you need to download the following:</p>

<ul>
<li><a href="https://bdsc.webapps.blackberry.com/html5/download/sdk">BlackBerry WebWorks for Tablet OS</a> <em>(this also meant installing the Adobe AIR SDK for me too)</em></li>
<li><a href="http://phonegap.com/download">Latest PhoneGap release</a></li>
</ul>

<p><strong>Note:</strong> When asked where to install the WebWorks SDK I chose <code>/Developer/PlayBookSDK</code>. You will need this path later so if you install somewhere different then make a note of it.</p>

<h1>Build &amp; run PhoneGap HelloWorld</h1>

<p>Once the WebWorks SDK is installed and PhoneGap has been downloaded, you will need to:</p>

<h2>Copy the sample application</h2>

<p>Copy the folder <code>lib/blackberry</code> from the PhoneGap release to a new location</p>

<pre><code>$ cp -ap ./lib/blackberry /Developer/Apps/PlayBook/helloworld
</code></pre>

<p>Then change your working directory to the <code>sample</code> folder</p>

<pre><code>$ cd ./sample
</code></pre>

<h2>Update the properties file</h2>

<p>Various parameters need to be set within the <code>project.properties</code> file, to enable building and deployment of WebWorks apps. Firstly you need to provide the location of the BlackBerry WebWorks Packager (aka <code>bbwp</code>). Its important that you use the directory to which you installed the SDK, not the path to the <code>bbwp</code> directory itself (<em>use the directory one level higher</em>). For my setup the correct path was:</p>

<pre><code>playbook.bbwp.dir=/Developer/PlayBookSDK
</code></pre>

<h2>Install the PlayBook Simulator</h2>

<p>The PlayBook simulator is bundled with the SDK download and can be run from within VMWare Fusion. Open Fusion and import the following file:</p>

<pre><code>/Developer/PlaybookSDK/bbwp/blackberry-tablet-sdk/BlackBerryPlayBookSimulator-1.0.7/BlackBerryPlayBookSimulator.vmx
</code></pre>

<p>Once imported, run the simulator.</p>

<h2>Setup the Simulator for Development</h2>

<p>To setup the simulator for development work you will need to do the following:</p>

<ol>
<li>Tap on the Settings icon top right of the screen</li>
<li>Select the &#8216;Security&#8217; tab</li>
<li>Select &#8216;Development Mode&#8217;</li>
<li><p>Enable the &#8216;Use Development Mode&#8217; toggle</p>

<p><img src="http://blog.joelambert.co.uk/wp-content/uploads/2012/02/development_mode1.png" alt="Development Mode" /></p></li>
<li><p>Return to the homescreen and a new icon should have appeared in the menubar</p></li>
<li><p>Tap the new icon and make a note of the IP address</p>

<p><img src="http://blog.joelambert.co.uk/wp-content/uploads/2012/02/obtain_ip1.png" alt="Obtain IP" /></p></li>
</ol>

<p>Now update you <code>project.properties</code> file with the simulators IP address:</p>

<pre><code>playbook.sim.ip=172.16.91.139
</code></pre>

<p>You&#8217;re now ready to deploy the app to the simulator:</p>

<pre><code>ant playbook load-simulator
</code></pre>

<p>Depending on the file permissions of your SDK folder you may need to run the ant command as <code>sudo</code>. Once the build has completed the Hello World app should launch in the simulator.</p>

<h2>Setup a Device for Development</h2>

<p>Follow steps 1-6 from the above simulator instructions on the device to enable Development Mode and obtain the devices IP address. Add the IP address to your <code>project.properties</code>.</p>

<pre><code>playbook.device.ip=172.16.91.139
</code></pre>

<p>Signing certificates are required to test applications on real hardware. These can be applied for with the <a href="https://www.blackberry.com/SignedKeys/">BlackBerry Code Signing Keys Order Form</a>. I found the turn-around to be very quick, with the keys arriving within a couple of hours.</p>

<p>Once your keys arrive (via email) then follow the instructions from the <a href="https://bdsc.webapps.blackberry.com/html5/documentation/ww_publishing/signing_setup_tablet_apps_1920009_11.html">BlackBerry site</a> on how to install them. <em>Note that the &#8220;password&#8221; you choose will need to be written into a plain text file so don&#8217;t pick anything you use for anything else!</em></p>

<p>You then just need to update your <code>project.properties</code> file once again and add the passwords you created in the previous step:</p>

<pre><code>playbook.sigtool.csk.password=PASSWORD
playbook.sigtool.p12.password=PASSWORD
</code></pre>

<p>You should now be able to deploy to the device using the deploy script:</p>

<pre><code>ant playbook load-device
</code></pre>

<h1>Enabling the Remote Inspector</h1>

<p>At the time of writing the PlayBook is the only device to ship with remote WebKit debugging. This is one area that the PlayBook really excels and makes creating PhoneGap based apps much easier when compared to other platforms such as iOS &amp; Android.</p>

<p>To enable this functionality in your PhoneGap/WebWorks app you need to do the following steps.</p>

<p>From either the simulator or device:</p>

<h2>Ensure a password is set</h2>

<ul>
<li>Tap on the Settings icon top right of the screen</li>
<li>Select the &#8216;Security&#8217; tab</li>
<li>Select &#8216;Password&#8217;</li>
<li>Enable the &#8216;Use Password&#8217; toggle &amp; provide a password</li>
</ul>

<h2>Add the password to your properties file:</h2>

<p>Add the following to you <code>project.properties</code> file:</p>

<pre><code>playbook.device.password=PASSWORD
</code></pre>

<p>or for simulator:</p>

<pre><code>playbook.sim.password=PASSWORD
</code></pre>

<h2>Update the build settings</h2>

<p>Add a flag to the <code>playbook.xml</code> file. Find <code>&lt;!-- BBWP MACRO --&gt;</code> and add <code>&lt;arg value="-d" /&gt;</code> to the two <code>&lt;exec&gt;</code> nodes in following block:</p>

<pre><code>&lt;exec executable="${bbwp}"&gt;
    &lt;arg file="${build.dir}/${cod.name}.zip" /&gt;
    &lt;arg value="-gcsk" /&gt;
    &lt;arg value="${properties.playbook.sigtool.csk.password}" /&gt;
    &lt;arg value="-gp12" /&gt;
    &lt;arg value="${properties.playbook.sigtool.p12.password}" /&gt;
    &lt;arg value="-o" /&gt;
    &lt;arg file="${build.dir}" /&gt;
    &lt;arg value="-buildId" /&gt;
    &lt;arg value="${build.number}" /&gt;
    &lt;arg value="-d" /&gt;
&lt;/exec&gt;
</code></pre>

<p>and</p>

<pre><code>&lt;exec executable="${bbwp}"&gt;
    &lt;arg file="${build.dir}/${cod.name}.zip" /&gt;
    &lt;arg value="-o" /&gt;
    &lt;arg file="${build.dir}" /&gt;
    &lt;arg value="-buildId" /&gt;
    &lt;arg value="${build.number}" /&gt;
    &lt;arg value="-d" /&gt;
&lt;/exec&gt;
</code></pre>

<p>This will enable the Web Inspector for your WebWorks/PhoneGap app <em>(be sure to remove this when it comes time to distribute)</em>.</p>

<h2>Load a browser on your desktop/laptop</h2>

<p>Visit the IP address of your device/simulator using port <code>1337</code>, e.g.</p>

<pre><code>http://172.16.91.139:1337
</code></pre>

<p>You should now be able to debug your application using the familiar WebKit inspector, including JavaScript breakpoints, console access and CSS manipulations.</p>

<hr />

<p>I wrote this guide partly as a resource for myself after working on porting the <a href="http://rareloop.com">Rareloop Mobile Data Collection framework</a> to work on the Playbook. If you find any in-accuracies or improvements or would like to discuss our mobile data collection platform some more, just give me a shout in the comments or via the <a href="http://rareloop.com/about">Rareloop website</a>.</p>
<img src="http://feeds.feedburner.com/~r/joelambert/~4/JhvKmfy_e5A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.joelambert.co.uk/2012/02/07/getting-started-with-phonegap-on-blackberry-playbook/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://blog.joelambert.co.uk/2012/02/07/getting-started-with-phonegap-on-blackberry-playbook/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=getting-started-with-phonegap-on-blackberry-playbook</feedburner:origLink></item>
		<item>
		<title>Design: Executive Gardens (Business Cards)</title>
		<link>http://feedproxy.google.com/~r/joelambert/~3/lfuC1OvhoRc/</link>
		<comments>http://blog.joelambert.co.uk/2012/01/03/design-executive-gardens-business-cards/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 16:08:09 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.joelambert.co.uk/?p=1018</guid>
		<description><![CDATA[Here&#8217;s the the new business card design I did recently for Executive Gardens (Surrey, UK based landscape gardeners).]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.joelambert.co.uk/wp-content/uploads/2012/01/Business-Card-Demo.jpg" alt="Business Card Demo" /></p>

<p>Here&#8217;s the the new business card design I did recently for <a href="http://executivegardens.co.uk">Executive Gardens</a> (Surrey, UK based landscape gardeners).</p>
<img src="http://feeds.feedburner.com/~r/joelambert/~4/lfuC1OvhoRc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.joelambert.co.uk/2012/01/03/design-executive-gardens-business-cards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.joelambert.co.uk/2012/01/03/design-executive-gardens-business-cards/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=design-executive-gardens-business-cards</feedburner:origLink></item>
		<item>
		<title>.net Mag: Create a page turn effect with CSS3</title>
		<link>http://feedproxy.google.com/~r/joelambert/~3/PPDxkpox7Qo/</link>
		<comments>http://blog.joelambert.co.uk/2011/12/06/net-mag-create-a-page-turn-effect-with-css3/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 11:27:56 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.joelambert.co.uk/?p=1009</guid>
		<description><![CDATA[The January edition of .net mag is out now in both print and digital formats. This month features a tutorial I wrote demonstrating how to create a page turn effect (like the one found in the Flux Slider) using just CSS3 and JavaScript. Create a page turn effect with CSS3 In this tutorial you’ll learn [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.joelambert.co.uk/wp-content/uploads/2011/12/net_mag.png" alt="Net mag" /></p>

<p>The January edition of .net mag is out now in both <a href="http://www.netmagazine.com/shop/magazines/january-2012-223">print and digital formats</a>.</p>

<p>This month features a tutorial I wrote demonstrating how to create a page turn effect (like the one found in the <a href="http://www.joelambert.co.uk/flux/transgallery.html">Flux Slider</a>) using just CSS3 and JavaScript.</p>

<blockquote>
  <h1>Create a page turn effect with CSS3</h1>
  
  <p>In this tutorial you’ll learn how to create a stunning Page Turn effect using the latest in CSS3 transforms and transitions. This effect is a great way to enhance a portfolio image gallery.</p>
</blockquote>

<p>There is also a full working example of the finished code which is pretty heavily commented to help you modify the effect for your own needs.</p>

<p><a href="http://www.netmagazine.com/shop/magazines/january-2012-223"><img src="http://blog.joelambert.co.uk/wp-content/uploads/2011/12/webcover_223.jpg" alt="Webcover 223" /></a></p>

<p><a href="http://www.netmagazine.com/shop/magazines/january-2012-223">Get .net mag</a></p>
<img src="http://feeds.feedburner.com/~r/joelambert/~4/PPDxkpox7Qo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.joelambert.co.uk/2011/12/06/net-mag-create-a-page-turn-effect-with-css3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.joelambert.co.uk/2011/12/06/net-mag-create-a-page-turn-effect-with-css3/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=net-mag-create-a-page-turn-effect-with-css3</feedburner:origLink></item>
		<item>
		<title>Rareloop Website Launched</title>
		<link>http://feedproxy.google.com/~r/joelambert/~3/CuwLxB1cMbs/</link>
		<comments>http://blog.joelambert.co.uk/2011/12/05/rareloop-website-launched/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 11:36:26 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.joelambert.co.uk/?p=997</guid>
		<description><![CDATA[The revamped Rareloop website is now live and we&#8217;ve spent a fair bit of time writing up a couple of recent projects as case studies of our work. Here&#8217;s a brief overview of what is currently on the site but do head on over and read the full articles. MiHope &#8211; Using Android tablets to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.joelambert.co.uk/wp-content/uploads/2011/12/rareloop_logo.png" alt="Rareloop Logo" /></p>

<p>The revamped <a href="http://www.rareloop.com">Rareloop website is now live</a> and we&#8217;ve spent a fair bit of time writing up a couple of recent projects as case studies of our work. Here&#8217;s a brief overview of what is currently on the site but do head on over and read the full articles.</p>

<h1>MiHope &#8211; Using Android tablets to survey HIV suffers in sub saharan Africa</h1>

<p><img src="http://www.rareloop.com/css/img/casestudies/mihope/promo-image.png" alt="MiHope" /></p>

<p><a href="http://www.rareloop.com/casestudies/mihope">View Cases Study</a></p>

<blockquote>
  <p>Rareloop created an easy-to-use survey deployed on a number of ASUS Transformer tablet devices. The application is being used at a number of key points during the project lifecycle to monitor the progress, and hopefully improvement, in the quality of life and access to the much needed medial care of members of rural communities in the two African countries.</p>
</blockquote>

<h1>Catch Before a Fall &#8211; Using iPads to assess patient&#8217;s 10 year risk of osteoporotic fracture</h1>

<p><img src="http://www.rareloop.com/css/img/casestudies/cbaf/promo-image.png" alt="CBAF" /></p>

<p><a href="http://www.rareloop.com/casestudies/cbaf">View Case Study (with video)</a></p>

<blockquote>
  <p>Rareloop were approached to create an application that could help GP&#8217;s better identify patients who were at risk of suffering an osteoporotic bone fracture. The patients would answer a series of questions about various known risk factors (e.g. medical history, medication) and based on their answers a risk percentage would be given of suffering from a fracture in the next ten years. Other criteria such as the patients BMI would also need to be calculated to get a more accurate risk assessment.</p>
</blockquote>

<h1>About Rareloop</h1>

<blockquote>
  <p>Rareloop have built applications, developed websites and hosted products for companies and individuals all over the UK. We have developed iOS and Android applications for national and international clients including the Health Service, NGOs, conferences and recruitment agencies.</p>
</blockquote>

<p>Rareloop is a relative new company but we&#8217;re growing rapidly thanks to our wealth of knowledge in mobile technologies, web and app development &amp; HTML5 and JavaScript. If you&#8217;d like to talk to us about a project, hire us for freelance work or discuss some training please don&#8217;t hesitate to get in <a href="http://www.rareloop.com/about">contact</a>.</p>

<p><a href="http://www.rareloop.com">http://www.rareloop.com</a></p>
<img src="http://feeds.feedburner.com/~r/joelambert/~4/CuwLxB1cMbs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.joelambert.co.uk/2011/12/05/rareloop-website-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.joelambert.co.uk/2011/12/05/rareloop-website-launched/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=rareloop-website-launched</feedburner:origLink></item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: blog.joelambert.co.uk @ 2012-02-24 23:26:03 -->

