<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3966284501234074255</id><updated>2011-07-28T21:53:24.954-07:00</updated><category term='actions manager'/><category term='flex'/><category term='actions framework'/><title type='text'>RIA Workshop</title><subtitle type='html'>Peter's Flash/Flex Rich Aplication Developement blog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ria-workshop.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ria-workshop.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Peter Gwiazda</name><uri>http://www.blogger.com/profile/16147391553019077931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3966284501234074255.post-4690858291895855783</id><published>2009-10-29T00:42:00.000-07:00</published><updated>2009-10-29T00:58:54.476-07:00</updated><title type='text'>GradientCanvas vs. Degrafa test</title><content type='html'>&lt;p&gt;I've decided to do some test of performance of &lt;a href="http://afoucal.free.fr/wp-content/GradientCanvas/"&gt;GradientCanvas&lt;/a&gt; compared to &lt;a href="http://degrafa.org/"&gt;Degrafa&lt;/a&gt; capabilites. The test is very simple. Create 1000 of Canvas items - rounded rectangles with gradient fills. It's common usage for buttons, item renderers etc. It look something like:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_WoCila9RpFo/SulISEfQbgI/AAAAAAAAAMQ/Ggy10-U_qTY/s1600-h/testScreen.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 186px;" src="http://4.bp.blogspot.com/_WoCila9RpFo/SulISEfQbgI/AAAAAAAAAMQ/Ggy10-U_qTY/s320/testScreen.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5397925103659937282" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;GradientCanvas profiling screenshot:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_WoCila9RpFo/SulI1IPc5LI/AAAAAAAAAMY/bs1C1Vsy-pc/s1600-h/gradientCanvasTest.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 212px;" src="http://4.bp.blogspot.com/_WoCila9RpFo/SulI1IPc5LI/AAAAAAAAAMY/bs1C1Vsy-pc/s320/gradientCanvasTest.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5397925705962808498" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Degrafa profiling screenshot:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_WoCila9RpFo/SulKDu8jZMI/AAAAAAAAAMg/Zt_cickwbdA/s1600-h/degrafatest.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 212px;" src="http://1.bp.blogspot.com/_WoCila9RpFo/SulKDu8jZMI/AAAAAAAAAMg/Zt_cickwbdA/s320/degrafatest.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5397927056382321858" /&gt;&lt;/a&gt;&lt;br /&gt;It looks like degrafa creates lots of heavy objects. Degrafa is 3.5 times heavier than GradientCanvas. I expected the opposite. You can &lt;a href="http://tester.done.pl/pgw/DegrafaVsGrCanvas.zip"&gt;download the source&lt;/a&gt; and try. Maybe my degrafa code is sloppy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3966284501234074255-4690858291895855783?l=ria-workshop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ria-workshop.blogspot.com/feeds/4690858291895855783/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3966284501234074255&amp;postID=4690858291895855783' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/4690858291895855783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/4690858291895855783'/><link rel='alternate' type='text/html' href='http://ria-workshop.blogspot.com/2009/10/gradientcanvas-vs-degrafa-test.html' title='GradientCanvas vs. Degrafa test'/><author><name>Peter Gwiazda</name><uri>http://www.blogger.com/profile/16147391553019077931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_WoCila9RpFo/SulISEfQbgI/AAAAAAAAAMQ/Ggy10-U_qTY/s72-c/testScreen.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3966284501234074255.post-3961886681760967882</id><published>2009-09-09T03:12:00.000-07:00</published><updated>2009-09-09T03:13:32.535-07:00</updated><title type='text'>Flash SEO Tool</title><content type='html'>I've created a kind of idea to make google index flash sites. See it here:&lt;br /&gt;&lt;a href="http://flashseotool.com/"&gt;http://flashseotool.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3966284501234074255-3961886681760967882?l=ria-workshop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ria-workshop.blogspot.com/feeds/3961886681760967882/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3966284501234074255&amp;postID=3961886681760967882' title='Komentarze (1)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/3961886681760967882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/3961886681760967882'/><link rel='alternate' type='text/html' href='http://ria-workshop.blogspot.com/2009/09/flash-seo-tool.html' title='Flash SEO Tool'/><author><name>Peter Gwiazda</name><uri>http://www.blogger.com/profile/16147391553019077931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3966284501234074255.post-4880609229601745710</id><published>2009-04-30T06:46:00.000-07:00</published><updated>2009-05-12T06:44:33.189-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><title type='text'>Custom color error in Flex RichTextEditor workaround.</title><content type='html'>There's a problem with RichTextEditor in Flex. Hitting 'Enter' in color picker (to apply custom color) deletes currently selected text (described &lt;a href="http://bugs.adobe.com/jira/browse/SDK-14592"&gt;here&lt;/a&gt; ). There's a simple workaround:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" initialize="init()" xmlns:local="*"&amp;gt;&lt;br /&gt;&amp;lt;mx:Script&amp;gt;&lt;br /&gt; &amp;lt;![CDATA[&lt;br /&gt;  import mx.events.DropdownEvent;&lt;br /&gt;  private function init():void&lt;br /&gt;  {&lt;br /&gt;   rte.colorPicker.addEventListener(DropdownEvent.OPEN, colorPickerOpen);&lt;br /&gt;   rte.colorPicker.addEventListener(DropdownEvent.CLOSE, colorPickerClose);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  private function colorPickerOpen(event:Event):void&lt;br /&gt;  {&lt;br /&gt;   this.rte.textArea.editable = false;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  private function colorPickerClose(event:Event):void&lt;br /&gt;  {&lt;br /&gt;   this.rte.textArea.editable = true;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt; ]]&amp;gt;&lt;br /&gt;&amp;lt;/mx:Script&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;mx:RichTextEditor id="rte" text="asdfasdf" width="100%" height="100%"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/mx:Application&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3966284501234074255-4880609229601745710?l=ria-workshop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ria-workshop.blogspot.com/feeds/4880609229601745710/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3966284501234074255&amp;postID=4880609229601745710' title='Komentarze (1)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/4880609229601745710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/4880609229601745710'/><link rel='alternate' type='text/html' href='http://ria-workshop.blogspot.com/2009/04/custom-color-error-in-flex.html' title='Custom color error in Flex RichTextEditor workaround.'/><author><name>Peter Gwiazda</name><uri>http://www.blogger.com/profile/16147391553019077931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3966284501234074255.post-6171027692675250861</id><published>2008-11-19T00:52:00.000-08:00</published><updated>2008-11-19T00:55:10.884-08:00</updated><title type='text'>Home-made gantt chart example</title><content type='html'>&lt;p&gt;Gantt chart example made on Adobe LifeCycle ES&lt;/p&gt;&lt;p&gt;http://83.142.206.74:8080/OnlineGanttDS/&lt;/p&gt;&lt;p&gt;login as admin/admin&lt;/p&gt;&lt;p&gt;Watch real-time data syncronisation (login twice in different browsers) as a use of Data Management Services.&lt;/p&gt;&lt;p&gt;Gantt-chart is totally home-made (maybe it'll be open-source).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3966284501234074255-6171027692675250861?l=ria-workshop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ria-workshop.blogspot.com/feeds/6171027692675250861/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3966284501234074255&amp;postID=6171027692675250861' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/6171027692675250861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/6171027692675250861'/><link rel='alternate' type='text/html' href='http://ria-workshop.blogspot.com/2008/11/home-made-gantt-chart-example.html' title='Home-made gantt chart example'/><author><name>Peter Gwiazda</name><uri>http://www.blogger.com/profile/16147391553019077931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3966284501234074255.post-6915162139763153798</id><published>2008-11-17T00:57:00.000-08:00</published><updated>2008-11-17T01:02:57.056-08:00</updated><title type='text'>Seam Carving content aware scaling in Photoshop CS4</title><content type='html'>&lt;p&gt;Heard about famous "Content Aware Scaling" in Photoshop CS4 ?&lt;/p&gt;&lt;p&gt;Well... it was introduced some time ago in Gimp as "Liquid scaling" here http://liquidrescale.wikidot.com/ or as a simple scaling tool here http://code.google.com/p/seam-carving-gui/&lt;/p&gt;&lt;p&gt;Both implementations are totally free and are using the same Seam Carving algorithm - watch the video here http://www.seamcarving.com/&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can find an Action Script implementation here &lt;/p&gt;&lt;p&gt;http://www.quasimondo.com/archives/000652.php&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3966284501234074255-6915162139763153798?l=ria-workshop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ria-workshop.blogspot.com/feeds/6915162139763153798/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3966284501234074255&amp;postID=6915162139763153798' title='Komentarze (1)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/6915162139763153798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/6915162139763153798'/><link rel='alternate' type='text/html' href='http://ria-workshop.blogspot.com/2008/11/seam-carving-content-aware-scaling-in.html' title='Seam Carving content aware scaling in Photoshop CS4'/><author><name>Peter Gwiazda</name><uri>http://www.blogger.com/profile/16147391553019077931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3966284501234074255.post-896577471285962945</id><published>2008-10-03T14:01:00.000-07:00</published><updated>2008-10-03T14:04:54.735-07:00</updated><title type='text'>Legato Framework on googlecode</title><content type='html'>I've decided to put the framework described some posts ago as Legato Framework on google code - &lt;a href="http://code.google.com/p/legato/"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3966284501234074255-896577471285962945?l=ria-workshop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ria-workshop.blogspot.com/feeds/896577471285962945/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3966284501234074255&amp;postID=896577471285962945' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/896577471285962945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/896577471285962945'/><link rel='alternate' type='text/html' href='http://ria-workshop.blogspot.com/2008/10/legato-framework-on-googlecode.html' title='Legato Framework on googlecode'/><author><name>Peter Gwiazda</name><uri>http://www.blogger.com/profile/16147391553019077931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3966284501234074255.post-1278987906469759227</id><published>2008-09-13T01:25:00.000-07:00</published><updated>2008-09-13T01:30:19.059-07:00</updated><title type='text'>IE, cahce and Event.COMPLETE</title><content type='html'>There's a problem with Interenet Explorer (6 or 7) and FlashPlayer 9. It seems that the loaderInfo doesn't dispath Event.COMPLETE when the movie is opened from browser cache on IE. Work fine with FF and Opera. What is more it works fine on latest Flash Player (9.0.124) but the problem exits on older (9.0.24 or something).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3966284501234074255-1278987906469759227?l=ria-workshop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ria-workshop.blogspot.com/feeds/1278987906469759227/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3966284501234074255&amp;postID=1278987906469759227' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/1278987906469759227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/1278987906469759227'/><link rel='alternate' type='text/html' href='http://ria-workshop.blogspot.com/2008/09/ie-cahce-and-eventcomplete.html' title='IE, cahce and Event.COMPLETE'/><author><name>Peter Gwiazda</name><uri>http://www.blogger.com/profile/16147391553019077931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3966284501234074255.post-1587686800997631072</id><published>2008-07-04T00:42:00.000-07:00</published><updated>2008-07-04T03:24:39.375-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='actions framework'/><title type='text'>Depedency Injection Container for Flex - part 2 Metadata Injection</title><content type='html'>As someone knows, there is a way to preserve custom metadata in Flex for runtime. The easiest way is to put for example:&lt;br /&gt;-keep-as3-metadata+=Inject&lt;br /&gt;in addidtional compiler arguments.&lt;br /&gt;&lt;br /&gt;I found a way to use it for easy injection. Here's a proof of concept. I think &lt;a href="http://tester.done.pl/pgw/blog/MetaDI/"&gt;the source &lt;/a&gt;is worth more than words.&lt;br /&gt;This part :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;//Injection by id&lt;br /&gt;[Inject(id="component1")]&lt;br /&gt;public var a:Object ;&lt;br /&gt;&lt;br /&gt;//injection by id simpler&lt;br /&gt;[Inject("component2")]&lt;br /&gt;public var b:Object;&lt;br /&gt;&lt;br /&gt;//injection by type          &lt;br /&gt;[Inject(type="poc.SimpleComponent2")]&lt;br /&gt;public var c:SimpleComponent2;&lt;br /&gt;&lt;br /&gt;//Injection by type guess&lt;br /&gt;[Inject]&lt;br /&gt;public var d:ExplicitCommandImpl;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//Injection by type works with interfaces, basic classess too&lt;br /&gt;[Inject]&lt;br /&gt;public var e:IExplicitCommand;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private var _f:Object;&lt;br /&gt;        &lt;br /&gt;//Works with getters and setters too&lt;br /&gt;//Inject with given context&lt;br /&gt;[Inject(type="poc.SimpleComponent2", context="someContextName")]&lt;br /&gt;public function get f():Object&lt;br /&gt;{&lt;br /&gt;  return _f;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public function set f(val:Object):void&lt;br /&gt;{&lt;br /&gt;  _f = val;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;does the trick.&lt;br /&gt;&lt;br /&gt;The final trace is :&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;a [object ExplicitCommandImpl]&lt;br /&gt;b [object SimpleComponent]&lt;br /&gt;c [object SimpleComponent2]&lt;br /&gt;d [object ExplicitCommandImpl]&lt;br /&gt;e [object ExplicitCommandImpl]&lt;br /&gt;f [object SimpleComponent2]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I think It's an easy way to join application components. The injected components are get by methods mentioned in part2 : &lt;code&gt;getComponentById&lt;/code&gt; and &lt;code&gt;getComponentByInterface&lt;/code&gt; so it's just a shortcut.&lt;br /&gt;&lt;br /&gt;Just the -keep-as3-metadata part is tricky during release build. There's a &lt;a href="https://bugs.adobe.com/jira/browse/FB-12296"&gt;bug on Adobe bugtracker.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3966284501234074255-1587686800997631072?l=ria-workshop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ria-workshop.blogspot.com/feeds/1587686800997631072/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3966284501234074255&amp;postID=1587686800997631072' title='Komentarze (2)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/1587686800997631072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/1587686800997631072'/><link rel='alternate' type='text/html' href='http://ria-workshop.blogspot.com/2008/07/actions-framework-for-flex-part-3.html' title='Depedency Injection Container for Flex - part 2 Metadata Injection'/><author><name>Peter Gwiazda</name><uri>http://www.blogger.com/profile/16147391553019077931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3966284501234074255.post-4561560897981825027</id><published>2008-07-03T22:13:00.000-07:00</published><updated>2008-07-04T03:23:52.014-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='actions framework'/><title type='text'>Depedency Injection Container for Flex - part 1</title><content type='html'>&lt;p&gt;It's an  implementation of the pattern as described by Martin Fowler  in “Inversion of Control Containers and the Dependency Injection pattern”. It contains setter injection and constructor injection  implementations. Main ideas are to :&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;connect simple components in depedency injection container,&lt;/li&gt;&lt;li&gt;make use of Flex features e.g. use MXML files (with code completition etc.) rather than external XML files for depedency injection configuration,&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This container can be used also as a service locator.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_WoCila9RpFo/SG2zDtOClLI/AAAAAAAAAC4/IPw2kt-FAgI/s1600-h/diagram3.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_WoCila9RpFo/SG2zDtOClLI/AAAAAAAAAC4/IPw2kt-FAgI/s320/diagram3.gif" alt="" id="BLOGGER_PHOTO_ID_5219024419451737266" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Simple example of configuration:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;InjectionContainer xmlns="edu.ics.framework.injection.&lt;br /&gt;xmlns:mx="http://www.adobe.com/2006/mxml"&lt;br /&gt;xmlns:actions="edu.ics.framework.actions.&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;DIComponent id="component1" scope="application" componentClass="{ExplicitCommandImpl}"&lt;br /&gt; &amp;gt;&lt;br /&gt;&amp;lt;constructorParams&amp;gt;&lt;br /&gt; &amp;lt;mx:Array&amp;gt;&lt;br /&gt;  &amp;lt;mx:String&amp;gt;string parameter&amp;lt;/mx:String&amp;gt;&lt;br /&gt;  &amp;lt;mx:Number&amp;gt;2&amp;lt;/mx:Number&amp;gt;&lt;br /&gt;  &amp;lt;mx:Object&amp;gt;{component2}&amp;lt;/mx:Object&amp;gt;&lt;br /&gt; &amp;lt;/mx:Array&amp;gt;&lt;br /&gt;&amp;lt;/constructorParams&amp;gt;&lt;br /&gt;&amp;lt;/DIComponent&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;DIComponent id="component2" scope="application" componentClass="{SimpleComponent}" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;actions:AbstractAction id="action1" name="addAction" /&amp;gt;&lt;br /&gt;&amp;lt;actions:AbstractAction id="action2" name="copyAction"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/InjectionContainer&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Every child object is registered as a component with it's &lt;code&gt;id&lt;/code&gt; as a key.&lt;br /&gt;Actually as &lt;code&gt;InjectionContainer&lt;/code&gt; uses reflection, every public and bindable&lt;br /&gt;property is registered.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Using DIComponent &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;DIComponent is basig object for creating components. Basic attributes are:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;&lt;code&gt;id&lt;/code&gt; - must be specified to identify component; used as a key;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;code&gt;scope&lt;/code&gt; - scope of component; three values are allowed:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;application&lt;/i&gt; : only one component instance exists for whole application,&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;context&lt;/i&gt; : there is one component instance for every context, &lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt;instance&lt;/i&gt; : new instance is created every time component is requested. &lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Default value is &lt;i&gt;application&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;code&gt;componentClass&lt;/code&gt; - a class of component. Remember to use Class object, not just class name.&lt;br /&gt;As in the example &lt;code&gt;componentClass="{SimpleComponent}"&lt;/code&gt; .&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;code&gt;setterTemplate&lt;/code&gt; - object that contains params to inject in created component instance&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;code&gt;constructorParams&lt;/code&gt; - array of construcotor parameters&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;Any other attribute of &lt;code&gt;DIComponent&lt;/code&gt; tag will be used for setter injection.&lt;br /&gt;These parameters overrides &lt;code&gt;setterTemplate&lt;/code&gt; object properties.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;DIComponent id="component2" scope="application" componentClass="{SimpleComponent}" /&amp;gt;&lt;br /&gt;&amp;lt;DIComponent id="component3" scope="application" componentClass="{SimpleComponent2}" param1="param1Val" param2="99" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;code&gt;setterTemplate&lt;/code&gt; is used to pass object, that contains params to inject in created component instance.&lt;br /&gt;&lt;br /&gt;Example of usage:&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;mx:Script&amp;gt;&lt;br /&gt;&amp;lt;![CDATA[&lt;br /&gt;private var setterTemplate3:Object =&lt;br /&gt;{&lt;br /&gt; param1:"param1Value",&lt;br /&gt; param2:99&lt;br /&gt;}&lt;br /&gt;]]&amp;gt;&lt;br /&gt;&amp;lt;/mx:Script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;DIComponent id="component3" scope="application" componentClass="{SimpleComponent2}" setterTemplate="{setterTemplate3}" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The example above makes the same, that declaration in previous example:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;DIComponent id="component3" scope="application" componentClass="{SimpleComponent2}" param1="param1Val" param2="99" /&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;which is simpler and preferred method.&lt;br /&gt;In these examples &lt;code&gt;SimpleComponent2&lt;/code&gt; can be:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;&lt;br /&gt;package poc&lt;br /&gt;{&lt;br /&gt;  public class SimpleComponent2&lt;br /&gt;  {&lt;br /&gt;     public var param1:String;&lt;br /&gt;&lt;br /&gt;     private var _param2:Number;&lt;br /&gt;&lt;br /&gt;     public function set param2(val:Number):void&lt;br /&gt;     {&lt;br /&gt;        this._param2 = val;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     public function get param2():Number&lt;br /&gt;     {&lt;br /&gt;        return this.param2;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Constructor injection&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can use &lt;code&gt;constructorParams&lt;/code&gt; property to pass array of parameters to constructor.&lt;br /&gt;You can pass up to 15 parameters. Example of usage :&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;DIComponent id="component1" scope="application" componentClass="{ExplicitCommandImpl}"&lt;br /&gt;&amp;gt;&lt;br /&gt;&amp;lt;constructorParams&amp;gt;&lt;br /&gt;&amp;lt;mx:Array&amp;gt;&lt;br /&gt; &amp;lt;mx:String&amp;gt;string parameter&amp;lt;/mx:String&amp;gt;&lt;br /&gt; &amp;lt;mx:Number&amp;gt;2&amp;lt;/mx:Number&amp;gt;&lt;br /&gt; &amp;lt;mx:Object&amp;gt;{component2}&amp;lt;/mx:Object&amp;gt;&lt;br /&gt;&amp;lt;/mx:Array&amp;gt;&lt;br /&gt;&amp;lt;/constructorParams&amp;gt;&lt;br /&gt;&amp;lt;/DIComponent&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Simple objects&lt;/b&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;actions:AbstractAction id="action1" name="addAction" /&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Objects like this are registered with &lt;code&gt;WrapperComponent&lt;/code&gt; . The scope of the component is always&lt;br /&gt;&lt;i&gt;application&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Injection and binding&lt;/b&gt;&lt;br /&gt;To perform injection use Flex binding. You can put binded component into dynamic parameters, setter template or construcor parameters.&lt;br /&gt;Injected object will be resolved during creaton of requested component according to its &lt;code&gt;scope&lt;/code&gt; attribute.&lt;br /&gt;In case of &lt;i&gt;context&lt;/i&gt; scope, the scope name is propagated from parent component request.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3966284501234074255-4561560897981825027?l=ria-workshop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ria-workshop.blogspot.com/feeds/4561560897981825027/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3966284501234074255&amp;postID=4561560897981825027' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/4561560897981825027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/4561560897981825027'/><link rel='alternate' type='text/html' href='http://ria-workshop.blogspot.com/2008/07/actions-framework-for-flex-part-2.html' title='Depedency Injection Container for Flex - part 1'/><author><name>Peter Gwiazda</name><uri>http://www.blogger.com/profile/16147391553019077931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_WoCila9RpFo/SG2zDtOClLI/AAAAAAAAAC4/IPw2kt-FAgI/s72-c/diagram3.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3966284501234074255.post-8065386858208924060</id><published>2008-07-03T13:13:00.001-07:00</published><updated>2008-07-04T03:22:33.572-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='actions manager'/><title type='text'>Tasks and Actions Management for Flex</title><content type='html'>&lt;p&gt;I'd like to show some concepts of creating simple, lightweight application framework based on some design patterns used in J2EE and Java Swing Application Framework. Main concept is to extend well known command pattern to make tasks and actions.&lt;/p&gt;This "framework" is now a bunch of ideas and some proof of concept. I'd be happy to hear some comments from you.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Lets start with an &lt;a href="http://tester.done.pl/pgw/blog/ActionsExample/ActionsExample.html"&gt;example&lt;/a&gt; and see &lt;a href="http://tester.done.pl/pgw/blog/ActionsExample/srcview/"&gt;the source.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Actions framework solves some common tasks and problems that exist during rich application development:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;multiple access methods to functionalities (by button, menu item, context menu etc.),&lt;/li&gt;&lt;li&gt;building multilingual interfaces,&lt;/li&gt;&lt;li&gt;building sequences of tasks (for example to show dialog and save document before closing it ),&lt;/li&gt;&lt;li&gt;organizing business components.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Basically it's an implementation of command pattern. Task is a part of code encapsulation single functionality. You can build sequences of both synchronous and asynchronous tasks. An Action is a task too, but has some more information such as name, label, description (tooltip text) and graphical icon. Action can be also saved after execution to build actions history to undo/redo them or even reuse as a macro.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_WoCila9RpFo/SG0-JXRnSRI/AAAAAAAAACo/y0ySSSHvc4Q/s1600-h/diagram1.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp3.blogger.com/_WoCila9RpFo/SG0-JXRnSRI/AAAAAAAAACo/y0ySSSHvc4Q/s400/diagram1.gif" alt="" id="BLOGGER_PHOTO_ID_5218895873779910930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Actions are designed to support multilingual interfaces. Action name is a key, and only property which is defined in the code. Label, icon and tooltip are automatically loaded from resources file. For example (ActionsFramework.properties file):&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;addAction.label=Add&lt;br /&gt;addAction.tooltipText=Add task&lt;br /&gt;addAction.icon=Embed('../../icons/add.png')&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Those properties are then used in UI elements such as buttons, menus and context menus.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_WoCila9RpFo/SG0-15QZ4ZI/AAAAAAAAACw/ZlD-C0tyBek/s1600-h/diagram2.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_WoCila9RpFo/SG0-15QZ4ZI/AAAAAAAAACw/ZlD-C0tyBek/s320/diagram2.gif" alt="" id="BLOGGER_PHOTO_ID_5218896638815887762" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;You can use UI elements from actionui package or use ActionsUIBinder to bind to existing UI elements. Example of ActionButton:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;actionui:actionbutton id="button1" action="{someAction}"&amp;gt;&lt;br /&gt;&amp;lt;/actionui:actionbutton&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;A button will display label, icon and toolTip from someAction and execute it on click. Building a toolbar from array of actions is also very easy. You can use ActionsUIBinder to build context menu as in the example :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;for(var i:uint = 0; i &amp;lt; this.allActions.length; i++)&lt;br /&gt;{&lt;br /&gt;var item:ContextMenuItem = ActionsUIBinder.createBindedContextMenuItem(&lt;br /&gt;AbstractAction(this.allActions[i]));&lt;br /&gt;this.contextMenu.customItems.push(item);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Using tasks and actions makes user interface development much faster and actions are easy to manage. Even if you use every action in toolbar, drop down menu and context menu, you always have the same labels and icons with no effort – you only change properties file.&lt;br /&gt;Generic support for cancel and undo actions is now in plans, but it's easy to implement in specific project because actions before execution are copied and saved in TaskManager history.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3966284501234074255-8065386858208924060?l=ria-workshop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ria-workshop.blogspot.com/feeds/8065386858208924060/comments/default' title='Komentarze do posta'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3966284501234074255&amp;postID=8065386858208924060' title='Komentarze (0)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/8065386858208924060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3966284501234074255/posts/default/8065386858208924060'/><link rel='alternate' type='text/html' href='http://ria-workshop.blogspot.com/2008/07/actions-framework-for-flex-part-1-tasks.html' title='Tasks and Actions Management for Flex'/><author><name>Peter Gwiazda</name><uri>http://www.blogger.com/profile/16147391553019077931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_WoCila9RpFo/SG0-JXRnSRI/AAAAAAAAACo/y0ySSSHvc4Q/s72-c/diagram1.gif' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
