{"id":519348,"date":"2010-04-07T13:33:14","date_gmt":"2010-04-07T17:33:14","guid":{"rendered":"http:\/\/www.mobilecrunch.com\/?p=28941"},"modified":"2010-04-07T13:33:14","modified_gmt":"2010-04-07T17:33:14","slug":"adlib-apple%e2%80%99s-secret-weapon-for-making-better-web-apps-for-the-ipad","status":"publish","type":"post","link":"https:\/\/mereja.media\/index\/519348","title":{"rendered":"AdLib: Apple\u2019s Secret Weapon For Making Better Web Apps For The iPad"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.mobilecrunch.com\/wp-content\/uploads\/2010\/04\/guide.jpg\" alt=\"\" title=\"guide\" width=\"630\" height=\"473\" class=\"aligncenter size-full wp-image-28942\" \/><\/p>\n<p>Did you give in and buy yourself an iPad? Go grab it. If you don&#8217;t own one, just reach your arms out, conjure up a temporary air of smugness, and play along.<\/p>\n<p>Now take your iPad (or your imaginaryPad, or what have you) and pop into Safari. Hit the bookmarks button, and then tap &#8220;iPad User Guide&#8221;. Explore a bit. Notice the dual-pane view with independent scrolling; notice the elasticity of the views. Notice that, outside of the URL bar up at the top, it looks and feels <em>just<\/em> like a native application.<\/p>\n<p>Half of the hacky-type people reading this article have probably already bailed to go tear apart the source code at this point. Why? Because Web Apps don&#8217;t really work like this; HTML, CSS, and the standard javascript libraries really just don&#8217;t provide any of this functionality. It looks like Apple has something up their sleeves to make iPad Web Apps a bit more.. app-like.<\/p>\n<p><span id=\"more-28941\"><\/span><\/p>\n<p>It&#8217;s always been one of the primary complaints about Web Apps: no matter how much time developers dump into them, they just can&#8217;t make them feel like the stuff that comes out of the App Store. Maybe the tool bar would float out of view, or clicks just wouldn&#8217;t register naturally, or scrolling would seem &#8220;off&#8221;. It would take hours of scripting work just to get something that mostly emulated the feel of a basic native application.<\/p>\n<p>Back in December of last year, <a href=\"http:\/\/daringfireball.net\/2009\/12\/pastrykit\">John Gruber<\/a> noticed that the on-handset iPhone user guide exhibited a bunch of behaviors that web apps normally couldn&#8217;t. Tool bars locked in place, clicks felt natural, and scrolling elements seem to emulate those found in native apps. He did a bit of tinkering, discovering that this was all made possible by a custom Javascript framework built by Apple called &#8220;PastryKit&#8221;. This iPad sorcery appears to be an extension of that.<\/p>\n<p>The guys who brought it to our attention, <a href=\"http:\/\/almost.done21.com\/2010\/04\/adlib-apples-secret-ipad-web-framework\/\">Done21<\/a>, are tentatively referring to this unannounced, not-quite-public framework as &#8220;AdLib&#8221;, after the file that contained it all: AdLib-ug-ipad.js. This name is by no means official &#8211; it&#8217;s just the best thing we&#8217;ve got, so far. <\/p>\n<p>Coming in at just shy of 4,500 lines of code, the entire purpose of AdLib appears to be to bring native app-esque functionality to Web Apps, often counteracting the default behaviors that make Safari play nice with the rest of the web.<\/p>\n<p>Alas, it&#8217;s entirely unclear if Apple ever plans to make this available to developers for their own use. Given the transparent nature of Javascript, it&#8217;s entirely possible that developers could just rip the framework from Apple&#8217;s guide and start stabbing away &#8212; but they&#8217;d be doing it without documentation of any sort. Working with someone else&#8217;s code without documentation &#8212; especially code that&#8217;s been optimized down to the bare minimums, as this has &#8212; is a bit like manning a plane&#8217;s cockpit sans instruction. <\/p>\n<p>Blindfolded.<\/p>\n<p><a href=\"http:\/\/feedads.g.doubleclick.net\/~at\/4ZCTkYObypS2gSFgiWNGKdDvv-M\/0\/da\"><img decoding=\"async\" src=\"http:\/\/feedads.g.doubleclick.net\/~at\/4ZCTkYObypS2gSFgiWNGKdDvv-M\/0\/di\" border=\"0\" ismap=\"true\"><\/img><\/a><br \/>\n<a href=\"http:\/\/feedads.g.doubleclick.net\/~at\/4ZCTkYObypS2gSFgiWNGKdDvv-M\/1\/da\"><img decoding=\"async\" src=\"http:\/\/feedads.g.doubleclick.net\/~at\/4ZCTkYObypS2gSFgiWNGKdDvv-M\/1\/di\" border=\"0\" ismap=\"true\"><\/img><\/a><\/p>\n<div class=\"feedflare\">\n<a href=\"http:\/\/feeds.feedburner.com\/~ff\/Mobilecrunch?a=KZgzX7MWf-M:DkKjx5xjcvw:V_sGLiPBpWU\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/Mobilecrunch?i=KZgzX7MWf-M:DkKjx5xjcvw:V_sGLiPBpWU\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/Mobilecrunch?a=KZgzX7MWf-M:DkKjx5xjcvw:F7zBnMyn0Lo\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/Mobilecrunch?i=KZgzX7MWf-M:DkKjx5xjcvw:F7zBnMyn0Lo\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/Mobilecrunch?a=KZgzX7MWf-M:DkKjx5xjcvw:yIl2AUoC8zA\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/Mobilecrunch?d=yIl2AUoC8zA\" border=\"0\"><\/img><\/a>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Did you give in and buy yourself an iPad? Go grab it. If you don&#8217;t own one, just reach your arms out, conjure up a temporary air of smugness, and play along. Now take your iPad (or your imaginaryPad, or what have you) and pop into Safari. Hit the bookmarks button, and then tap &#8220;iPad [&hellip;]<\/p>\n","protected":false},"author":682,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-519348","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/posts\/519348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/users\/682"}],"replies":[{"embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/comments?post=519348"}],"version-history":[{"count":0,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/posts\/519348\/revisions"}],"wp:attachment":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/media?parent=519348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/categories?post=519348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/tags?post=519348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}