{"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=\"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=\"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_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":[]},"categories":[212,4],"tags":[153,258,181],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TKYv-yt","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1713,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1713\/","url_meta":{"origin":2137,"position":0},"title":"How to Call Java Code from an Oxygene Android Application","date":"20 Sep 2013","format":false,"excerpt":"Lachlan just posted a link to a post on Google+ (also available as a PDF) demonstrating how to call Java from Delphi XE5. I was shocked at both the amount and the nature of the code involved. It is long, convoluted and ugly stuff (nb. that isn't a criticism of\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2202,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/2202\/","url_meta":{"origin":2137,"position":1},"title":"What is Hydrogene ?  Asked and Answered","date":"03 Dec 2013","format":false,"excerpt":"Over the past few weeks there has been some speculation as to what the mysterious \"Hydrogene\" that RemObjects have been working on may or may not be. Well, that particular feline has slipped it's captors and escaped the bag. I'm not aware of any official announcement and I hope that\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1503,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1503\/","url_meta":{"origin":2137,"position":2},"title":"Sharing Code Across Platforms in Oxygene","date":"22 Aug 2013","format":false,"excerpt":"There seems to be a perception among some people that Delphi is in the unique position of allowing developers to share and re-use code across the various platforms that it's compiler can now (and will soon) target. But this is not the case. Oxygene has had this capability right from\u2026","rel":"","context":"In &quot;Cooper&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1525,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1525\/","url_meta":{"origin":2137,"position":3},"title":"RAD Studio in Auckland \/ Android in a VM \/ Touchy Feely","date":"30 Aug 2013","format":false,"excerpt":"Well, not really RAD Studio as such, more like Mobile Studio (whether as part of RAD Studio Ent+ or the Mobile Add-On) since everything shown was oriented around the Android support and emphasising the fact that an application written for iOS can simply be recompiled and will run on Android.\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"Androidx86","src":"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/Androidx86-1024x608.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1845,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1845\/","url_meta":{"origin":2137,"position":4},"title":"Another Great Oxygene Release","date":"03 Oct 2013","format":false,"excerpt":"RemObjects have officially released the September update to Oxygene with the usual round of bug fixes and some dramatic improvements in the tool chain. Cocoa - Principally iOS 7 My focus with Oxygene most recently has been on the Android side. My previous experience with using the Cocoa (iOS) support\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1634,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1634\/","url_meta":{"origin":2137,"position":5},"title":"An App With View","date":"17 Sep 2013","format":false,"excerpt":"Not a Merchant Ivory production, but Part 3 in the Oxygene for Java camera app for Android series. So far we have seen that we can work directly with the Android platform manifest and layout files and how the Oxygene language is a first class citizen in the Java platform\u2026","rel":"","context":"In &quot;Android&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/2137"}],"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}]}}