<?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>Sam&#039;s occasional tech thinkings &#187; Flash</title>
	<atom:link href="http://www.ziazoo.co.uk/blog/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ziazoo.co.uk/blog</link>
	<description>I wish I got it right more!</description>
	<lastBuildDate>Wed, 12 May 2010 13:05:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1-alpha-15359</generator>
		<item>
		<title>The fussy type</title>
		<link>http://www.ziazoo.co.uk/blog/2010/05/12/the-fussy-type/</link>
		<comments>http://www.ziazoo.co.uk/blog/2010/05/12/the-fussy-type/#comments</comments>
		<pubDate>Wed, 12 May 2010 13:05:08 +0000</pubDate>
		<dc:creator>sammy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[dawn]]></category>
		<category><![CDATA[fussy]]></category>
		<category><![CDATA[reflection]]></category>

		<guid isPermaLink="false">http://www.ziazoo.co.uk/blog/?p=323</guid>
		<description><![CDATA[Recently I have been creating a lot more libraries for the flash player that rely on reflection, dawn being one of those.  I found that my reflection requirements where not easily met with the current tools, and so, Fussy was born! Love it or hate it describeType is the only (almost) way to preform reflection on types [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I have been creating a lot more libraries for the flash player that rely on reflection, dawn being one of those.  I found that my reflection requirements where not easily met with the current tools, and so, <a title="Fussy" href="http://github.com/sammyt/fussy">Fussy</a> was born!</p>
<p>Love it or hate it <a title="describe type docs" href="http://livedocs.adobe.com/flex/3/langref/flash/utils/package.html#describeType()">describeType</a> is the only (almost) way to preform reflection on types in actionscript, it returns a XML document containing information about a type in one big dump!  There are a number of excellent and proven libraries out their that can convert that XML dump into a nice OO data structure for you to code against, and it crossed my mind several times while developing dawn that they could make my life a lot easier.  I however, created another reflection library&#8230; what was I thinking!?</p>
<p>Thing is, I have never needed a full strongly typed objected orientated representation of my type!  That would be nice of course, but when I turn to reflection its not to create Method and Parameter objects (I&#8217;d rather the runtime did that to be honest) its because there are specific things about a type that I need to find.</p>
<p>A simple example of what I need reflection for in <a title="dawn github" href="http://github.com/sammyt/dawn">dawn</a> would be to find all the methods in a type that have been decorated with the [Inject] metadata and have one or more arguments.  i.e. all the injectable methods for a Class.  Whether the reflection API gives me a XML document or the same information parsed into types I&#8217;m still going to have develop a way of finding all the methods with Inject metadata.  Maybe that will be with e4x or maybe a loop over some objects (perhaps ensuring that they are methods not variables/accessors), then I will need to check that those methods have some arguments and are thus injectable.  So whatever the means the types reflection information is provided by, the actual logic of my task is entirely up to me to develop and test.</p>
<p>With all that in mind, I built Fussy to be a little different from current reflection libraries (at least those that I know of).  I wanted something to help me query my types, where the query represented whatever I wanted to find out about my types.  To show you what I mean by &#8220;query&#8221;, lets see how fussy allows me to find the injectable methods on a type (the problem from above)</p>
<p>Start by creating a fussy</p>
<pre>var fussy:Fussy = new Fussy()</pre>
<p>Now to describe my query</p>
<pre>var query:IQuery = fussy.query().findMethods().withMetadata("Inject").withArguments();</pre>
<p>Now I can execute that query against any type, and get a array of strongly types Method objects</p>
<pre>var methods:Array = query.forType(MyClass);</pre>
<p>And TA DA! I have strongly typed method objects that satisfy my query for MyClass.</p>
<h3>So what is Fussy?</h3>
<p>Seems quite late in this post to be asking that, but I figured it would be easier to explain after an example.  I call fussy an actionscript reflection query language.  It does of course perform reflection, and parse the result of that reflection into strongly typed objects (only after a query has run) but the main aim of fussy was to make the logic of reflection (the reason why I was reflecting in the first place) easier as faster.</p>
<p>Fussy is a work in progress, I still think I can make the query API more elegant and there are lots more query extensions I can think of to add but its already pretty useful.  It now supplies dawn with all its reflection needs, and what was a huge proportion of dawns code (searching and parsing types) base has been reduced down to <a title="Use of fussy in dawn" href="http://github.com/sammyt/dawn/blob/dev/injector/src/uk/co/ziazoo/injector/impl/FussyTypeDetailsFactory.as" target="_blank">one class</a>.</p>
<p>Got lots more plans for Fussy, including things like metadata schema validation.  I find its pretty useful, so figured someone else might too.</p>
<p>Oh, here is the <a title="fussy on github" href="http://github.com/sammyt/fussy">github</a> link <img src='http://www.ziazoo.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ziazoo.co.uk/blog/2010/05/12/the-fussy-type/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Similar, but different! Private Configurations</title>
		<link>http://www.ziazoo.co.uk/blog/2010/04/26/similar-but-different-private-configurations/</link>
		<comments>http://www.ziazoo.co.uk/blog/2010/04/26/similar-but-different-private-configurations/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 10:33:14 +0000</pubDate>
		<dc:creator>sammy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[dawn]]></category>
		<category><![CDATA[dependency injection]]></category>

		<guid isPermaLink="false">http://www.ziazoo.co.uk/blog/?p=311</guid>
		<description><![CDATA[I&#8217;ve just added another feature to the development branch of dawn, called private configurations. So, what are they, and why did I bother? When I first demoed Dawns injector in a LBi tech talk (almost a year ago now) one clever chap asked how it could be used to create a number of very similar, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just added another feature to the development branch of <a title="dawn on github" href="http://github.com/sammyt/dawn" target="_blank">dawn</a>, called private configurations.  So, what are they, and why did I bother?</p>
<p>When I first demoed Dawns injector in a LBi tech talk (almost a year ago now) one clever chap asked how it could be used to create a number of very similar, but different objects graphs.  I only half got my head around the question at the time, and blurted out something about named injections.  Then sometime (and some beers) later after discussing the problem more it became clear that Dawn didn&#8217;t really have a very elegant solution to the problem.</p>
<p>Time to explain the problem (if you&#8217;ve heard of the robot leg problem, thats the one!).  How can I create two similar object graphs, with some defined differences without having to create new concrete classes to represent those different graphs (thats what you would have todo today btw)? Example time.</p>
<p>Picture a Car class (or just read the one below)</p>
<pre>class Car {

  var engine:Engine;
  var transmission:Transmission;
  var driveLine:IDriveLine;

  public function Car(engine:Engine, transmission:Transmission, driveLine:IDriveLine) {
    // set properties etc //
  }
}</pre>
<p>Engine and Transmission are base classes that have a number of subclasses like PetrolEngine, DieselEngine, AutomaticTransmission and ManualTransmission.  IDriveLine is an interface for the various type of drive the car could have, FrontWheel, RearWheel or FourWheel etc.</p>
<p>The Car class itself is pretty flexible (polymorphism is handy like that), depending on how we construct the car we could get a four wheel drive diesel or an manual transmission, rear wheel drive etc.  In Dawn today you could create a configuration for your Car and install it into the injector.</p>
<pre>class CarConfig implements IConfiguration {

  public function configure(mapper:IMapper):void {
    mapper.map(Engine).to(PetrolEngine);
    mapper.map(Transmission).to(ManualTransmission);
    mapper.map(IDriveLine).to(RearWheel);
  }
}

// then where you create your injector

injector.install(new CarConfig());</pre>
<p>Using the above code, every time you requested for a Car from the injector it would create one with a petrol engine, rear wheel drive and manual transmission. *Every Time* is not what we want though!  Without private configurations we would have to find a way round this, most likely by creating subclasses of Car, such as PetrolCar, which had a constructor parameter of type PetrolEngine, then the same for RearWheelDriveCar, and so on, until we had classes to represent the varieties of object graphs we wanted.</p>
<p>Private configurations are a port of Guices solution (<a title="Guice Win" href="http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/PrivateModule.html" target="_blank">private modules</a>) to the same problem.  They allow you to create groups of mappings that are only available under certain conditions.</p>
<p>Here are a couple of private configurations for the above problem</p>
<pre>class SportyCarConfig implements IPrivateConfiguration {

  public function configure(mapper:IPrivateMapper):void {
    mapper.map(Engine).to(PetrolEngine);
    mapper.map(Transmission).to(ManualTransmission);
    mapper.map(IDriveLine).to(RearWheel);

    mapper.expose(Car, "Sporty");
  }
}</pre>
<pre>class ChelseaTractorConfig implements IPrivateConfiguration {

  public function configure(mapper:IPrivateMapper):void {
    mapper.map(Engine).to(DieselEngine);
    mapper.map(Transmission).to(AutomaticTransmission);
    mapper.map(IDriveLine).to(FourWheel);

    mapper.expose(Car, "4x4");
    mapper.expose(Showroom, "SUV Land");
  }
}</pre>
<p>If the two configurations above were just normal configurations we would have a little problem when we installed then into the injector, since they both create mappings for the same types. So the second configuration to be installed would overwrite the first ones mappings for Engine etc.  Also notice that both the private configurations make one or more calls to an *expose* method.</p>
<p>Installing private configurations is almost identically to installing normal ones:</p>
<pre>var injector:IInjector = Injector.createInjector();

injector.installPrivate(new ChelseaTractorConfig());
injector.installPrivate(new SportyCarConfig());</pre>
<p>Installed private configurations do not overwrite mappings within other normal configurations or private configurations.  So when we install the SportyCarConfig we have not overwritten the settings in the ChelseaTractorConfig.  But how then do we create a car that uses either one of those configurations?  Well thats what the expose method is all about!  Private configurations are private (hidden) until a special exposed mapping is requested from the injector. Once the exposed mapping is requested the mappings within the private configuration become public, and take precedence over any configurations that already exist in the injector.</p>
<p>Lets expand the above code snippet a little to add some default mappings for the IDriveLine, Engine and Transmission.</p>
<pre>var injector:IInjector = Injector.createInjector();

// add default normal car mappings
injector.map(IDriveLine).to(FrontWheel);
injector.map(Engine).to(PetrolEngine);
injector.map(Transmission).to(ManualTransmission);

// install the private configurations
injector.installPrivate(new ChelseaTractorConfig());
injector.installPrivate(new SportyCarConfig());</pre>
<p>Now if we request a Car from the injector (injector.inject(Car)) we will get the default options:</p>
<pre>var car:Car = Car(injector.inject(Car));

trace(car.engine is PetrolEngine) // true
trace(car.driveLine is FrontWheel) // true
trace(car.transmission is ManualTransmission) // true</pre>
<p>To activate a private configuration we must request one of the exposed mappings. Ok, lets create a sporty car.</p>
<pre>var sportyCar:Car = Car(injector.inject(Car, "Sporty"));

trace(sportyCar.engine is PetrolEngine) // true
trace(sportyCar.driveLine is RearWheel) // true
trace(sportyCar.transmission is ManualTransmission) // true</pre>
<p>This time when we asked the injector for a Car we specified the name of the mapping, Sporty.  When the injector sees that we are requesting a mapping of type Car named Sporty, it activates the SportyCarConfig, since that is the *exposed* mapping of the configuration!  It doesn&#8217;t matter that the configuration does not supply a mapping for those options (type Car, named Sporty), it just knows that thats the mapping that unlocks it.</p>
<p>Now we can create a four wheel drive car</p>
<pre>var bigCar:Car = Car(injector.inject(Car, "4x4"));

trace(bigCar.engine is DieselEngine) // true
trace(bigCar.driveLine is FourWheel) // true
trace(bigCar.transmission is AutomaticTransmission) // true</pre>
<p>This time we requested a mapping of type Car named 4&#215;4, which is one of the exposed mappings that activates the ChelseaTractorConfig, so the car we get is provisioned with the mappings found in the ChelseaTractorConfig over the default ones.</p>
<p>And that in a nutshell is what private configurations are all about.  They are a terse and clean way to separate configurations for object graphs which can be activated by special exposed mappings.</p>
<p>This is all tested and committed to the dev branch of Dawn awaiting inclusion in the next release <img src='http://www.ziazoo.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ziazoo.co.uk/blog/2010/04/26/similar-but-different-private-configurations/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>dawn injectors multi-mappings</title>
		<link>http://www.ziazoo.co.uk/blog/2010/04/07/dawn-injectors-multi-mappings/</link>
		<comments>http://www.ziazoo.co.uk/blog/2010/04/07/dawn-injectors-multi-mappings/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 17:48:26 +0000</pubDate>
		<dc:creator>sammy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[dawn]]></category>
		<category><![CDATA[dependency injection]]></category>

		<guid isPermaLink="false">http://www.ziazoo.co.uk/blog/?p=308</guid>
		<description><![CDATA[I just added a new feature to the dev branch of dawn, and since I haven&#8217;t got changelog files yet (bad sammy!!) I figured I would throw a post up so it doesn&#8217;t get lost. Seriously though, there will be a changelog This feature will make the next version of dawn, unless someone convinces me [...]]]></description>
			<content:encoded><![CDATA[<p>I just added a new feature to the <a title="Dev" href="http://github.com/sammyt/dawn/tree/dev" target="_blank">dev branch</a> of dawn, and since I haven&#8217;t got changelog files yet (bad sammy!!) I figured I would throw a post up so it doesn&#8217;t get lost.  Seriously though, there will be a changelog <img src='http://www.ziazoo.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  This feature will make the next version of dawn, unless someone convinces me its bonkers.</p>
<p>I am aiming for dawns injector to be a complete injection solution (shiny bells AND whistles!!). Its not doing bad, but there are a few places that some polish wouldn&#8217;t hurt (better error reporting is a big on one those, its on the way).</p>
<p>This latest change was born out of a request from Mr. <a title="Tink" href="http://www.tink.ws/blog/" target="_blank">Tink</a>.  He wanted to be able to map one class (in singleton scope) to two interfaces. While such an exciting feat was possible previously, it really required knowledge of factory providers (and consequently some custom code).  The new solution is much neater and is as simple as pie&#8230; I hope, O.K. an example:</p>
<p>Lets say I have a model object that implements a simple interface for views (or mediators or whatever said framework fancies).  Simple, except that I also want methods on the object that shouldn&#8217;t be exposed to the view objects, so those can be added to an interface that extends the original one with the extra functionality.</p>
<pre>// for dumb clients things like views etc
interface IAccessData {
  function getMyThing():Thing;
}</pre>
<pre>// for services/commands etc
interface IChangeData extends IAccessData {
  function updateMyThing(wibble:Wibble):void;
}</pre>
<pre>class ThingModel implements IChangeData { ... }</pre>
<p>ThingModel implements both of these interfaces, and I only want one of my models to be created and that same instance to be injected for anything that require either IChangeData or IAccessData.</p>
<p>Previously I would have either had to map to a factory or an instance twice to get this to work, i.e.</p>
<pre>// pray it has no constructor dependencies
var myModel:ThingModel = new ThingModel();
injector.map(IAccessData).toInstance(myModel);
injector.map(IChangeData).toInstance(myModel);</pre>
<p>or</p>
<pre>injector.map(IAccessData).toFactory(ThingModelFactory);
injector.map(IChangeData).toFactory(ThingModelFactory);

class ThingModelFactory { ... blah ... }</pre>
<p>Either way, I have to create <strong>two</strong> mappings and its <strong>not so fun</strong>.  If there was a third interface, or I wanted to also map the concrete class to the same instance it would require a third mapping.</p>
<p>In the next version of dawn (already in the <a title="Dev" href="http://github.com/sammyt/dawn/tree/dev" target="_blank">dev branch</a>) we can just do this</p>
<pre>injector.map(IAccessData).and(IChangeData).to(ThingModel).asSingleton();</pre>
<p>Ta Da!!</p>
<p>Much easier.  Under the hood dawn still creates two mappings, its just sugar coated with the mapping DSL and our lovely &#8216;and&#8217;</p>
<p>Its also &#8220;chainable&#8221; (is that a word? I doubt it).. so if I also wanted classes that depend on the concrete implementation of ThingModel to get the same instance,  I could just add another ‘and’</p>
<pre>injector.map(IAccessData).and(IChangeData).and(ThingModel).to(ThingModel).asSingleton();</pre>
<p>And there you have it, multi-mapping goodness.  There are lots of other things coming soon, I just needed to get that one off my chest.</p>
<p>Also worth checking out is the <a title="Docs for injections" href="http://wiki.github.com/sammyt/dawn/dawninjections">asEagerSinglton</a> scope that just made it into 0.8</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ziazoo.co.uk/blog/2010/04/07/dawn-injectors-multi-mappings/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Woo, I presented at Max</title>
		<link>http://www.ziazoo.co.uk/blog/2008/12/03/woo-i-presented-at-max/</link>
		<comments>http://www.ziazoo.co.uk/blog/2008/12/03/woo-i-presented-at-max/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 15:42:22 +0000</pubDate>
		<dc:creator>sammy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[LBi]]></category>
		<category><![CDATA[PureMVC]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[max]]></category>
		<category><![CDATA[adobe]]></category>

		<guid isPermaLink="false">http://www.ziazoo.co.uk/blog/?p=75</guid>
		<description><![CDATA[I gave my presentation at Adobe Max this morning on building Flex applications with PureMVC.  It was a real privilege to get the opportunity to speak, and I hope those who attended found it useful. I also feel fortunate that I had such a good topic to talk on, as that always makes it easier [...]]]></description>
			<content:encoded><![CDATA[<p>I gave my presentation at Adobe Max this morning on building Flex applications with PureMVC.  It was a real privilege to get the opportunity to speak, and I hope those who attended found it useful.</p>
<p>I also feel fortunate that I had such a good topic to talk on, as that always makes it easier <img src='http://www.ziazoo.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  so many thanks to Cliff for doing such a great job with PureMVC</p>
<p>In case anyone is interested I have uploaded the slides and the sample code&#8230;<br />
<a title="sample code" href="http://www.ziazoo.co.uk/max/SantasList.zip" target="_blank">code</a><a title="presentation" href="http://www.ziazoo.co.uk/max/Samuel_Williams_PureMVCwithFLEX.zip" target="_blank"><br />
slides (keynote)</a><br />
<a title="presentation swf" href="http://www.ziazoo.co.uk/max/Samuel_Williams_PureMVCwithFLEX.swf" target="_blank"> slide (swf)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ziazoo.co.uk/blog/2008/12/03/woo-i-presented-at-max/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Day one at Adobe Max Europe</title>
		<link>http://www.ziazoo.co.uk/blog/2008/12/01/day-one-at-adobe-max-europe/</link>
		<comments>http://www.ziazoo.co.uk/blog/2008/12/01/day-one-at-adobe-max-europe/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 15:33:33 +0000</pubDate>
		<dc:creator>sammy</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[max]]></category>
		<category><![CDATA[iplayer]]></category>

		<guid isPermaLink="false">http://www.ziazoo.co.uk/blog/?p=71</guid>
		<description><![CDATA[The highlight of the first day was always going to be the keynote. Whilst there was nothing revelatory, it was inspiring to see Adobe showcase their products. This was perhaps helped by the impressive circa 30m wide video wall. I particularly enjoyed the talk given by the BBC. The somewhat muted service they provide for [...]]]></description>
			<content:encoded><![CDATA[<p>The highlight of the first day was always going to be the keynote. Whilst there was nothing revelatory, it was inspiring to see Adobe showcase their products. This was perhaps helped by the impressive circa 30m wide video wall.</p>
<p>I particularly enjoyed the talk given by the BBC. The somewhat muted service they provide for non-Windows users has always been a bug bearer for me. I was pleased to hear though that they have been handed a solution to their licensing issues by the DRM support in Air 1.5. This means we can now have the same download manager facilities, along with some notification goodness, wrapped up in a shiny cross-platform AIR app &#8211; result.</p>
<p>Another demo that caught my eye was a news reader for the New York Times.  I was shown the current New York Times news reader about a year ago. It’s a chunky WPF application, so no good to me in Unix land.  What it did do very nicely however was display column based text in whatever sized window you might have the app open in.  That same functionally is now available (or soon to be, I’m not sure if it’s out yet) in an Air application.  This is no doubt made a lot easier by the new text rendering engine within Flash 10, which allows text to flow between containers.  For some more info check out this <a title="CNet article" href="http://news.cnet.com/8301-17939_109-10098614-2.html" target="_blank">report </a></p>
<p>Ohh, and for general information about the Keynotes go <a title="adobe keynote info" href="http://www.adobe.com/go/keynote" target="_blank">here</a></p>
<p>ta ta</p>
<p>ps, I&#8217;m also posting on the LBi blog, check it out <a title="LBi RIA blog" href="http://rich.lbi.co.uk/" target="_blank">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ziazoo.co.uk/blog/2008/12/01/day-one-at-adobe-max-europe/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Project Snooze</title>
		<link>http://www.ziazoo.co.uk/blog/2008/11/01/project-snooze/</link>
		<comments>http://www.ziazoo.co.uk/blog/2008/11/01/project-snooze/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 17:17:56 +0000</pubDate>
		<dc:creator>sammy</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Snooze]]></category>
		<category><![CDATA[actionscript]]></category>

		<guid isPermaLink="false">http://www.ziazoo.co.uk/blog/?p=56</guid>
		<description><![CDATA[A little while back I started a project called Project Snooze.  My idea was to port the basic functionalty of Hibernate to Adobe AIR, in the hope of making working with SQLite in AIR a much more fun/agile process.  I got quite a way with it back when I was commuting as I worked on [...]]]></description>
			<content:encoded><![CDATA[<p>A little while back I started a project called Project Snooze.  My idea was to port the basic functionalty of <a title="hibernate.org" href="http://www.hibernate.org" target="_blank">Hibernate</a> to Adobe AIR, in the hope of making working with SQLite in AIR a much more fun/agile process.  I got quite a way with it back when I was commuting as I worked on the train.  Since then I have let it slip a little but now I&#8217;ve decided its about time I finished what I started!</p>
<p>The basic idea is that with a nominal amout of metadata Snooze can create your database, and perform CRUD operations for your objects.  It supports the most common relationship types, one-to-one, one-to-many, and many-to-many, and I am planning to build a querying api into it.</p>
<p>If your interested in finding out more about it you can check it out on <a title="snooze" href="http://github.com/sammyt/snooze/tree/master" target="_blank">github</a>&#8230; where hopfully you will see a lot of commits from this lazy geek!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ziazoo.co.uk/blog/2008/11/01/project-snooze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Cairngorm code example</title>
		<link>http://www.ziazoo.co.uk/blog/2008/01/11/flex-cairngorm-code-example/</link>
		<comments>http://www.ziazoo.co.uk/blog/2008/01/11/flex-cairngorm-code-example/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 12:17:25 +0000</pubDate>
		<dc:creator>sammy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>

		<guid isPermaLink="false">http://www.ziazoo.co.uk/blog/index.php/2008/01/11/flex-cairngorm-code-example/</guid>
		<description><![CDATA[Over the Christmas break I finally managed to claw an afternoon of free time together to knock up a little example application. Why bother? Well just about every client I go to meet and potentially work with wants to see some example code first… now since writing code is my job you wouldn’t think that [...]]]></description>
			<content:encoded><![CDATA[<p>Over the Christmas break I finally managed to claw an afternoon of free time together to knock up a little example application. Why bother? Well just about every client I go to meet and potentially work with wants to see some example code first… now since writing code is my job you wouldn’t think that was a very difficult task, but its not quite that simple. Often the projects I work on are very large, worked on by multiple programmers, and dependent on some server side code to run. Even when the projects are small enough to send to someone as an example I’m not even sure I have the legal right to-do so!</p>
<p>With the above in mind I though it was about time I created a little application that I could send around to plug my abilities etc, and you can see it <a href="http://www.ziazoo.co.uk/demos/snappyviewer/Main.html">here</a></p>
<p><em><strong>A little about how it works</strong></em></p>
<p>The app is built using Flex 3.0 and the Cairngorm framework. Data is pulled in via XML, and displayed using a simple image viewing component I created.</p>
<p><em><strong>Why use Flex</strong></em></p>
<p>Flex enables me to build the same breed of applications we have all been building with Flash for sometime&#8230; only with Flex we can do faster, more reliably, with a fuller api and using a decent IDE&#8230; whats not to like?</p>
<p><em><strong>Why Cairngorm</strong></em></p>
<p>Cairngorm is all about building complex RIA&#8217;s in a consistent MVC manner&#8230; adobe puts it like this &#8220;The Cairngorm microarchitecture is intended as a framework for Enterprise RIA developers&#8221;. As you may have noticed the little image viewer I&#8217;m using as my example code is no enterprise application, in fact it only has a couple of user gestures, I&#8217;m just trying to demonstrate my familiarity with the framework.</p>
<p>I think Cairngorm is very important to the Flex developer community, it offers a well proven methodology for building applications, which separates concerns, promotes testability and leads to very predictable, scalable solutions.</p>
<p><em><strong>About the view</strong></em></p>
<p>I wanted to build a little set of classes that would allow me to display items (which could be anything from products to images etc.) in a number of ways, and was simple to extend. The snappyviewer, which is the name of the component displaying the images is an implementation of those classes.</p>
<p>The main classes the view is built around are two interfaces IItemView and IItemDisplayer.</p>
<p>Both interfaces contain a function named display. The display function in IItemVIew is intended to delegate the displaying of items to the IItemDisplayer via composition. The display function in IItemDisplayer is implemented for various display types, ie, displaying items in a grid, or in a row (GridItemDisplayer &amp; SlideItemDisplayer).</p>
<p>To change which type of view the IItemView uses I can set the IItemDisplayer though the dispayer setter function in IItemVIew and hey presto, the view is updated.</p>
<p>You can check out the code by right clicking on the application and selecting Source View.</p>
<p>Any feedback welcome <img src='http://www.ziazoo.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>ps.. you can see the application <a href="http://www.ziazoo.co.uk/demos/snappyviewer/Main.html">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ziazoo.co.uk/blog/2008/01/11/flex-cairngorm-code-example/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Flex fights back with thermo</title>
		<link>http://www.ziazoo.co.uk/blog/2007/10/04/flex-fights-back-with-thermo/</link>
		<comments>http://www.ziazoo.co.uk/blog/2007/10/04/flex-fights-back-with-thermo/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 09:32:17 +0000</pubDate>
		<dc:creator>sammy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Thermo]]></category>
		<category><![CDATA[actionscript]]></category>

		<guid isPermaLink="false">http://www.ziazoo.co.uk/blog/index.php/2007/10/04/flex-fights-back-with-thermo/</guid>
		<description><![CDATA[Over the last few months I have been keeping my fingers crossed for some real big changes in the Adobe Flex camp, they just arrived! Since I first heard about Flex over a year ago and started working with it I have been very impressed. It’s a great platform for developers to create amazing web [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last few months I have been keeping my fingers crossed for some real big changes in the Adobe Flex camp, they just arrived!</p>
<p>Since I first heard about Flex over a year ago and started working with it I have been very impressed. It’s a great platform for developers to create amazing web applications on… but for me there has been one big elephant in the room, and that’s the designer developer workflow!</p>
<p>We’ve all seen <a href="http://www.microsoft.com/expression/products/overview.aspx?key=blend" title="MS Blend" target="_blank">Blend</a> combined with XAML now, and if you&#8217;re anything like me the first thing you thought when you saw it was <em>why on earth cant Adobe do that with mxml!!!!</em>  And now it looks like they have with the project codenamed <a href="http://labs.adobe.com/wiki/index.php/Thermo" title="Thermo" target="_blank">Thermo</a>.</p>
<p><a href="http://www.ziazoo.co.uk/blog/wp-content/uploads/2007/10/thermoicon.png" title="Adobe Thermo Logo"><img src="http://www.ziazoo.co.uk/blog/wp-content/uploads/2007/10/thermoicon.thumbnail.png" alt="Adobe Thermo Logo" /></a></p>
<p>Thermo allows designers to use the tools they love (like the mouse&#8230;) and to draw the application as that want it. Thermo will then convert, on the fly (or when imported from a program like photoshop) the graphics into mxml! Perfect! It even allows for visual tweaking of motions and transitions. Its looks the the application I have been dreaming the Flash IDE would become for ages!</p>
<p>I personally can&#8217;t wait to see what comes of this… my hope (and this may be pie in the sky right now) is that we can in the not too distant future say goodbye to the Flash IDE (well, us developers at least). This would enable developers to focus on building applications rather that bullying design into behaving like one!</p>
<p>For more info on thermo check out this <a href="http://www.peterelst.com/blog/2007/10/02/adobe-max-chicago-thermo/" title="Recorded demo">demo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ziazoo.co.uk/blog/2007/10/04/flex-fights-back-with-thermo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>yay for events in the display list hierarchies</title>
		<link>http://www.ziazoo.co.uk/blog/2007/06/16/yay-for-events-in-the-display-list-hierarchies/</link>
		<comments>http://www.ziazoo.co.uk/blog/2007/06/16/yay-for-events-in-the-display-list-hierarchies/#comments</comments>
		<pubDate>Sat, 16 Jun 2007 13:21:18 +0000</pubDate>
		<dc:creator>sammy</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[actionscript]]></category>

		<guid isPermaLink="false">http://www.ziazoo.co.uk/blog/index.php/2007/06/16/yay-for-events-in-the-display-list-hierarchies/</guid>
		<description><![CDATA[The new event model in actionscript 3 is glorious! At first I didn&#8217;t really appreciate how useful is was&#8230; I was pleased to see that you could create custom events as this, among other things, allows you to send custom objects in events without losing strong typing. Though it wasn&#8217;t until I came to understand [...]]]></description>
			<content:encoded><![CDATA[<p>The new event model in actionscript 3 is glorious!  At first I didn&#8217;t really appreciate how useful is was&#8230; I was pleased to see that you could create custom events as this, among other things, allows you to send custom objects in events without losing strong typing.  Though it wasn&#8217;t until I came to understand the event flow in display lists that it made a massive difference to my code&#8230; (my thanks to Colin Moock for <a href="http://safari.oreilly.com/0596526946">this book</a>, that really helped me get to grips with events in as3)&#8230; when you dispatch an event in a display object you can specify a variable in the event constructor (bubbles) which causes the event to propagate through the display list hierarchy, enabling you to listen for events dispatched by DisplayObjects you do not have a direct reference to. This massively helps me centralising my code, de-coupling my code and cuts down on boring code repetition.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ziazoo.co.uk/blog/2007/06/16/yay-for-events-in-the-display-list-hierarchies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
