<?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>DaveOnCode &#187; java</title>
	<atom:link href="http://www.daveoncode.com/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.daveoncode.com</link>
	<description>coder and technology lover</description>
	<lastBuildDate>Tue, 31 Aug 2010 08:15:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Converting Java to Actionscript&#8230; maybe is not so hard (I hope)</title>
		<link>http://www.daveoncode.com/2009/02/12/converting-java-to-actionscript-maybe-is-not-so-hard-i-hope/</link>
		<comments>http://www.daveoncode.com/2009/02/12/converting-java-to-actionscript-maybe-is-not-so-hard-i-hope/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 12:06:19 +0000</pubDate>
		<dc:creator>Davide Zanotti</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[code conversion]]></category>
		<category><![CDATA[collection]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[porting]]></category>

		<guid isPermaLink="false">http://www.daveoncode.com/?p=294</guid>
		<description><![CDATA[After valuate my own realization of a certain library, I opted to try the porting of an already existent one&#8230; which is made in Java. This library has a lot of classes and interfaces and the manually translation would be very time-expensive, considering also that it uses a lot of classes and functions which are]]></description>
			<content:encoded><![CDATA[<p>After valuate my own realization of a certain library, I opted to try the porting of an already existent one&#8230; which is made in Java. This library has a lot of classes and interfaces and the manually translation would be very time-expensive, considering also that it uses a lot of classes and functions which are unavailable in Actionscript 3. Fortunately I found a small and useful AIR application which automatically converts .java files to .as files (the application is here: <a href="http://thunderhead.esri.com/readonlyurl/J2AS3.air">http://thunderhead.esri.com/readonlyurl/J2AS3.air</a>), this application anyway helps a lot but many extra-work is required to properly convert the classes&#8230; for example Actionscript has not the <em><strong>abstract</strong></em> key, variable can&#8217;t be market as <em><strong>final</strong></em> and so on, so we have to manually adjust these issues. Another useful stuff I found is an Actionscript library which aim is to provide to AS3 developers the same (more or less) features and power of Java Collection framework, which provide classes like HashMap, ArrayList, LinkedList and so on (the library can be found here: <a href="http://code.google.com/p/addicted2flash/" target="_blank">http://code.google.com/p/addicted2flash/</a>). Despite these helps I&#8217;m still facing some incompatibility issues&#8230; classes/methods AS3 is missing, but implementing them by myself is quite simple. For example I implemented the Java&#8217;s System.arraycopy() in 2 minutes, by following the <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#arraycopy(java.lang.Object,%20int,%20java.lang.Object,%20int,%20int" target="_blank">JavaDoc</a> ).</p>
<p>In conclusion Actionscript and Java have a  lot of stuff in common, the syntax and structure is quite the same, except for some issues like abstract classes and methods, multiple methods and constructors declaration (override). The main difference is that Java provides an huge number of Classes that Actionscript doesn&#8217;t, however it seems not so hard to translate Java code and implement Java functionality in Actionscript.</p>
<p>I hope I won&#8217;t have to deny my words :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.daveoncode.com/2009/02/12/converting-java-to-actionscript-maybe-is-not-so-hard-i-hope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
