{"id":2137,"date":"2013-11-08T17:37:54","date_gmt":"2013-11-08T05:37:54","guid":{"rendered":"https:\/\/www.deltics.co.nz\/blog\/?p=2137"},"modified":"2013-11-08T17:40:57","modified_gmt":"2013-11-08T05:40:57","slug":"a-true-work-of-art","status":"publish","type":"post","link":"https:\/\/www.deltics.co.nz\/blog\/posts\/2137\/","title":{"rendered":"A True Work of ART"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span><p>For the past two years <strong>Google<\/strong> have been working on something for <strong>Android<\/strong> that could herald a sea change on the platform.  <strong>ART<\/strong>.<\/p>\n<p><!--more--><\/p>\n<p>Essentially, <strong>ART<\/strong> is a new runtime which incorporates <strong>AOT<\/strong> (<strong>A<\/strong>head <strong>O<\/strong>f <strong>T<\/strong>ime) compilation, essentially taking <strong>JIT<\/strong> to the next level by compiling an application <em>in full<\/em> <strong>at the time of <em>installation<\/em> on a device<\/strong>.<\/p>\n<p>.NET of course already has this technology or at least something very similar.<\/p>\n<p>The implications of this are obvious and significant.<\/p>\n<p>Any developer using a platform native, <strong>Java<\/strong> based development environment today &#8211; including tools such as <strong>Oxygene for Java<\/strong> &#8211; is assured of reaching the broadest range of <strong>Android<\/strong> devices and able to take full advantage of the <strong>Android SDK<\/strong>&#8216;s, including proprietary extensions such as the <strong><a href=\"http:\/\/developer.samsung.com\/s-pen-sdk\">Samsung Galaxy S-Pen SDK<\/a><\/strong>.<\/p>\n<p>With <strong>ART<\/strong> those same <em>platform native<\/em> applications will now also benefit from the performance boost that comes from full compilation to <em>native code<\/em>.  And it seems this will simply com &#8220;free of charge&#8221;, without any need to modify code or change or even upgrade tools.<\/p>\n<p>At a stroke, a wholly native code approach to development loses any advantages to outweigh the limitations, constraint and additional difficulties that it brings.  <\/p>\n<p>With <strong>ART<\/strong>, <strong>Android SDK<\/strong> developers can continue to take full advantage of the platform while their users enjoy the benefit of native code.<\/p>\n<p>Everyone&#8217;s a winner!  \ud83d\ude42<\/p>\n<p>Furthermore, they will get this benefit on <strong>all<\/strong> the hardware that <strong>Google<\/strong> supports with their <strong>ART<\/strong> technology.  Even better, developers won&#8217;t have to choose what particular native code their compiler should produce since it is generated <em>at the time of installation<\/em> and is therefore targeted to the users device at that time.<\/p>\n<p>The hardware that will be supported by this technology is not yet known but it could in theory mean the <strong>full range<\/strong> of <strong>Android<\/strong> devices whether <strong>ARM<\/strong> based or <strong>Intel<\/strong> or some other entirely new and exotic architecture that might emerge.<\/p>\n<p>Even if there is some hardware that <strong>ART<\/strong> does <em>not<\/em> support, Android SDK apps will of course continue to run on those devices, only without the additional benefit of <strong>ART<\/strong>.<\/p>\n<p>But it&#8217;s not all fluffy kittens and daisies.  There is a cost.<\/p>\n<p>Pre-compiled applications increase in size compared to their byte-code sources; an inflation said to be in the region of <strong>10%-20%<\/strong>.  So a 40KB widget will now blow out to a massive 44KB or worse as much as 50KB.<\/p>\n<p>A 1MB application will <strong>explode<\/strong> to 1.2MB.  Gadzooks!<\/p>\n<p>Ok, so maybe it <em>is<\/em> all fluffy kittens and daisies after all.<\/p>\n<p>\ud83d\ude42<\/p>\n<p><strong>ART<\/strong> is still an experimental technology, but it&#8217;s an experiment you may be able to participate in.<\/p>\n<p>If you are an <strong>Oxygene for Java<\/strong> developer targeting <strong>Android<\/strong> (or using Java itself of course) and have access to a <strong>Google Nexus<\/strong> device with <strong>Kit-Kat<\/strong>, you can enable <strong>ART<\/strong> (on the <em>device<\/em> &#8211; nothing to do with the code or the tools) and see for yourself what difference it can make to turn your already platform native applications into native <em>code<\/em> applications as well.<\/p>\n<p>Unfortunately I don&#8217;t have such a device myself, but who knows&#8230;. perhaps some day soon&#8230;<\/p>\n<p>\ud83d\ude42<\/p>\n<p>Here are some more links on the subject, to alleviate the strain on Google&#8217;s servers:<\/p>\n<ul>\n<li><a href=\"http:\/\/source.android.com\/devices\/tech\/dalvik\/art.html\">Google Android Developer Site<\/a><\/li>\n<li><a href=\"http:\/\/readwrite.com\/2013\/11\/07\/how-google-may-be-planning-to-make-android-apps-faster-with-art#awesm=~omzF1BtAkmCgeY\">ReadWrite<\/a><\/li>\n<li><a href=\"http:\/\/www.androidpolice.com\/2013\/11\/06\/meet-art-part-1-the-new-super-fast-android-runtime-google-has-been-working-on-in-secret-for-over-2-years-debuts-in-kitkat\/\">AndroidPolice<\/a><\/li>\n<li><a href=\"http:\/\/www.gsmarena.com\/google_debuts_art_in_kitkat_aims_to_change_android-news-7143.php\">GSM Arena (includes information on enabled ART on Google Nexus Kit-Kat)<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span>For the past two years Google have been working on something for Android that could herald a sea change on the platform. ART.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[212,4],"tags":[153,258,181],"class_list":["post-2137","post","type-post","status-publish","format-standard","hentry","category-android-2","category-delphi","tag-android","tag-art","tag-oxygene-2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TKYv-yt","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/2137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=2137"}],"version-history":[{"count":5,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/2137\/revisions"}],"predecessor-version":[{"id":2142,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/2137\/revisions\/2142"}],"wp:attachment":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=2137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=2137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=2137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}