<?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>Till Schneidereit</title>
	<atom:link href="http://www.tillschneidereit.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tillschneidereit.de</link>
	<description>Programming ActionScript</description>
	<lastBuildDate>Sat, 15 May 2010 19:48:28 +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>SwiftSuspenders 1.5, or: A tale of robots and refactorings</title>
		<link>http://www.tillschneidereit.de/2010/05/15/swiftsuspenders-1-5-or-a-tale-of-robots-and-refactorings/</link>
		<comments>http://www.tillschneidereit.de/2010/05/15/swiftsuspenders-1-5-or-a-tale-of-robots-and-refactorings/#comments</comments>
		<pubDate>Sat, 15 May 2010 17:41:01 +0000</pubDate>
		<dc:creator>till</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[swiftsuspenders]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[dependency injection]]></category>
		<category><![CDATA[di]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[inversion of control]]></category>
		<category><![CDATA[ioc]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[robotlegs]]></category>

		<guid isPermaLink="false">http://www.tillschneidereit.de/?p=81</guid>
		<description><![CDATA[Nearly half a year ago, I released SwiftSuspenders 1.0. As hinted at in the related blog post, this new release contains a solution to the &#8220;Robot Legs Problem&#8221;: and it goes by the name of Child Injectors. So, why would robot legs pose a problem for a dependency injection container, you ask. In short: They [...]]]></description>
			<content:encoded><![CDATA[<p>Nearly half a year ago, I released <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vdHNjaG5laWRlcmVpdC9Td2lmdFN1c3BlbmRlcnMv">SwiftSuspenders</a> 1.0.</p>
<p>As hinted at in the <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy50aWxsc2NobmVpZGVyZWl0LmRlLzIwMDkvMTEvMjQvYW5ub3VuY2luZy1zd2lmdHN1c3BlbmRlcnMtMS0wLw==">related blog post</a>, this new release contains a solution to the &#8220;Robot Legs Problem&#8221;: and it goes by the name of Child Injectors.</p>
<p>So, why would robot legs pose a problem for a dependency injection container, you ask. In short: They don&#8217;t &#8211; their creation does. See, DI containers are all about creating object graphs. That is: They allow you to create complex, nested trees of objects in an automated fashion. </p>
<p>Want to build a car? You can either go about it manually from the outside in: You create the car&#8217;s shell, then you realize that your car probably needs an engine. You put that in, at which point you realize that your engine will need need cylinders, so you add some of those, and so on.</p>
<p>Or, you can use a DI container and do everything the other way around: You first create a collection of all the parts your car will consist of, and then you tell the DI container to instantiate the outermost part &#8211; the shell. The container inspects the shell and sees that it needs some parts, like an engine. It then looks through the set of parts you supplied, and adds those that fit the dependencies of the shell. In doing so, each of the parts is itself inspected and all its dependencies are fulfilled, recursively.</p>
<p>Now, imagine you want to build a robot. Robots aren&#8217;t really special in any way that&#8217;s interesting for DI containers at all. It&#8217;s just that their construction is commonly used to explain a problem that you&#8217;ll sooner or later encounter if you use DI containers to create complex objects.</p>
<h4>What is the Robot Legs Problem?</h4>
<p>The robot legs problem describes the difficulties that one experiences when trying to construct structures with two or more sub-trees that are very similar, but not identical to one another.</p>
<p>See, that robot, it&#8217;s supposed to look like a human being in many ways: It&#8217;ll have a head, a torso, two arms and two legs. But there&#8217;s an important difference to a human: The robot is much, much simpler. For example, parts of this robot&#8217;s legs are identical for both sides. Now ideally, if you&#8217;ve got two knee joints that are entirely identical to one another, you only want to define them once. The problem is that for our robot, there are parts further down the legs that differ for each side. say the knee joints are identical, but the ankles are slightly different for each leg. How is the DI container supposed to know that it has to supply different parts somewhere down the leg if some intermediary parts are identical? It can&#8217;t. Well, not without some help, at least.</p>
<p>That&#8217;s the Robot Legs Problem.</p>
<p>There are (at least) two solutions to this problem: Either you add some differentiating attribute to the knee joints and all other parts that are really the same, functionally; or you somehow add information to the DI container&#8217;s configuration that lets it figure out the differences from the outside.</p>
<p>The first option isn&#8217;t really attractive, but it&#8217;s the easiest from a conceptual point of view: Instead of having one class <code>Knee</code>, you create two classes, <code>LeftKnee</code> and <code>RightKnee</code>, both extending <code>Knee</code>. The only thing that differs for these classes is that they define dependencies for <code>LeftAnkle</code> and <code>RightAnkle</code> respectively (I&#8217;m leaving out any intermediary parts such as bones here for reasons of simplicity. For your own, real-world, robot, you&#8217;d probably want to have some of those). Apart from adding a lot of boiler-plate code (imagine this with your real-world robot that has about 53 parts in each leg that are functionally entirely identical for both sides!), this creates serious problems in terms of separation of concerns and encapsulation: If the knees truly are functionally identical, it&#8217;s none of their business to know anything about which leg they are added to.</p>
<h4>What kind of solution does <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vdHNjaG5laWRlcmVpdC9Td2lmdFN1c3BlbmRlcnMv">SwiftSuspenders</a> provide?</h4>
<p>Obviously, we want to use the second solution &#8211; and with <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vdHNjaG5laWRlcmVpdC9Td2lmdFN1c3BlbmRlcnMv">SwiftSuspenders</a> 1.5, we finally can. The solution comes in the form of child injectors.</p>
<p>Child injectors are simple things: They try to satisfy all dependencies themselves, but if they can&#8217;t find a mapping for one, they turn to their parent and ask if it has a corresponding mapping. Really, they&#8217;re kinda dumb.</p>
<p>But here&#8217;s the thing: <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vdHNjaG5laWRlcmVpdC9Td2lmdFN1c3BlbmRlcnMv">SwiftSuspenders</a> lets you create trees of dependency mappings that use different child injectors to satisfy recursive dependencies. In our example, you&#8217;d create rules for the <code>LeftHip</code> and the <code>RightHip</code>:</p>
<pre>
var injector : Injector = new Injector();
var leftHipRule : InjectionConfig = injector.mapClass(LeftHip, LeftHip);
var rightHipRule : InjectionConfig = injector.mapClass(RightHip, RightHip);
</pre>
<p>Now in order to differentiate further down the leg, we create parallel structures for both legs in separate injectors. But first, we need to create and set these injectors:</p>
<pre>
//let your main injector create a child injector:
var leftLegInjector : Injector = injector.createChildInjector();
//you can also create a new injector and set its parent:
var rightLegInjector : Injector = new Injector();
rightLegInjector.setParentInjector(injector);
//Let SwiftSuspenders use the child injectors from the hip on down the leg:
leftHipRule.setInjector(leftLegInjector);
rightHipRule.setInjector(rightLegInjector);
</pre>
<p>With this, our injectors are all set up as we need them &#8211; on to the remaining injection mappings.</p>
<p>Both <code>LeftHip</code> and <code>RightHip</code> have a dependency (and I&#8217;m leaving out the knee here</p>
<pre>
[Inject] public var knee : Knee;
</pre>
<p>As this dependency is the same in both legs, we can safely add it to the main injector:</p>
<pre>
injector.mapClass(Knee, Knee);
</pre>
<p>Upon not finding a rule for the <code>Knee</code> dependency, the child injectors will turn to their parent and get the rule we just defined. After using that to inject the <code>Knee</code>, they will continue on down the tree of dependencies.<br />
The <code>Knee</code> has a dependency for an <code>Ankle</code>:</p>
<pre>
[Inject] public var ankle : Ankle;
</pre>
<p>Not that the <code>Knee</code> would care, but this field is actually supposed to contain a different value, depending on which leg the <code>Knee</code> is added to! Because of that, we have to add different mappings to the child injectors:</p>
<pre>
leftLegInjector.mapClass(Ankle, LeftAnkle);
rightLegInjector.mapClass(Ankle, RightAnkle);
</pre>
<p>And with that, we&#8217;re done with the configuration! Assembling our robot is now a simple matter of letting our injector instantiate the class <code>Robot</code>, which of course defines dependencies for <code>LeftHip</code> and <code>RightHip</code>:</p>
<pre>
var myRobot : Robot = injector.instantiate(Robot);
</pre>
<h4>Great! And what about the refactorings?</h4>
<p>Right, the refactorings. Those have been applied to the <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vdHNjaG5laWRlcmVpdC9Td2lmdFN1c3BlbmRlcnMv">SwiftSuspenders</a> source code. Lots of them, in fact. Their primary goal was to support child injectors, but they also lead to a much cleaner separation of concerns. Basically, there are now three basic building blocks in <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vdHNjaG5laWRlcmVpdC9Td2lmdFN1c3BlbmRlcnMv">SwiftSuspenders</a>, each with their own very specific concern:</p>
<ul>
<li>The <code>Injector</code>, which acts as the facade to the entire system and keeps everything together</li>
<li>The <code>InjectionConfig</code>, which acts as the broker between injection points and injection results</li>
<li>Several kinds of <code>InjectionResult</code>s, which are held by <code>InjectionConfig</code>s and generate or keep the value that&#8217;s injected into injection points</li>
</ul>
<p>In the future, <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PUFURnhWQjRKRnBR" target='_blank'>robotic beings will rule the world</a>. Well, that, and the aforementioned refactorings will allow for a better syntax for defining inection mappings. Something along the lines of <code>injector.map(MyInterface, 'named').toClass(MyClass);</code>. But that&#8217;s going to happen in the year 2000. Or version 2.0, I&#8217;m not sure.</p>
 <img src="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=81" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.tillschneidereit.de/2010/05/15/swiftsuspenders-1-5-or-a-tale-of-robots-and-refactorings/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Announcing SwiftSuspenders 1.0</title>
		<link>http://www.tillschneidereit.de/2009/11/24/announcing-swiftsuspenders-1-0/</link>
		<comments>http://www.tillschneidereit.de/2009/11/24/announcing-swiftsuspenders-1-0/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 20:59:03 +0000</pubDate>
		<dc:creator>till</dc:creator>
				<category><![CDATA[swiftsuspenders]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[di]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[ioc]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[robotlegs]]></category>

		<guid isPermaLink="false">http://www.tillschneidereit.de/?p=74</guid>
		<description><![CDATA[The History Almost exactly two months ago, I announced the first public version of SwiftSuspenders, my DI/ IoC solution for AS3. In that announcement I proposed that SwiftSuspenders might be finished and probably wouldn&#8217;t receive many changes anymore. Well, as it turns out, that was ridiculously wrong. Starting with version 0.8.1, the Robotlegs framework bundled [...]]]></description>
			<content:encoded><![CDATA[<h4>The History</h4>
<p>Almost exactly two months ago, I <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=LzIwMDkvMDkvMjEvaW50cm9kdWNpbmctc3dpZnRzdXNwZW5kZXJzLw==">announced</a> the first public version of SwiftSuspenders, my DI/ IoC solution for AS3.</p>
<p>In that announcement I proposed that SwiftSuspenders might be finished and probably wouldn&#8217;t receive many changes anymore. Well, as it turns out, that was ridiculously wrong. Starting with version 0.8.1, the <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5yb2JvdGxlZ3Mub3JnLw==" target='_blank'>Robotlegs</a> framework bundled SwiftSuspenders and as of Robotlegs version 0.9.1, it&#8217;s the only bundled DI solution, with adapters for other solutions available in their own github projects.</p>
<h4>The Contributions</h4>
<p>Combined with a huge increase of popularity of Robotlegs, this caused a constant influx of not only demands for features and bugfixes in SwiftSuspenders, but also design feedback and substantial contributions from <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NoYXVuLmJveWJsYWNrLmNvLnphL2Jsb2cv" target='_blank'>Shaun Smith</a>, <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2pvZWxob29rcy5jb20v" target='_blank'>Joel Hooks</a> and <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5yb2JlcnRwZW5uZXIuY29tLw==" target='_blank'>Robert Penner</a>.</p>
<h4>The Release</h4>
<p>Based on this feedback and in large parts thanks to these contributions, I&#8217;m happy to announce the release of a much improved <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vdHNjaG5laWRlcmVpdC9Td2lmdFN1c3BlbmRlcnMvZG93bmxvYWRz" target='_blank'>SwiftSuspenders 1.0</a>!</p>
<p>Contained in this release are many improvements over my initial beta release:</p>
<ul>
<li>setter injection</li>
<li>method and constructor injection with optional arguments</li>
<li>[PostConstruct] metadata annotations, allowing method invocation after the injection process completed</li>
<li>XML configuration of injection points, enabling developers to use SwiftSuspenders in Flash Pro, which doesn&#8217;t support custom metadata</li>
<li>Injector#mapRule, enabling mapping multiple requests to the same response configuration</li>
<li>much improved unit tests</li>
<li>countless bugfixes</li>
<li>an even cleaner codebase</li>
</ul>
<h4>The Future</h4>
<p>As outlined in <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dyb3Vwcy5nb29nbGUuY29tL2dyb3VwL3JvYm90bGVncy9icm93c2VfdGhyZWFkL3RocmVhZC8xODNlMTM4ODAzZmVhZWQ0L2ZlNmY3OTI2ODExNjJlYWE/bG5rPXJhb3QjZmU2Zjc5MjY4MTE2MmVhYQ==" target='_blank'>this thread</a> in the <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dyb3Vwcy5nb29nbGUuY29tL2dyb3VwL3JvYm90bGVncw==" target='_blank'>Robotlegs discussion group</a>, I&#8217;m planning to tackle the &#8220;robot legs&#8221; problem next (for which I can&#8217;t seem to find a good explanation anywhere &#8211; links are much appreciated!)</p>
<p>I hope to get that done pretty quickly, so a 1.1 release might not be too far off.</p>
 <img src="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=74" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.tillschneidereit.de/2009/11/24/announcing-swiftsuspenders-1-0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Improved reflection support in Flash Player 10.1?</title>
		<link>http://www.tillschneidereit.de/2009/11/22/improved-reflection-support-in-flash-player-10-1/</link>
		<comments>http://www.tillschneidereit.de/2009/11/22/improved-reflection-support-in-flash-player-10-1/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 00:23:14 +0000</pubDate>
		<dc:creator>till</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash player]]></category>
		<category><![CDATA[internals]]></category>
		<category><![CDATA[reflection]]></category>
		<category><![CDATA[tamarin]]></category>

		<guid isPermaLink="false">http://www.tillschneidereit.de/?p=42</guid>
		<description><![CDATA[describeTypeJSON So it looks like Flash Player 10.1 might support a somewhat improved reflections API containing support for: retrieving reflected information as JSON (or rather, as an AS3 object tree) filtering the request to only retrieve certain types of information Some more functions that are used internally to construct the result of describeType In other [...]]]></description>
			<content:encoded><![CDATA[<h4>describeTypeJSON</h4>
<p>So it looks like Flash Player 10.1 <em>might</em> support a somewhat improved reflections API containing support for:</p>
<ul>
<li>retrieving reflected information as JSON (or rather, as an AS3 object tree)</li>
<li>filtering the request to only retrieve certain types of information</li>
<li>Some more functions that are used internally to construct the result of describeType</li>
</ul>
<p>In other words, it containes improved access to the information available through <code>describeType</code> and nothing more.</p>
<p>All of this functionality resides in the <code>avmplus</code> package in the playerglobal.swc that can be <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2xhYnMuYWRvYmUuY29tL2Rvd25sb2Fkcy9mbGFzaHBsYXllcjEwLmh0bWw=" target='_blank'>downloaded from labs.adobe.com</a>.</p>
<p>This package contains a few methods and an assortment of constants:</p>
<p><img src="/wp-content/uploads/2009/11/reflection-in-fp-10_1.png" alt="reflection-in-fp-10_1" title="reflection-in-fp-10_1" width="298" height="416" class="alignnone size-full wp-image-47" /></p>
<p>The most (or only, really) interesting of these is <code>DescribeType.describeTypeJSON</code>. Using this method, it&#8217;s possible to retrieve reflection data as an object and to filter certain types of information using the constants seen in the image above as bit flags. For example, to get only information about the reflected classes constructor, you use the following code:<br />
<code></p>
<pre>
DescribeType.describeTypeJSON(TargetClass,
	avmplus.INCLUDE_CONSTRUCTOR |
	avmplus.INCLUDE_TRAITS | avmplus.USE_ITRAITS);
</pre>
<p></code></p>
<p>Using the different flags, it&#8217;s possible to request an object containing exactly the information needed for a certain use-case. For example, in <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vdHNjaG5laWRlcmVpdC9Td2lmdFN1c3BlbmRlcnM=" target='_blank'>SwiftSuspenders</a>, I&#8217;d use the following code to get information about a types&#8217; methods, getters/setters, variables and constructor, all with associated metadata:<br />
<code></p>
<pre>
DescribeType.describeTypeJSON(TargetClass,
	avmplus.INCLUDE_CONSTRUCTOR |
	avmplus.INCLUDE_METHODS |
	avmplus.INCLUDE_VARIABLES |
	avmplus.INCLUDE_ACCESSORS |
	avmplus.INCLUDE_METADATA |
	avmplus.HIDE_OBJECT |
	avmplus.INCLUDE_TRAITS | avmplus.USE_ITRAITS);
</pre>
<p></code></p>
<p>The last two flags have to be present to get any meaningful information at all. I honestly have no idea why it&#8217;d be necessary to explicitly state that, yes, I want to include traits &#8211; you know, the mechanism with which the virtual machine links everything to classes and without which a class is completely uninteresting. And don&#8217;t get me started on what <code>avmplus.USE_ITRAITS</code> stands for.</p>
<p>All of this can also be used with the new <code>avmplus.describeType</code>, which is essentially identical to <code>flash.utils.describeType</code> except that it adds an additional parameter for the configuration flags: </p>
<p><code>describeType(target : Object, flags : uint) : XML</code></p>
<h4>Detours</h4>
<p>If you think that that&#8217;s all you need to know about how to use this new API, think again. All of these methods and the <code>DescribeType</code> class are implemented as internal types of the <code>avmplus</code> package and thus not accessible from outside this package. Fortunately, this can be worked around by creating a public wrapper in the same package:</p>
<script src="http://gist.github.com/240357.js"></script>
<h4>Is it all just a mistake?</h4>
<p>There are some things that are a bit fishy about this whole affair: Why is all this functionality internal to the <code>avmplus</code> namespace? And what&#8217;s with the name &#8220;avmplus&#8221; in the first place? Seems like a weird choice to expose the project name of the VM in such a way. Also, the API feels quite rough and exposes functionality that&#8217;s seemingly useless to AS3 developers.</p>
<p>Investigating some more, I discovered how this entire API came to be: It&#8217;s the new implementation of the old <code>describeType</code> functionality in the new version of the ActionScript Virtual Machine, code named Tamarin Tracing. The <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2hnLm1vemlsbGEub3JnL3RhbWFyaW4tcmVkdXgvcmV2LzU1YjMzMmU3MGUxMg==" target='_blank'>log message of the commit which added it</a> sheds some light on this. Since this initial commit, <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2hnLm1vemlsbGEub3JnL3RhbWFyaW4tcmVkdXgvbG9nP3Jldj1kZXNjcmliZXR5cGU=" target='_blank'>a few changes</a> have been made, resulting in <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2hnLm1vemlsbGEub3JnL3RhbWFyaW4tcmVkdXgvZmlsZS84MWIwYjM2ZWU3Y2IvY29yZS9EZXNjcmliZVR5cGUuYXM=" target='_blank'>the current version of the API</a> as exposed in 10.1 beta.</p>
<p>Now here&#8217;s my guess about what&#8217;s happened: When creating the Flash Player beta, some configuration option was set the wrong way, causing the <code>avmplus</code> package to be visible within playerglobal.swc, when it really should be an invisible implementation detail. At the very least, the API in this state probably isn&#8217;t meant for public consumption and might well be removed in the final 10.1 version.</p>
<h4>Now what?</h4>
<p>I&#8217;d really like for this API to stay &#8211; be it in the current state or as a polished version located in the <code>flash.utils</code> package or wherever. Unfortunately, I&#8217;m not sure what to do to that end; Adding a bug to the Flash Player issue tracker to ask that something that&#8217;s available in the beta should stay that way in the final release seems odd.</p>
 <img src="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=42" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.tillschneidereit.de/2009/11/22/improved-reflection-support-in-flash-player-10-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Introducing SwiftSuspenders</title>
		<link>http://www.tillschneidereit.de/2009/09/21/introducing-swiftsuspenders/</link>
		<comments>http://www.tillschneidereit.de/2009/09/21/introducing-swiftsuspenders/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 14:20:43 +0000</pubDate>
		<dc:creator>till</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[di]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[ioc]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[robotlegs]]></category>
		<category><![CDATA[swiftsuspenders]]></category>

		<guid isPermaLink="false">http://www.tillschneidereit.de/?p=28</guid>
		<description><![CDATA[Working with RobotLegs Recently, I started working with the awesome MVCS framework RobotLegs by Shaun Smith. As I&#8217;m not a big fan of the configuration overhead that the Spring framework for Dependency Injection brings with it, I immediately fell in love with the metadata based SmartyPants IOC framework. While I really like the approach and [...]]]></description>
			<content:encoded><![CDATA[<h4>Working with RobotLegs</h4>
<p>Recently, I started working with the awesome MVCS framework <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vZGFyc2Nhbi9yb2JvdGxlZ3Mv" target='_blank'>RobotLegs</a> by <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NoYXVuLmJveWJsYWNrLmNvLnphL2Jsb2cv" target='_blank'>Shaun Smith</a>.</p>
<p>As I&#8217;m not a big fan of the configuration overhead that the Spring framework for <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9EZXBlbmRlbmN5X0luamVjdGlvbg==" target='_blank'>Dependency Injection</a> brings with it, I immediately fell in love with the metadata based <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL3NtYXJ0eXBhbnRzLWlvYy8=" target='_blank'>SmartyPants IOC framework</a>. While I really like the approach and everything worked great, I quickly realized that SmartyPants has two problems: It&#8217;s somewhat slow and, due to some dependencies on the Flex framework, rather big.</p>
<h4>SwiftSuspenders: A fast, lightweight DI solution</h4>
<p>That&#8217;s why I started implementing an ultra lightweight DI framework (which hardly even deserves being called a framework) which then became <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vdHNjaG5laWRlcmVpdC9Td2lmdFN1c3BlbmRlcnM=" target='_blank'>SwiftSuspenders</a>.</p>
<p>SwiftSuspenders implements exactly the functionality needed by RobotLegs, nothing more, but, crucially, nothing less &#8211; and it does so as fast and as lean as possible. By focusing on these needs, I was able to implement a solution that&#8217;s about an order of magnitude faster and weighs only 10% of SmartyPants file size-wise. And yes: Both of these values are <acronym title='Scientific Wild Ass Guess'>SWAGs</acronym> and shouldn&#8217;t be relied on for, well, anything.</p>
<p>Right after I published SwiftSuspenders on GitHub &#8211; as you should do with everything you build that might be of help to your esteemed colleagues &#8211; awesome stuff happened: Shaun Smith immediately forked to project, started fixing bugs and embarrasing mistakes in the documentation and switched most of the <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vZGFyc2Nhbi9yb2JvdGxlZ3NkZW1vcw==" target='_blank'>examples for RobotLegs</a> to using SwiftSuspenders and hinted at creating unit tests &#8211; which I shamefully neglected. Yesterday, he followed up on that and pushed a range of unit tests to a new <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vZGFyc2Nhbi9Td2lmdFN1c3BlbmRlcnNUZXN0cw==" target='_blank'>GitHub project</a>!</p>
<h4>What now?</h4>
<p>Apart from you reading the <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vdHNjaG5laWRlcmVpdC9Td2lmdFN1c3BlbmRlcnMvYmxvYi9tYXN0ZXIvUkVBRE1FLnRleHRpbGU=" target='_blank'>introductory documentation</a>, starting to use SwiftSuspenders and forking it on GitHub? I&#8217;m not sure.</p>
<p>I think that maybe, SwiftSuspenders is pretty much done as it is. SmartyPants still has <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL3NtYXJ0eXBhbnRzLWlvYy93aWtpL1J1bGVz" target='_blank'>some features</a> that SwiftSuspenders doesn&#8217;t, but for now, I don&#8217;t think that those are really essential. Then again, I might implement Provider Binding and Rule Binding sometimes later &#8211; whereas I can almost guarantee that I won&#8217;t implement live bindings.</p>
 <img src="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=28" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.tillschneidereit.de/2009/09/21/introducing-swiftsuspenders/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>On finding Unicode ranges</title>
		<link>http://www.tillschneidereit.de/2009/06/06/on-finding-unicode-ranges/</link>
		<comments>http://www.tillschneidereit.de/2009/06/06/on-finding-unicode-ranges/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 18:14:20 +0000</pubDate>
		<dc:creator>till</dc:creator>
				<category><![CDATA[tools]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[unicode]]></category>

		<guid isPermaLink="false">http://blog.tillschneidereit.de/?p=13</guid>
		<description><![CDATA[Most people don&#8217;t think in code points &#8211; which seems like a pretty good state of the world to me. The only downside is that dealing with fonts for Flash applications and sooner or later the whole web is far more complicated than it would otherwise be. Let me explain. Each time your client requests [...]]]></description>
			<content:encoded><![CDATA[<p>Most people don&#8217;t think in <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9Db2RlX3BvaW50cw==" target=\"_blank\">code points</a> &#8211; which seems like a pretty good state of the world to me.</p>
<p>The only downside is that dealing with fonts for Flash applications and <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cudHlwZWtpdC5jb20vMjAwOS8wNS8yNy9pbnRyb2R1Y2luZy10eXBla2l0Lw==" target=\"_blank\">sooner</a> or <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3dpbmRvd3MvSW50ZXJuZXQtZXhwbG9yZXIvZGVmYXVsdC5hc3B4" target=\"_blank\">later</a> <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy53My5vcmcvVFIvY3NzMy13ZWJmb250cy8jZGF0YXF1YWw=" target=\"_blank\">the whole web</a> is far more complicated than it would otherwise be. Let me explain.</p>
<p>Each time your client requests you use their corporate typface or your designer decides that he absolutely, positively can&#8217;t use a web-safe font for some other reason, you have to somehow get font glyphs to the user that he doesn&#8217;t already have installed on his machine. In html, this is mostly done using png&#8217;s, increasing the download time and the complexity of changing the content. But at least for Flash you can instead embed the glyphs and keep your content as text. How do you do that? You embed the font in your swf and let the Flash player use it to render the content.</p>
<p>Now what you don&#8217;t want to do is embed the whole font, because that&#8217;ll add between several dozen kb and several mb (no kidding!) to your swf. Instead, you&#8217;ll want to embed only the glyphs you need to display your content. And this is where Unicode code points come into the picture: You need to use those to <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2xpdmVkb2NzLmFkb2JlLmNvbS9mbGV4LzMvaHRtbC9oZWxwLmh0bWw/Y29udGVudD1mb250c18wNy5odG1sIzEzMTA3NQ==" target=\"_blank\">tell the compiler which glyphs to embed</a>.</p>
<p>To make a long story short, you&#8217;ll have to find out which Unicode ranges to use to make the compiler embed the glyphs you need. And for that, I&#8217;ve written a small JavaScript tool, which allows you to enter ranges of characters or just a bunch of text, which it then converts into an optimally reduced set of Unicode ranges.</p>
<p><a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy50aWxsc2NobmVpZGVyZWl0LmRlL3VuaWNvZGVfcmFuZ2VfdG9vbC5odG1s">You can find this tool here, I hope you find it useful and not too ugly.</a></p>
 <img src="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=13" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.tillschneidereit.de/2009/06/06/on-finding-unicode-ranges/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introduction</title>
		<link>http://www.tillschneidereit.de/2009/06/06/introduction/</link>
		<comments>http://www.tillschneidereit.de/2009/06/06/introduction/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 16:39:04 +0000</pubDate>
		<dc:creator>till</dc:creator>
				<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://blog.tillschneidereit.de/?p=6</guid>
		<description><![CDATA[To the world at large and you who is reading this in particular: Hello! As seems pertinent for an introductory blog post, let me tell you a little bit about myself and what you can expect to read here in the future. I am a web developer mostly concentrated on solving highly technical, rather abstract [...]]]></description>
			<content:encoded><![CDATA[<p>To the world at large and you who is reading this in particular: Hello!</p>
<p>As seems pertinent for an introductory blog post, let me tell you a little bit about myself and what you can expect to read here in the future.</p>
<p>I am a web developer mostly concentrated on solving highly technical, rather abstract problems using ActionScript and other front end web development technologies. That is to say: I&#8217;m a Flash developer, but in contrast to many of my peers, I&#8217;m not too interested in fancy animations and gratuitous effects. Thus, I&#8217;m drawn not the quickly built, glossy high end projects that dominate the Flash world but to the invisible technical challenges that lie behind each well-built site or application.</p>
<p>I constantly re-evaluate my views on what is a good balance between pragmatism and theoretical soundness in my daily work, trying to stay on the right side of the boundary between writing <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9TcGFnaGV0dGlfY29kZQ==" target=\"_blank\">maintainable code</a> and becoming an <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5qb2Vsb25zb2Z0d2FyZS5jb20vYXJ0aWNsZXMvZm9nMDAwMDAwMDAxOC5odG1s" target=\"_blank\">architecture astronaut</a>.</p>
<p>For the last two and a half years, I&#8217;ve lead the Flash development team at <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5mb3JrLmRlLw==" target=\"_blank\">Fork unstable media</a>. Before that, I worked as a freelancer for about seven years and studied philosophy and an ever-changing assortment of minor fields.</p>
<p>As of July 2009, I will be a co-founder of a yet-to-be-named startup located in Hamburg, Germany. What are we going to do? Mostly two things:<br />
1. Work as a technical sub-contractor for for internet agencies, concentrating on websites, applications and presentations mostly done in Adobe Flash.<br />
2. Try to <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2dpdGh1Yi5jb20vdHNjaG5laWRlcmVpdC9yZXByaXNlL3RyZWUvbWFzdGVy" target=\"_blank\">cross the chasm</a> that lies between the proprietary world of Flash and the standards-based rest of the web-universe. </p>
<p>Should you <a href="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cudGlsbHNjaG5laWRlcmVpdC5kZS9mZWVkL2F0b20v" title=\"or even become a regular\">decide to return</a>, I&#8217;ll tell you a lot more about this second aspect of what we&#8217;re going to do and about why I think that we&#8217;re going to fill an important niche.</p>
 <img src="http://www.tillschneidereit.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=6" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.tillschneidereit.de/2009/06/06/introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
