<?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>Web 2.1 &#187; documentation</title>
	<atom:link href="http://web.2point1.com/tag/documentation/feed/" rel="self" type="application/rss+xml" />
	<link>http://web.2point1.com</link>
	<description>Tim Whitlock&#039;s home in the Blogohedron</description>
	<lastBuildDate>Thu, 13 May 2010 21:26:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using ASDoc with JASPA</title>
		<link>http://web.2point1.com/2009/03/28/using-asdoc-with-jaspa/</link>
		<comments>http://web.2point1.com/2009/03/28/using-asdoc-with-jaspa/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 17:44:34 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[ASDoc]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[JASPA]]></category>

		<guid isPermaLink="false">http://web.2point1.com/2009/03/28/using-asdoc-with-jaspa/</guid>
		<description><![CDATA[I&#8217;ve spent this morning trying to get ASDoc to generate code documentation for the JASPA APIs, with mixed results.

I encountered problems straight away with the extended globals that JASPA uses. For example The DOM API defines a native Window class which extends the ECMAScript global. Of course in AS3 you cannot extend the global.
Eventually I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent this morning trying to get <a href="http://livedocs.adobe.com/flex/3/html/asdoc_9.html" target="_blank">ASDoc</a> to generate code documentation for the <a href="http://jaspa.org.uk/">JASPA</a> APIs, with mixed results.<br />
<span id="more-116"></span><br />
I encountered problems straight away with the extended globals that JASPA uses. For example The <a href="http://jaspa.org.uk/wiki/JASPA.DOM" target="_blank">DOM API</a> defines a native <a href="http://jaspa.org.uk/wiki/Jaspa.dom.Window" target="_blank">Window</a> class which extends the <a href="http://jaspa.org.uk/wiki/Global_class" target="_blank">ECMAScript global</a>. Of course in AS3 you cannot extend the global.</p>
<p>Eventually I managed to trick ASDoc into completing, but it has opened up further cans of worms. There are a whole bunch of practices in the JASPA code base that the AS3 compiler really doesn&#8217;t like. I&#8217;ve tried to be strict, but apparently not strict enough. In some cases I feel that AS3 is just being unreasonable, for example, you cannot have private constructors in AS3. A common practice for singleton classes is many OOP languages.</p>
<p>Here&#8217;s another example, where an extended event class provides access to an extended target -</p>
<pre class="code">public class EventTarget {
}

public class Event {
    public function get target():EventTarget;
}

public class SpecialEventTarget extends EventTarget {
}

public class SpecialEvent extends Event { 
    override public function get target():SpecialEventTarget;
}</pre>
<p>The overridden getter that returns a sub-type of the target is considered invalid. I don&#8217;t see how this is bad practice. Surely a more specific type of event should be allowed to return a more specific type of target, especially as the extended target still has all the traits of the original target.</p>
<p>Of course you can always cast with the <code>as</code> operator:</p>
<pre class="code">mySpecialEvent.target as SpecialEventTarget;</pre>
<p>The question is, do I really want JASPA to be tied so closely to AS3? At the end of the day it is a separate language, and is designed for compiling into JavaScript not for emulating ActionScript.</p>
<p>I am not caught between two options.<br />
1. Alter the JASPA codebase to be even more like AS3<br />
2. Write a JAS documentor, jasdoc</p>
<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://web.2point1.com/2009/03/28/using-asdoc-with-jaspa/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
