<?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>MultiNC &#187; Rhodes</title>
	<atom:link href="http://multinc.com/tag/rhodes/feed/" rel="self" type="application/rss+xml" />
	<link>http://multinc.com</link>
	<description>Explorations in Social Computing</description>
	<lastBuildDate>Wed, 09 Dec 2009 19:05:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Developing iPhone Applications using Java may not be such a good idea</title>
		<link>http://multinc.com/2009/03/19/developing-iphone-applications-using-java-is-maybe-not-a-good-idea/</link>
		<comments>http://multinc.com/2009/03/19/developing-iphone-applications-using-java-is-maybe-not-a-good-idea/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 10:50:15 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Huy dev]]></category>
		<category><![CDATA[iPhone dev]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Rhodes]]></category>
		<category><![CDATA[XMLVM]]></category>

		<guid isPermaLink="false">http://multinc.com/wp/?p=131</guid>
		<description><![CDATA[Developing iPhone Applications without using Objective C
When the iPhone SDK came out in March 2008, mobile developers were very excited to be able to develop native applications for the increasingly popular device.  However, that excitement was partially tempered by some requirements of the platform, which for most meant learning how to program Objective C, a [...]]]></description>
			<content:encoded><![CDATA[<h2>Developing iPhone Applications without using Objective C</h2>
<p>When the iPhone SDK came out in March 2008, mobile developers were very excited to be able to develop native applications for the increasingly popular device.  However, that excitement was partially tempered by some requirements of the platform, which for most meant learning how to program Objective C, a language that only Mac developers are familiar with.  Just as with iPod users, iPhone application developers do come from all walks of life&#8211;they&#8217;re not all Mac die-hards.</p>
<p>As as result there have been several efforts to produce a framework or tool with which applications could be developed using more familiar languages. <a href="http://rhomobile.com/products/rhodes">Rhodes</a> does this for Ruby programmers. <a href="http://www.xmlvm.org/">XMLVM</a> does this for Java programmers.</p>
<h2>XMLVM</h2>
<p>I watched the <a href="http://www.youtube.com/watch?v=s8nMpi5-P-I">Google Tech Talk</a> about XMLVM, which goes into significant depth about the conversion process.  Essentially, the technology does cross-compilation from the compiled version of your Java application, in other words JVM bytecode instead of Java source code. Thus, the entire process of compiling an iPhone application would consist of Java source -&gt; JVM bytecode -&gt; Objective C source -&gt; native iPhone binary.  The speaker goes into detail with an example showing the conversion of JVM bytecode into Objective C source, which is easy to understand and can be educational.</p>
<p>Opting for bytecode as source for XMLVM makes it easier to implement but produces bloated code.  Not only that, but the bytecode is converted not into native iPhone native code, but into Objective C source code.  Add to that that the conversion is done using XSLT, and you can guess how inefficient the process and the output will be.</p>
<p>The speaker emphasizes that this is an academic project without abundant resources, with the implication that the code produced by this reference implementation is not expected to perform well for commercial purposes.  So while it&#8217;s interesting to see this idea in action, not even the speaker believes that this cross-compiler can be put to serious use yet, if ever.</p>
<h3>Other languages for the XMLVM</h3>
<p>Java is not the only source language that can benefit from XMLVM.  There is support for other input languages and output code.  See the <a href="http://www.xmlvm.org">website</a> for more information.</p>
<h3>Enhancing the iPhone emulator with hardware data</h3>
<p>One nice tool that the XMLVM team developed was a way to send device data to the desktop emulator, which naturally cannot emulate everything that the iPhone can do.  For example, you can use a real iPod Touch or iPhone to send accelerometer to the emulator.  The same could be envisioned for other functionality, e.g. GPS, light sensor, proximity sensor, etc.  I imagine this is so helpful for the development process that others must have implemented something like that as well.</p>
<h2>Better to Develop in Objective C</h2>
<p>My opinion regarding these kinds of language-adapting frameworks or tools that allow developers to code in their familiar language is not very positive.  In general, I don&#8217;t think it&#8217;s a good idea to distance yourself from the target platform.  Problems include:</p>
<ul>
<li>Limited functionality</li>
<li>Lower performance</li>
<li>More complicated development process</li>
<li>More source of bugs in your way (from not just the iPhone OS and SDK, but from the language adapter)</li>
<li>Smaller community of developers, fewer development tools, less documentation</li>
</ul>
<p>All these problems are multiplied when you&#8217;re dealing with a hot platform like the iPhone, where innovation comes fast along with bugs and the language adapter is always one or more steps behind on completeness, robustness, and performance optimization.  Do you really want to develop cool apps with only features that are &#8220;so last year&#8221;?  The fact that the iPhone platform and its evolution are so closed doesn&#8217;t help either.</p>
]]></content:encoded>
			<wfw:commentRss>http://multinc.com/2009/03/19/developing-iphone-applications-using-java-is-maybe-not-a-good-idea/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
