{"id":596,"date":"2012-03-10T10:48:02","date_gmt":"2012-03-10T16:48:02","guid":{"rendered":"http:\/\/www.techory.com\/blog\/?p=1480"},"modified":"2012-03-15T12:59:21","modified_gmt":"2012-03-15T18:59:21","slug":"best-practices-native-web-hybrid-mobile-apps","status":"publish","type":"post","link":"http:\/\/techory.com\/sxsw\/?p=596","title":{"rendered":"Best Practices: Native + Web Hybrid Mobile Apps"},"content":{"rendered":"<p><strong>Saturday, March 10 &#8211; 11:00AM -12:00PM<br \/><\/strong>Charles Ying Developer Flipboard<\/p>\n<p>Flipboard takes feeds and streams from all over the web and turns it into a beautiful magazine layout (for iphone and ipad).<\/p>\n<p>Flipboard is a hybrid application &#8211; it is a mix between a web app and a native app.<\/p>\n<p><strong>Web App<br \/><\/strong>Put a simple &quot;app&quot; wrapper around a website<\/p>\n<p><strong>Native App<br \/><\/strong>Has a native UI with hooks into the device<\/p>\n<p>The idea of a hybrid app is to take the best of both worlds and combine them into something that takes advantage of both worlds. Use the best parts of web and the best parts of native and combine them together.<\/p>\n<p>Do NOT try to emulate native UI &#8211; they don&#8217;t feel right, and many times have too much overhead.<\/p>\n<p><strong>Bridging Web and Native<br \/><\/strong>Use a UIWebView with javascript calling the native code when necessary.<\/p>\n<p>Save power &#8211; do fewer simpler things.<\/p>\n<p>Working with Web Code:<br \/>Debugging was difficult, so a simulated HTML environment was created for testing<br \/>Move hotspot areas into native code<br \/>Pay attention to what your JS libraries are doing, strip out the things you don&#8217;t need<br \/>Consider what the browser has to draw and composite on screen.<\/p>\n<p><strong>Mobile Graphics<br \/><\/strong>Aim for high frame rates (60fps)<br \/>Use the GPU acceleration for animation and UI<br \/>Use CSS3 Animation + Transitions<br \/>Watch your graphics memory use<br \/>Shadows and gradients are typically slower on mobile devices<br \/>Consider compositing and overdraw &#8211; transparent elements have more overhead<\/p>\n<p><strong>Existing Frameworks<\/strong><\/p>\n<ul>\n<li>PhoneGap, trigger.io for UIWebView bridge<\/li>\n<li>Appcelerator for Custom JavaScriptCore<\/li>\n<li>Spaceport, ImpactJS, CocoonJS for Gaming<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Saturday, March 10 &#8211; 11:00AM -12:00PMCharles Ying Developer Flipboard Flipboard takes feeds and streams from all over the web and turns it into a beautiful magazine layout (for iphone and ipad). Flipboard is a hybrid application &#8211; it is a mix between a web app and a native app. Web AppPut a simple &#034;app&#034; wrapper [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[31],"tags":[],"_links":{"self":[{"href":"http:\/\/techory.com\/sxsw\/index.php?rest_route=\/wp\/v2\/posts\/596"}],"collection":[{"href":"http:\/\/techory.com\/sxsw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/techory.com\/sxsw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/techory.com\/sxsw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/techory.com\/sxsw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=596"}],"version-history":[{"count":1,"href":"http:\/\/techory.com\/sxsw\/index.php?rest_route=\/wp\/v2\/posts\/596\/revisions"}],"predecessor-version":[{"id":628,"href":"http:\/\/techory.com\/sxsw\/index.php?rest_route=\/wp\/v2\/posts\/596\/revisions\/628"}],"wp:attachment":[{"href":"http:\/\/techory.com\/sxsw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/techory.com\/sxsw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=596"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/techory.com\/sxsw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}