<?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>Tom&#039;s blog &#187; as3</title>
	<atom:link href="http://tomkordys.net/blog/tag/as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://tomkordys.net/blog</link>
	<description>freelance flash/flex/air developer</description>
	<lastBuildDate>Thu, 15 Mar 2012 17:34:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Debugging AIR apps on Samsumg Smart TVs</title>
		<link>http://tomkordys.net/blog/2012/03/14/debugging-air-apps-on-samsumg-smart-tvs/</link>
		<comments>http://tomkordys.net/blog/2012/03/14/debugging-air-apps-on-samsumg-smart-tvs/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 16:51:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[adobe air]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[flash builder]]></category>
		<category><![CDATA[samsung]]></category>
		<category><![CDATA[samsung air app]]></category>
		<category><![CDATA[smart tv]]></category>

		<guid isPermaLink="false">http://tomkordys.net/blog/?p=170</guid>
		<description><![CDATA[I was trying to find anything that would allow me set up debugging for Samsung Smart TVs but I only found it wasn&#8217;t doable. It is not true. It is possible. So I decided to write a post how to set up debugging for AIR apps on Samsung Smart TVs. I am using Flash Builder, [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to find anything that would allow me set up debugging for Samsung Smart TVs but I only found it wasn&#8217;t doable.<br />
It is not true. It is possible. So I decided to write a post how to set up debugging for AIR apps on Samsung Smart TVs.</p>
<p>I am using Flash Builder, but my mate Huv is using IntelliJ, it is much easier to set it up with IntelliJ.<br />
BTW kudos to Huv, for sharing the knowledge <img src='http://tomkordys.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So, I will briefly mention what is required (anyone doing Samsung dev should be familiar with most of the stuff).</p>
<p>So we have AIR project, targeting AIR 2.5 and we do a release build. Make sure you add -debug=true in compiler arguments.<br />
Once we have the AIR file, we can pretty much scrap the AIR project.</p>
<p>In order to get it to work on the TV, change AIR extension to ZIP.</p>
<p>You Also need to include config.xml in that ZIP for it to work on Samsung telly. </p>
<p>Second thing you need to do is include debugger.info file that will only contain your IP address.</p>
<p>192.204.xxx.xxx that is the only thing the file should have.</p>
<p>Put both files there and copy the zip file. </p>
<p>Once you have that sorted, you need to set a local server ISS, apache, whatever running as your localhost.</p>
<p>The server should have widgetslist.xml with the location of the widgets, etc you can find more on Samsung Dev Forums on that. </p>
<p>So once you upload your app to the telly and are ready to run it you need to set up the debugger. </p>
<p>You could do it the command line way: java -jar SDK/libs/fdb.jar<br />
run http://localhost</p>
<p>but wouldn&#8217;t it be way cooler to hook it up to Flash Builder console panel?</p>
<p>In order to get that sorted, you basically need to change the nature of your project to web application.<br />
Flash Builder is unfortunately stupid enough to allow you to specify what to run when you have AIR app,<br />
IntelliJ has got this decoupled.</p>
<p>So, the quickest way is to duplicate your project (in case you mess something up in the future)<br />
and edit .project file to be a flash one.</p>
<p>Create a new project, copy the .project or just paste the following:</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;projectDescription<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>XXX<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;comment<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/comment<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;projects<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/projects<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;buildSpec<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;buildCommand<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.adobe.flexbuilder.project.flexbuilder<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/arguments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/buildCommand<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/buildSpec<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;natures<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nature<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.adobe.flexbuilder.project.actionscriptnature<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/nature<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/natures<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/projectDescription<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>That will make the project basic AS project again. </p>
<p>Once you have this running in FB, create new Debug Configuration,<br />
Uncheck USE DEFAULT for &#8220;URL or path to launch&#8221;<br />
and type in http://localhost</p>
<p>Run the debug configuration and you should see you default browser launching localhost. </p>
<p>Now do the standard login as &#8220;develop&#8221; 123456, Settings &#8211;> Development &#8211;> Sync.</p>
<p>Now you can launch the app on the TV, the app is going to use the IP from the debugger.info file to send the debug info to<br />
and the debugger will be listening for it there. </p>
<p>If you did everything correctly you should see all the traces in the console panel.<br />
Breakpoints should work too <img src='http://tomkordys.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If not make sure you run the debug before you launch the app on the telly.</p>
<p>To soothe the process I recommend writing ANT scripts that will now take your swf (from your as project)<br />
unzip the AIR renamed to ZIP file, replace the swf in the zip file, zip in up again and copy to where your localhost is running from.</p>
<p>It is a bit annoying, that you cannot push to the TV directly, so to see if the change you made has resolved the issue,<br />
you need to login as &#8220;develop&#8221; 123456, Settings &#8211;> Development &#8211;> Sync.</p>
<p>Apart from the sync, the rest can be nicely automated and that&#8217;s what I am gonna do now, so laterz&#8230;</p>
<p>Any questions give me shout.</p>
<p>ANT SCRIPTS HERE:</p>
<p>http://tomkordys.net/blog/2012/03/15/ant-snippet-for-packaging-and-debugging-on-samsung-smart-tv/</p>
]]></content:encoded>
			<wfw:commentRss>http://tomkordys.net/blog/2012/03/14/debugging-air-apps-on-samsumg-smart-tvs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Dependency Injection, frameworks and other latest AS3 trends, Robotlegs, Dawn, Parsley?</title>
		<link>http://tomkordys.net/blog/2009/11/09/dependency-injection-frameworks-and-other-latest-as3-trends-robotlegs-dawn-parsley/</link>
		<comments>http://tomkordys.net/blog/2009/11/09/dependency-injection-frameworks-and-other-latest-as3-trends-robotlegs-dawn-parsley/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 11:21:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[cairngorm]]></category>
		<category><![CDATA[dawn]]></category>
		<category><![CDATA[Dependency Injection]]></category>
		<category><![CDATA[DI]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[mate]]></category>
		<category><![CDATA[parsley]]></category>
		<category><![CDATA[robotlegs]]></category>

		<guid isPermaLink="false">http://tomkordys.net/blog/?p=81</guid>
		<description><![CDATA[Attending last LFPUG meetup got me thinking about all the latest Flash and Flex development, especially in the way in which this development is going. I think the community is becoming much more mature and this can be observed by the number of frameworks that have recently poped up. Everyone is blogging about it, and [...]]]></description>
			<content:encoded><![CDATA[<p>Attending last <a href="http://www.lfpug.com">LFPUG</a> meetup got me thinking about all the latest Flash and Flex development, especially in the way in which this development is going. I think the community is becoming much more mature and this can be observed by the number of frameworks that have recently poped up. Everyone is blogging about it, and you can actually get lost in all those differences each of the frameworks has. But almost all the frakeworks are build on design paterns, which is definitely a good thing. When it comes to Design Patterns it is pretty straight forward. If you don&#8217;t know what they are I suggest doing some research because using design patterns makes your code much more elegant and structured.<br />
Here is what wikipedia says, and remember that wikipedia is ALWAYS right: </p>
<blockquote><p>n software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved.</p></blockquote>
<p>The whole article can be found <a href="http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29">here</a>.</p>
<p>Bear in mind that not all the design patterns apply to AS3 because of it&#8217;s uniqueness (being an OOP language on client side, not server side). Practical use of design patterns in AS3 was well presented by <a href="http://blog.eamonnfaherty.co.uk/">Eamonn Faherty</a> during the LFPUG&#8217;s first session. Eamonn seemed to be pretty confident talking about various patterns and I highly recommend you watch the presentation on <a href="http://www.lfpug.com/practical-design-patterns-for-actionscript-30/">LFPUG&#8217;s site</a></p>
<p>If that&#8217;s not enough for you, you can always get O&#8217;reilly&#8217;s book for your iPhone/iPod &#8220;Actionscript 3 Design Patterns&#8221;. Simply search for &#8220;O&#8217;reilly Design Patterns&#8221; in the app store and this book should come up. I got it myself and I find it really handly to have it will me all the time even if you are only using it to show off what cool apps have. It does the job.  </p>
<p>Second session on Frameworks was presented by <a href="http://www.bigroom.co.uk/blog/">Richard Lord</a>. Richard is well known in the flash community especially because he&#8217;s the man behind <a href="http://flintparticles.org/">Flint</a>, the particle system for flash. That is not the only thing Richard is well known for. Second thing is frameworks. He was even presenting on this year&#8217;s Flash on the Beach about frameworks and if you look at his blog it looks like he can call himself an expert. I didn&#8217;t make it Richards presentation on FOTB because the conference room got filled out to the max. So for those who had seen it, I recommend you watch what he presented on LFPUG because it seemed that what he added to his FOTB presentation was the most interesting stuff, mainly Parsley and Robotlegs.</p>
<p>I assume all of us heard of <a href="http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm">Cairngorm</a>, <a href="http://puremvc.org/">PureMVC</a> and roughty heard of <a href="http://mate.asfusion.com/">Mate</a> and <a href="http://swizframework.org/">Swiz</a>.<br />
We constantly hear to stay away from Cairngorm because it&#8217;s simply shite (although many of the people who say that have never actually used it), PureMVC is not fun to work with, Mate being only flex framework and Swiz being apparently really good but also working only with flex. </p>
<p>I must admit I am a fan of PureMVC because I believe days of cowboy coding are over. There has to be a unified way of writing code in this industry and PureMVC was the first one to make it happen, especially in the flash department. It&#8217;s got it&#8217;s pros and cons, but it definitely serves it&#8217;s purpose. Code in pureMVC is (usually) neatly organized and if you don&#8217;t know it, it means you are way behind. </p>
<p>So what is next?<br />
To me it looks like the next big thing is Dependecy Injection and frameworks build on it. Basically all the frameworks apart from Cairngorm and PureMVC rely on DI. The easiest definition I found:</p>
<blockquote><p>At the simplest, Dependency Injection is that act of supplying objects with their instance variables or properties. When you pass a variable to the constructor of a class, you are using Dependency Injection. When you set a property on a class, you are using Dependency Injection. If you aren’t coding your AS3 in a strictly procedural or linear fashion, the odds are that you are making use of Dependency Injection right now.</p></blockquote>
<p>Dependecy Injection always comes with a second term Inversion Of Control. IoC container is nothing else than a container that uses DI, it&#8217;s pretty straight forward.</p>
<p>DI and IoC are just one of many things that came to Actioscript from other OOP languages. And I think it&#8217;s great. It means we are not re-inventing the wheel, we simply apply the best patterns, aka problem solvers from much more mature languages like Java to AS. </p>
<p>So, looking at what we have available in terms of DI and IoC in Actionscript are the following:</p>
<p><a href="http://www.springactionscript.org/">Spring Actionscript</a> (formerly known as Prana).<br />
Prana was the first framework using Inversion of Control for ActionScript 3.0. It was nothing else that a port of Spring Framework for Java. I have never used and I don&#8217;t think many people actually have. I think it is mosty the Java reference that puts people off but that&#8217;s just my opinion. </p>
<p><a href="http://code.google.com/p/smartypants-ioc/">SmartyPants IOC</a><br />
SmartyPants apart from it&#8217;s really interesting name it is the one that started the whole Dependency Injection trend. SmartyPants is not a framework itself it is only the IOC container. It is a bit verbose but it&#8217;s pretty good to get your head around DI, because it is the only thing it covers.</p>
<p>And here is where we come to the main reason why I wanted to write this post.</p>
<p><a href="http://www.robotlegs.org/">Robotlegs</a><br />
Robotloegs is awesome. Robotlegs is a MVCS framework based on on Dependency Injection using Flash Events. Why MVCS? Well the author, Shaun, decided to split the model tier of the architecture into Model itself, accessed via internal API and the service where the external data is loaded into the application. Which sounds pretty resonable approach and it&#8217;s a minor change in terms of MVC approach. I personally quite like it. THe next thing you would expect is SmartyPants to handle DI. Wrong! Guys working on Robotlegs decided to write their own dependecy injection tailored to Robotlegs. And so they did giving it anoter original name <a href="http://github.com/tschneidereit/SwiftSuspenders">SwiftSuspenders</a>. Cool thing about Robotlegs it that you are not limited to using SwiftSuspenders. You can choose your own Dependency Injector if you don&#8217;t like the one it comes with by default. I started digging a few days ago into RobotLegs and I must admit it is really fun thing to work with.<br />
It&#8217;s not what we had with pureMVC where you were told how to use it and that was it.<br />
There are a lot of discussions how Robotlegs should evolve, what should be added, removed and if you have anything good to suggest, you will be heard.<br />
I suggest you start following the <a href="http://groups.google.com/group/robotlegs">Robotlegs google group</a>.</p>
<p>I personally think it will be the next big framework, the pureMVC 2.0. The sooner you get into it the better. It works with Flex as well as Flash, which many of those other frameworks lack, they have no love for Flash. But is it the only solution that works with Flash as well as Flex? Certainly not. </p>
<p>Other player here is <a href="http://www.spicefactory.org/parsley/">Parsley</a>. Parsley has been developed by PowerFlasher, same guys who developed FDT. I haven&#8217;t played with it yet, it is definitely on my list. But following people opinions (which I don&#8217;t think is the best thing to do), I hear although it is pretty well documented, there is no community behind this framework. This is not gonna put me off but it definitely is a huge disadvantage. </p>
<p>Is that all?<br />
There is one more candidate on the horizon. Probably not many people have heard about this framework. It&#8217;s called <a href="http://wiki.github.com/sammyt/dawn/">Dawn</a>. Dawn relies on <del datetime="2009-11-19T10:52:12+00:00">SmartyPants</del> it&#8217;s own DI and is also inspired by <a href="http://code.google.com/p/google-guice/">Guice</a> (just like the SmartyPants itself). If you are into checking it out, I suggest you visit their site and if you live around London, Sam, the author, will be presenting it on next <a href="http://www.meetup.com/flexlondon/">FLUG</a> on 17th of November 2009.</p>
<p><strong>Summary</strong><br />
Robotlegs is gaining loads of momentum, it is definitely worth checking it out. I guess the whole DI stuff if fairly new and it is interesting how things are gonna go with it. But keep your eyes open on Parsley as this it the framework that apparently Adobe uses and their Caringorm 3 is pretty much gonna be like Parsley, from what I&#8217;ve heard. Also have a look at Dawn it might turn out to be also big. </p>
<p>If you have any questions, comments, or you disagree let me know <img src='http://tomkordys.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tomkordys.net/blog/2009/11/09/dependency-injection-frameworks-and-other-latest-as3-trends-robotlegs-dawn-parsley/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>

