<?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>Christophe Coenraets &#187; PhoneGap</title>
	<atom:link href="http://coenraets.org/blog/category/phonegap/feed/" rel="self" type="application/rss+xml" />
	<link>http://coenraets.org/blog</link>
	<description>Web Platform, Cloud and Mobile Application Development</description>
	<lastBuildDate>Mon, 13 May 2013 16:05:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Architecting a PhoneGap Application: Video + Slides</title>
		<link>http://coenraets.org/blog/2013/05/architecting-a-phonegap-application-video-slides/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=architecting-a-phonegap-application-video-slides</link>
		<comments>http://coenraets.org/blog/2013/05/architecting-a-phonegap-application-video-slides/#comments</comments>
		<pubDate>Mon, 13 May 2013 16:04:34 +0000</pubDate>
		<dc:creator>Christophe Coenraets</dc:creator>
				<category><![CDATA[PhoneGap]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=5934</guid>
		<description><![CDATA[Here is the video of my PhoneGap Architecture talk at Adobe MAX 2013: The slides are available here.]]></description>
				<content:encoded><![CDATA[<p>Here is the video of my PhoneGap Architecture talk at Adobe MAX 2013:</p>
<p><iframe title="AdobeTV Video Player" width="640" height="367" src="http://tv.adobe.com/embed/1217/18503/" frameborder="0" allowfullscreen scrolling="no"></iframe></p>
<p>The slides are available <a href="http://coenraets.org/slides/MAX2013_Architecting_Phonegap_Apps.pdf">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2013/05/architecting-a-phonegap-application-video-slides/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Top 10 Performance Techniques for PhoneGap Applications</title>
		<link>http://coenraets.org/blog/2013/05/top-10-performance-techniques-for-phonegap-applications/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=top-10-performance-techniques-for-phonegap-applications</link>
		<comments>http://coenraets.org/blog/2013/05/top-10-performance-techniques-for-phonegap-applications/#comments</comments>
		<pubDate>Mon, 13 May 2013 15:49:32 +0000</pubDate>
		<dc:creator>Christophe Coenraets</dc:creator>
				<category><![CDATA[PhoneGap]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=5929</guid>
		<description><![CDATA[Here is the video of my PhoneGap performance session at Adobe MAX 2013:]]></description>
				<content:encoded><![CDATA[<p>Here is the video of my PhoneGap performance session at Adobe MAX 2013:</p>
<p><iframe title="AdobeTV Video Player" width="640" height="367" src="http://tv.adobe.com/embed/1217/18425/" frameborder="0" allowfullscreen scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2013/05/top-10-performance-techniques-for-phonegap-applications/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Building Pluggable and Mock Data Adapters for Web and PhoneGap Applications</title>
		<link>http://coenraets.org/blog/2013/04/building-pluggable-and-mock-data-adapters-for-web-and-phonegap-applications/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=building-pluggable-and-mock-data-adapters-for-web-and-phonegap-applications</link>
		<comments>http://coenraets.org/blog/2013/04/building-pluggable-and-mock-data-adapters-for-web-and-phonegap-applications/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 17:01:09 +0000</pubDate>
		<dc:creator>Christophe Coenraets</dc:creator>
				<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PhoneGap]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=5689</guid>
		<description><![CDATA[This is not rocket science, but when planning your web or mobile architecture, it is important to make sure your client application is not tightly coupled to a specific data access strategy. The Problem In tightly coupled applications, the presentation logic is intertwined with data access logic (for example, $.ajax() calls), and it leads to [...]]]></description>
				<content:encoded><![CDATA[<p>This is not rocket science, but when planning your web or mobile architecture, it is important to make sure your client application is not tightly coupled to a specific data access strategy. </p>
<h3>The Problem</h3>
<p>In tightly coupled  applications, the presentation logic is intertwined with data access logic (for example, $.ajax() calls), and it leads to some of the problems below:</p>
<ol>
<li>Slows down the development process. Client side developers often have to wait for services to be built. The back and forth between client side and server side development hampers fast iterations.</li>
<li>Hard to test. It&#8217;s hard to unit test a client application that is hard-wired to server components.</li>
<li>Hampers the designer or developer creativity. It can be hard for the designer or client side developer to think creatively about the User Experience if he or she is constrained by a set of pre-existing data services.</li>
<li>Hard to change. Changing the data access strategy requires major changes in the client code.</li>
<li>Hard to switch the data access strategy on the fly. For example when the application connectivity status changes from online to offline.</li>
</ol>
<h3>The Solution: Pluggable Data Adapters</h3>
<p>The solution is of course to decouple the client code from a specific data access strategy. Practically, this goal can be achieved by using pluggable data adapters.</p>
<p>I often start with an in-memory (or mock data) adapter that allows me to iterate quickly at the client side while the server side may not even exist yet. Later on, I can unplug the in-memory adapter and plug in an Ajax adapter to run my application against actual server data, or a WebSQL (or IndexedDB) adapter to run it against an embedded database. </p>
<p>There are many strategies to implement data adapters, and a complete review of these strategies is beyond the scope of this article. Here is a basic approach&#8230;</p>
<h3>Define a Common Interface</h3>
<p>To be interchangeable, your adapters have to expose a common API. Here is a simple example for an Employee Directory use case:</p>
<pre class="brush: jscript; title: ; notranslate">
function initialize() {}; // Some adapters may require initialization.  

function findByName(key) {};

function findById(id) {};
</pre>
<h3>Assume Asynchronous</h3>
<p>In addition to defining methods with the same name, part of defining a common interface is also to use a common method invocation approach. For example, your in-memory and Ajax adapters wouldn&#8217;t be interchangeable if the in-memory adapter assumed <em>synchronous</em> method invocation and the Ajax adapter assumed <em>asynchronous</em> invocation. A good approach is to provide all your adapters with an asynchronous API. Fortunately, Deferred Objects and Promises make it really easy to work with asynchronous operations. There are different implementations of Deferred Objects and Promises. In the example below, we will use the <a href="http://api.jquery.com/jQuery.Deferred/">jQuery implementation</a>.</p>
<h3>In-Memory Adapter Example</h3>
<p>In this adapter, we work with mock data held in a private array. The public API methods return a promise that is resolved immediately (since looping through an array is a synchronous operation).</p>
<p><script src="https://gist.github.com/ccoenraets/5443777.js?file=memory-adapter.js"></script></p>
<h3>JSONP Adapter Example</h3>
<p>In this adapter, we get the data from RESTful services using JSONP. The $.ajax() method returns a jqXHR object which implements the Promise interface. </p>
<p><script src="https://gist.github.com/ccoenraets/5443777.js?file=jsonp-adapter.js"></script></p>
<h3>The Client Application</h3>
<p>Depending on the adapter you want to use, you import either memory-adapter.js or jsonp-adpater.js in index.html. You then instantiate the appropriate adapter on line 16 and you don&#8217;t have to change anything else in the application.</p>
<p><script src="https://gist.github.com/ccoenraets/5443777.js?file=app.js"></script></p>
<h3>Source Code and Additional Adapters</h3>
<p>The source code for this simple implementation of data adapters is available in <a href="https://github.com/ccoenraets/javascript-data-adapters">this</a> GitHub repository. The repository includes the following adapters:</p>
<ul>
<li>In-Memory Adapter</li>
<li>LocalStorage Adapter</li>
<li>WebSQL Adapter</li>
<li>JSONP Adapter</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2013/04/building-pluggable-and-mock-data-adapters-for-web-and-phonegap-applications/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Sociogram Mobile: A Starter-Kit Application for PhoneGap and Facebook Integration</title>
		<link>http://coenraets.org/blog/2013/03/sociogram-mobile-a-starter-kit-application-for-phonegap-and-facebook-integration/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sociogram-mobile-a-starter-kit-application-for-phonegap-and-facebook-integration</link>
		<comments>http://coenraets.org/blog/2013/03/sociogram-mobile-a-starter-kit-application-for-phonegap-and-facebook-integration/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 18:21:37 +0000</pubDate>
		<dc:creator>Christophe Coenraets</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[PhoneGap]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=5131</guid>
		<description><![CDATA[A few weeks ago I shared Sociogram, a sample application that demonstrates how to use the Facebook JavaScript SDK and the Graph API. A number of people have asked me for a Mobile version of the application. So here is Sociogram Mobile: a sample application that demonstrates how to integrate Facebook social features in a [...]]]></description>
				<content:encoded><![CDATA[<p>A few weeks ago I shared <a href="http://coenraets.org/blog/2013/02/sociogram-a-sample-application-exploring-the-facebook-sdk-and-the-graph-api/">Sociogram</a>, a sample application that demonstrates how to use the Facebook JavaScript SDK and the Graph API. A number of people have asked me for a Mobile version of the application. So here is Sociogram Mobile: a sample application that demonstrates how to integrate Facebook social features in a PhoneGap application.   </p>
<p>Specifically, the application demonstrates:</p>
<ul>
<li>How to login and request permisssions</li>
<li>How to access your profile, friends, and feed</li>
<li>How to access a list of friends</li>
<li>How to access a friend&#8217;s profile, friends, mutual friends, and feed</li>
<li>How to post a message to your feed using a custom UI or using the Facebook native dialogs</li>
<li>How to revoke the permissions granted to the application (useful during development)</li>
</ul>
<p>Here are a few screenshots:</p>
<p><a href="http://coenraets.org/blog/wp-content/uploads/2013/03/sociogram_home.jpg"><img src="http://coenraets.org/blog/wp-content/uploads/2013/03/sociogram_home.jpg" alt="" title="sociogram_home" width="320" height="478" class="alignleft size-full wp-image-5159" /><br/><br/></a><br />
<span id="more-5131"></span><br />
<a href="http://coenraets.org/blog/wp-content/uploads/2013/03/sociogram_menu.jpg"><img src="http://coenraets.org/blog/wp-content/uploads/2013/03/sociogram_menu.jpg" alt="" title="sociogram_menu" width="320" height="478" class="alignleft size-full wp-image-5160" /></a></p>
<p><a href="http://coenraets.org/blog/wp-content/uploads/2013/03/sociogram_profile.jpg"><img src="http://coenraets.org/blog/wp-content/uploads/2013/03/sociogram_profile.jpg" alt="" title="sociogram_profile" width="320" height="478" class="alignleft size-full wp-image-5157" /></a></p>
<p><a href="http://coenraets.org/blog/wp-content/uploads/2013/03/sociogram_post2.gif"><img src="http://coenraets.org/blog/wp-content/uploads/2013/03/sociogram_post2.gif" alt="" title="sociogram_post2" width="320" height="478" class="alignleft size-full wp-image-5154" /></a></p>
<p><a href="http://coenraets.org/blog/wp-content/uploads/2013/03/sociogram_feed.jpg"><img src="http://coenraets.org/blog/wp-content/uploads/2013/03/sociogram_feed.jpg" alt="" title="sociogram_feed" width="320" height="478" class="alignleft size-full wp-image-5161" /></a></p>
<h3 style="clear:both;">Source Code</h3>
<p>The source code is available in <a href="https://github.com/ccoenraets/sociogram-mobile">this GitHub repository</a>. This is still work in progress and I&#8217;ve only tested the app on iOS at this point. I&#8217;ll continue to update the code: there are things that can be polished and things that can be added. </p>
<h3>Libraries</h3>
<p>The application is buil using the following libraries:</p>
<ul>
<li><a href="https://github.com/phonegap/phonegap-facebook-plugin">The Facebook plugin for PhoneGap</a></li>
<li><a href="http://backbonejs.org/">Backbone.js</a></li>
<li><a href="http://maker.github.com/ratchet/">Ratchet</a></li>
<li><a href="https://github.com/ftlabs/fastclick">Fastclick</a></li>
<li><a href="http://jquery.com/">jQuery</a></li>
<li><a href="http://coenraets.org/blog/2013/03/hardware-accelerated-page-transitions-for-mobile-web-apps-phonegap-apps/">PageSlider</a></li>
</ul>
<p>These dependencies (except the first one) can easily be removed to work with your own stack.</p>
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2013/03/sociogram-mobile-a-starter-kit-application-for-phonegap-and-facebook-integration/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Hardware-Accelerated Page Transitions for Mobile Web Apps / PhoneGap Apps</title>
		<link>http://coenraets.org/blog/2013/03/hardware-accelerated-page-transitions-for-mobile-web-apps-phonegap-apps/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hardware-accelerated-page-transitions-for-mobile-web-apps-phonegap-apps</link>
		<comments>http://coenraets.org/blog/2013/03/hardware-accelerated-page-transitions-for-mobile-web-apps-phonegap-apps/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 18:01:05 +0000</pubDate>
		<dc:creator>Christophe Coenraets</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[PhoneGap]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=5027</guid>
		<description><![CDATA[I have been delivering a few PhoneGap Architecture and Performance talks in recent weeks. One of the performance techniques I talk about is &#8211;no surprise&#8211; the use of Hardware (GPU) Accelerated animations when available on the device. A typical example in a mobile application, is to hardware accelerate your page transitions. Even though this capability [...]]]></description>
				<content:encoded><![CDATA[<p>I have been delivering a few PhoneGap Architecture and Performance talks in recent weeks. One of the performance techniques I talk about is &#8211;no surprise&#8211; the use of Hardware (GPU) Accelerated animations when available on the device. A typical example in a mobile application, is to hardware accelerate your page transitions. Even though this capability has been around for some time now, I still get a lot of questions about it. So I figured I would discuss it in this blog post.</p>
<h3>Basic Infrastructure</h3>
<p>Here is a typical set up for sliding pages in an out of the viewport in a mobile app:</p>
<p><a href="http://coenraets.org/blog/wp-content/uploads/2013/03/pageslider2.png"><img src="http://coenraets.org/blog/wp-content/uploads/2013/03/pageslider2.png" alt="" title="pageslider2" width="640" height="264" class="alignleft size-full wp-image-5108" /></a></p>
<p>The white box in the middle represents the browser viewport (the window through which the visible part of the document is seen): that is where the current page of your app is displayed at the full (100%) width and height of the viewport.<br />
<span id="more-5027"></span><br />
A page can be positioned to the left or to the right of the viewport by setting its &#8220;x&#8221; coordinate to -100% or 100% respectively (100% representing the viewport width). This can be done using two different approaches as explained below.</p>
<p>To slide a page from the right, you would:</p>
<ol>
<li>Position the page at the starting position of the transition (right)</li>
<li>If needed, force a reflow to anchor the page at its starting position.
<li>Finally, position the page at the ending position of the transition (center) with the <span style="font-family:'Courier New'"><strong>transition-duration</strong></span> style added to the page to indicate that it should be animated to that new position (see style definitions below).</li>
</ol>
<p><div class="woo-sc-box normal   ">In my own experience, I don&#8217;t have to force a reflow (step 2) when animating elements that are already in the DOM. However, I have to force a reflow when adding new elements to the DOM before animating them to their new position (see pageslider.js described below). More information <a href="http://www.phpied.com/rendering-repaint-reflowrelayout-restyle/">here</a>.</div><br />
Here is a code example:</p>
<pre class="brush: jscript; title: ; notranslate">
var homePage = document.getElementById(&quot;homePage&quot;),
    newPage = document.getElementById(&quot;newPage&quot;);
// Position the page at the starting position of the animation
newPage.className = &quot;page right&quot;;
// Position page at ending position of animation and add transition-duration
newPage.className =&quot;page transition center&quot;;
// Simultaneously slide out the current page to the left of the viewport
homePage.className = &quot;page transition left&quot;;
</pre>
<p>And here are two versions of the accompanying CSS: the first version will not hardware accelerate the transition; the second one will.  </p>
<h5>Non hardware accelerated transition:</h5>
<p>Adding <code><strong>transform: translate3d(0,0,0);</strong></code> to the page will hardware accelerate the actual composition (drawing of the element on top of the background). However, it will not hardware accelerate the transition: The &#8220;left&#8221; property cannot be hardware accelerated. Changing the &#8220;left&#8221; property will force a layout every time the property changes (every frame).</p>
<pre class="brush: css; title: ; notranslate">
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.page.left {
    left: -100%;
}

.page.center {
    left: 0;
}

.page.right {
    left: 100%;
}

.page.transition {
    -webkit-transition-duration: .25s;
    transition-duration: .25s;
}
</pre>
<h5>Hardware accelerated transition:</h5>
<p>To hardware accelerate the transition, apply a 3D transform to the page&#8217;s x coordinate instead of changing the value of the left property. The version of the style sheet below should hardware accelerate both the actual composition (drawing of the page) and the transition. </p>
<pre class="brush: css; title: ; notranslate">
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.page.left {
    -webkit-transform: translate3d(-100%, 0, 0);
    transform: translate3d(-100%, 0, 0);
}

.page.center {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.page.right {
    -webkit-transform: translate3d(100%, 0, 0);
    transform: translate3d(100%, 0, 0);
}

.page.transition {
    -webkit-transition-duration: .25s;
    transition-duration: .25s;
}
</pre>
<p>Try the simple example below. The code is self-contained in simplepageslider.html. Right-click the sample and select &#8220;View Frame Source&#8221; to check it out.</p>
<p><iframe src="http://coenraets.org/samples/pageslider/simplepageslider.html" width="640" height="320"></iframe></p>
<h3>PageSlider.js: A Micro Library for Simple Page Transitions</h3>
<p>In a real-life application, you will typically want to generalize the process a little bit. For example, you could:</p>
<ul>
<li>Automatically add new pages to the DOM and remove them from the DOM after they are animated out of the viewport.</li>
<li>Automatically determine the sliding direction based on the page history.</li>
<li>Provide a hook (using the <code>webkitTransitionEnd</code> event) for adding some logic when the transition completes.</li>
</ul>
<p>I isolated that logic in <a href="https://github.com/ccoenraets/PageSlider/blob/master/pageslider.js">pageslider.js</a>, an example of a micro library you could use to provide hardware accelerated page transitions in your mobile apps.</p>
<p>Try the example below, or try it fullscreen <a href="http://coenraets.org/samples/pageslider/index.html">here</a>.</p>
<p><iframe src="http://coenraets.org/samples/pageslider/index.html" width="640" height="500"></iframe></p>
<h5>Source Code</h5>
<p>The pageslider.js source code is available in <a href="https://github.com/ccoenraets/PageSlider">this GitHub repository</a>.</p>
<div class="woo-sc-box note   ">Hardware acceleration is not available on all platforms. Check out <a href="http://caniuse.com/transforms3d">caniuse.com</a> to see which platforms are supported. Make sure your animations work on platforms that do not support hardware acceleration.</div>
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2013/03/hardware-accelerated-page-transitions-for-mobile-web-apps-phonegap-apps/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>PhoneGap and PhoneGap Build in 5 Minutes</title>
		<link>http://coenraets.org/blog/2012/12/phonegap-and-phonegap-build-in-5-minutes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phonegap-and-phonegap-build-in-5-minutes</link>
		<comments>http://coenraets.org/blog/2012/12/phonegap-and-phonegap-build-in-5-minutes/#comments</comments>
		<pubDate>Mon, 17 Dec 2012 20:54:42 +0000</pubDate>
		<dc:creator>Christophe Coenraets</dc:creator>
				<category><![CDATA[PhoneGap]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=4904</guid>
		<description><![CDATA[During the last couple of months, I have been on the road presenting our new HTML tools as part of the Create the Web tour with many other members of the team. The tour was a lot of fun with a lot of great feedback from designers and developers. The main challenge of the event [...]]]></description>
				<content:encoded><![CDATA[<p>During the last couple of months, I have been on the road presenting our <a href="http://html.adobe.com/edge/">new HTML tools</a> as part of the <a href="http://html.adobe.com/events/">Create the Web tour</a> with many other members of the team.</p>
<p>The tour was a lot of fun with a lot of great feedback from designers and developers. The main challenge of the event was to fit so much content into a short two-hour session. But it was a good challenge! It forced us to be laser focused, and clearly communicate the essence of each product in 5 to 10 minutes.</p>
<p>Since 5 minutes is also a good length for a video, I thought it would be a good idea to capture that succinct message in a series of screencasts. I posted the first one (<a href="http://coenraets.org/blog/2012/12/synchronized-browsing-and-remote-inspection-with-adobe-edge-inspect/">Synchronized Browsing and Remote Inspection with Adobe Edge Inspect</a>) last week. Here is the second one: “PhoneGap and PhoneGap Build in 5 minutes”.</p>
<p><iframe width="640" height="360" src="http://www.youtube.com/embed/UOjoNEUFeVE?rel=0" frameborder="0" allowfullscreen></iframe></p>
<div class="woo-sc-box note   ">For a better viewing experience, make sure you set the quality to HD (720p or 1080p) in the YouTube player, and go full screen.</div>
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2012/12/phonegap-and-phonegap-build-in-5-minutes/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>New Tutorial: Developing and Architecting a PhoneGap Application</title>
		<link>http://coenraets.org/blog/2012/11/new-tutorial-developing-and-architecting-a-phonegap-application/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-tutorial-developing-and-architecting-a-phonegap-application</link>
		<comments>http://coenraets.org/blog/2012/11/new-tutorial-developing-and-architecting-a-phonegap-application/#comments</comments>
		<pubDate>Mon, 26 Nov 2012 16:10:05 +0000</pubDate>
		<dc:creator>Christophe Coenraets</dc:creator>
				<category><![CDATA[PhoneGap]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=4841</guid>
		<description><![CDATA[A couple of weeks ago, I delivered a full day PhoneGap workshop at QCon San Francisco. The workshop went very well, and I thought the materials could be useful to a larger audience. So I turned the workshop instructions into more detailed tutorial instructions. This is a lot more than the usual Getting Started tutorial: [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://coenraets.org/blog/wp-content/uploads/2012/11/Phonegap-Logo.png"><img src="http://coenraets.org/blog/wp-content/uploads/2012/11/Phonegap-Logo-300x300.png" alt="" title="Phonegap-Logo" width="300" height="300" class="aligncenter size-medium wp-image-4751" /></a></p>
<p>A couple of weeks ago, I delivered a <a href="http://qconsf.com/sf2012/presentations/show_presentation.jsp?oid=4442">full day PhoneGap workshop at QCon San Francisco</a>. The workshop went very well, and I thought the materials could be useful to a larger audience. So I turned the workshop instructions into more detailed tutorial instructions. This is a lot more than the usual Getting Started tutorial: In addition to introducing you to key PhoneGap APIs such as LocalStorage, Database, Notification, Geolocation, Contacts, and Camera, the tutorial focuses on how to architect a real-life PhoneGap application using a Single Page Architecture and HTML templates. Topics include:</p>
<ul>
<li>How to use different local data storage strategies.</li>
<li>How to use several PhoneGap APIs such as Geolocation, Contacts, and Camera.</li>
<li>How to handle specific mobile problems such as touch events, scrolling, styling, page transitions, etc.</li>
<li>How to build an application using a single page architecture and HTML templates.</li>
<li>How to build (compile and package) an application for 6 platforms using <a href="http://build.phonegap.com">PhoneGap Build</a>.</li>
</ul>
<p>To complete this tutorial, all you need is a code editor, a modern browser, and a connection to the Internet. </p>
<p>The tutorial is available <a href="http://coenraets.org/blog/phonegap-tutorial">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2012/11/new-tutorial-developing-and-architecting-a-phonegap-application/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PhoneGap API Explorer for Android now on Google Play</title>
		<link>http://coenraets.org/blog/2012/09/phonegap-api-explorer-for-android-now-on-google-play/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phonegap-api-explorer-for-android-now-on-google-play</link>
		<comments>http://coenraets.org/blog/2012/09/phonegap-api-explorer-for-android-now-on-google-play/#comments</comments>
		<pubDate>Wed, 12 Sep 2012 16:25:06 +0000</pubDate>
		<dc:creator>Christophe Coenraets</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[PhoneGap]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=3923</guid>
		<description><![CDATA[After I published the iOS version on the Apple App Store, a number of people asked for an Android version. I just published it on Google Play. PhoneGap API Explorer is an API reference application for PhoneGap device integration capabilities. The application clearly presents the syntax for each function, and allows you to provide values [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://coenraets.org/blog/wp-content/uploads/2012/09/Screenshot_2012-09-11-15-17-54.png"><img src="http://coenraets.org/blog/wp-content/uploads/2012/09/Screenshot_2012-09-11-15-17-54-1024x640.png" alt="" title="Screenshot_2012-09-11-15-17-54" width="660" height="412" class="aligncenter size-large wp-image-3944" /></a></p>
<p>After I published the <a href="http://itunes.apple.com/us/app/phonegap-api-explorer/id537825489?mt=8">iOS version</a> on the Apple App Store, a number of people asked for an Android version. I just published it on Google Play.<br />
<a href="http://play.google.com/store/apps/details?id=org.coenraets.phonegapexplorer"><br />
  <img alt="Get it on Google Play" src="http://www.android.com/images/brand/get_it_on_play_logo_large.png" /><br />
</a><br />
<span id="more-3923"></span><br />
PhoneGap API Explorer is an API reference application for PhoneGap device integration capabilities. The application clearly presents the syntax for each function, and allows you to provide values for the function’s arguments, invoke the function from within the application, and see immediate results. PhoneGap API Explorer provides a unique and interactive learning experience.</p>
<p>You can read more about the application and watch a video in my <a href="http://coenraets.org/blog/2012/08/new-phonegap-api-explorer-available-on-the-app-store/">initial post</a> about the iOS release.</p>
<h3>Source Code</h3>
<p>The iOS and the Android versions share the exact same code. Some platform specific CSS styles are dynamically applied through device detection to provide a natural experience on each platform. I will make the source code available on GitHub soon, ready for you to build on <a href="https://build.phonegap.com/">PhoneGap Build</a>. </p>
<p>Here are a few more screenshots:</p>
<p><a href="http://coenraets.org/blog/wp-content/uploads/2012/09/Screenshot_2012-09-11-15-15-47.png"><img src="http://coenraets.org/blog/wp-content/uploads/2012/09/Screenshot_2012-09-11-15-15-47-1024x640.png" alt="" title="Screenshot_2012-09-11-15-15-47" width="660" height="412" class="aligncenter size-large wp-image-3949" /></a></p>
<p><a href="http://coenraets.org/blog/wp-content/uploads/2012/09/Screenshot_2012-09-11-15-19-41.png"><img src="http://coenraets.org/blog/wp-content/uploads/2012/09/Screenshot_2012-09-11-15-19-41-1024x640.png" alt="" title="Screenshot_2012-09-11-15-19-41" width="660" height="412" class="aligncenter size-large wp-image-3954" /></a><a href="http://coenraets.org/blog/wp-content/uploads/2012/09/Screenshot_2012-09-11-15-17-09.png"><img src="http://coenraets.org/blog/wp-content/uploads/2012/09/Screenshot_2012-09-11-15-17-09-1024x640.png" alt="" title="Screenshot_2012-09-11-15-17-09" width="660" height="412" class="aligncenter size-large wp-image-3950" /></a><a href="http://coenraets.org/blog/wp-content/uploads/2012/09/Screenshot_2012-09-11-15-15-47.png"><img src="http://coenraets.org/blog/wp-content/uploads/2012/09/Screenshot_2012-09-11-15-15-47-1024x640.png" alt="" title="Screenshot_2012-09-11-15-15-47" width="660" height="412" class="aligncenter size-large wp-image-3949" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2012/09/phonegap-api-explorer-for-android-now-on-google-play/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>New PhoneGap API Explorer available on the App Store</title>
		<link>http://coenraets.org/blog/2012/08/new-phonegap-api-explorer-available-on-the-app-store/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-phonegap-api-explorer-available-on-the-app-store</link>
		<comments>http://coenraets.org/blog/2012/08/new-phonegap-api-explorer-available-on-the-app-store/#comments</comments>
		<pubDate>Mon, 13 Aug 2012 15:27:59 +0000</pubDate>
		<dc:creator>Christophe Coenraets</dc:creator>
				<category><![CDATA[PhoneGap]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=3877</guid>
		<description><![CDATA[I created a new version of PhoneGap API Explorer that is now available on the App Store. PhoneGap API Explorer is an API reference application for PhoneGap device integration capabilities. The application clearly presents the syntax for each function, and allows you to provide values for the function&#8217;s arguments, invoke the function from within the [...]]]></description>
				<content:encoded><![CDATA[<p>I created a new version of PhoneGap API Explorer that is <a href="http://itunes.apple.com/us/app/phonegap-api-explorer/id537825489?mt=8">now available on the App Store</a>. PhoneGap API Explorer is an API reference application for PhoneGap device integration capabilities. The application clearly presents the syntax for each function, and allows you to provide values for the function&#8217;s arguments, invoke the function from within the application, and see immediate results. PhoneGap API Explorer provides a unique and interactive learning experience.</p>
<p><a href="http://itunes.apple.com/us/app/phonegap-api-explorer/id537825489?mt=8"><img src="http://employeedirectory.org/app/appstore.png" width="150"/></a></p>
<p>PhoneGap API Explorer itself is of course a PhoneGap application built with Backbone.js and a mix of Twitter Bootstrap and custom skins. Watch a short video here (go full screen for a better viewing experience):</p>
<p><iframe width="640" height="360" src="http://www.youtube.com/embed/ohaya0DMIjY?rel=0" frameborder="0" allowfullscreen></iframe><br />
<span id="more-3877"></span></p>
<h3>Navigation</h3>
<p>This new version introduces a new navigation system described in the following illustration: </p>
<p><a href="http://coenraets.org/blog/wp-content/uploads/2012/08/welcome2.gif"><img src="http://coenraets.org/blog/wp-content/uploads/2012/08/welcome2.gif" alt="Navigation" width="640" height="499" class="aligncenter size-full wp-image-3897" /></a></p>
<h3>In-App Experience</h3>
<p>Also new in this version is the ability to provide argument values directly inside the function&#8217;s syntax reference, and invoke the function &#8220;in context&#8221; to see immediate results as shown in the following screenshots:</p>
<p><a href="http://coenraets.org/blog/wp-content/uploads/2012/08/pgapi_camera.jpg"><img src="http://coenraets.org/blog/wp-content/uploads/2012/08/pgapi_camera.jpg" alt="Camera" width="640" height="480" style="border:solid 1px black" class="aligncenter size-full wp-image-3887" /></a></p>
<p><a href="http://coenraets.org/blog/wp-content/uploads/2012/08/pgapi_location.jpg"><img src="http://coenraets.org/blog/wp-content/uploads/2012/08/pgapi_location.jpg" alt="Location" width="640" height="480" style="border:solid 1px black" class="aligncenter size-full wp-image-3889" /></a></p>
<p><a href="http://coenraets.org/blog/wp-content/uploads/2012/08/pgapi_sql.jpg"><img src="http://coenraets.org/blog/wp-content/uploads/2012/08/pgapi_sql.jpg" alt="Database" width="640" height="480" style="border:solid 1px black" class="aligncenter size-full wp-image-3882" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2012/08/new-phonegap-api-explorer-available-on-the-app-store/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Simple Mobile UI Patterns: Page Swipe with Zepto.js and PhoneGap</title>
		<link>http://coenraets.org/blog/2012/07/simple-mobile-ui-patterns-page-swipe-with-zepto-js-and-phonegap/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=simple-mobile-ui-patterns-page-swipe-with-zepto-js-and-phonegap</link>
		<comments>http://coenraets.org/blog/2012/07/simple-mobile-ui-patterns-page-swipe-with-zepto-js-and-phonegap/#comments</comments>
		<pubDate>Tue, 17 Jul 2012 19:43:08 +0000</pubDate>
		<dc:creator>Christophe Coenraets</dc:creator>
				<category><![CDATA[PhoneGap]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=3843</guid>
		<description><![CDATA[As I’m working on improving the user experience of some of my recent mobile appliations, I thought it could be useful to start documenting some basic UI patterns for mobile apps. The goal is not to provide yet another UI framework, but rather to document the basic/raw approach (or different approaches) to implement a specific [...]]]></description>
				<content:encoded><![CDATA[<p>As I’m working on improving the user experience of some of my recent mobile appliations, I thought it could be useful to start documenting some basic UI patterns for mobile apps.</p>
<p>The goal is not to provide yet another UI framework, but rather to document the basic/raw approach (or different approaches) to implement a specific UI pattern using HTML, CSS, and JavaScript. The code is intentionally simplistic so that it can easily be integrated in your own libraries using your own conventions.</p>
<p>I created a GitHub repository called &#8220;<a href="https://github.com/ccoenraets/mobile-ui-patterns">mobile-ui-patterns</a>&#8221; where I’ll try to publish the patterns I come across in the apps I’m building.</p>
<p>I just pushed a first example of the “<a href="https://github.com/ccoenraets/mobile-ui-patterns/tree/master/page-swipe">Page Swipe</a>” pattern that is pretty common in tablet layouts. </p>
<p>Watch a short video here:</p>
<p><iframe width="640" height="360" src="http://www.youtube.com/embed/B-yNDHVIB_Q?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p>In this implementation, I used the swipe gesture event available in <a href="http://zeptojs.com/">Zepto.js</a> (a lighter weight jQuery compatible DOM library).</p>
<p>In my next post, I will share another version of the same pattern implemented with <a href="http://cubiq.org/iscroll-4">iScroll</a> and its “snap” feature that provides a slightly different user experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2012/07/simple-mobile-ui-patterns-page-swipe-with-zepto-js-and-phonegap/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
