3D Flash Player

I know this is old news but here it is a short entry anyway..

Adobe Max just finished up about a week ago and the main thing that caught my eye is the new GPU accelerated Flash Player that comes to the table. Code name ‘molehill’ will finally bring GPU accelerated goodness to the Flash Player which in terms means alot of indy game developers who have moved towards other platforms (such as Unity3D) as of late.

At first I was thinking, what is going to happen to all the guys who are making 3D Engines for flash? Such as Papervision, Away3D , Sandy etc. I think the guys would be loving it as the new 3D API is very low level, so the 3D guys will be able to write their engines on top of the Low level API’s to create 3D engines that work brilliantly with the new GPU support.

The effects to Unity3D
Do I see a threat to the Unity3D user base? I don’t think so as they have quiet a following now, and Unity wasn’t always just about the Unity Player but the actual game making IDE which flash will never touch. What would be awesome if Unity rollout their own Flash Player exporter, but what are the chances of that happening?

This is the sort of reason I love being a Flash Developer, things move so quickly and it forces me to keep active in my job so not fall behing the curve! ( This could be a curse to some people though )

 

IDE Showdown, IntelliJ, FDT, FlashDevelop

I was given a task of Evaluating a few AS3 IDE’s and though I’d spend my own time writing a entry on the blog to share my findings as it’s been too long since i posted my last entry.

Before I begin…

I’ve used used all 3 IDE’s for at least a months to familiarise myself with them but in no way know any of the IDE’s in a very advance level, i try not to ‘learn’ the IDE but rather do my work and find things on the way, so if I miss a feature please assume I just didn’t know it was there, please leave a comment to correct me if that’s the case.

I’m using IntelliJ 9.0.3, FDT4 , and FlashDevelop 3.2.0

But Why was I evaluating different Different Tools?

Anyway, after been a long time FlashDevelop user coming from a PC I was forced to endure using FlashDevelop on Mac while in Parallels. It was slow as a Dog. The whole Program would hang for 10 seconds at time and a 10 second compile would take up to 40 seconds to compete. This is largely the fault of the Parallels slow virtual hard drive access speed, I eventually learnt how to compile using OSX command line with the Flex SDK but it would mean I was missing out on quiet a few features and overall was a pain in the arse. Some of the functionality could be replicated by MonsterDebugger but nothing really compared to a proper debugger with line breaks etc.  After a big long project and many IDE headaches, it was time to look at possible alternatives.

Why didn’t you include Adobe Flash Builder ?

I did use Adobe Flash Builder 4 quiet a bit while fumbling around trying to learn Flex, I’ve tried the latest version ( 4 ) and did run through it and my thoughts stay the same.  I don’t think it’s very comparable to the other IDE for actual coding for people such as me who do Pure AS3 or Flash IDE projects. Even if I was to pay $962 AUD for Flash Builder and another $79 USD for Sourcemate ( which is a fantastic plug-in by the way, props to them ) I still don’t think it’s even good as the Free Flash Develop or as cost effective as the other 2. Mind you not to say it’s a useless product, it has unique features that is not found on the other IDE’s but as far code writing goes, I think to look elsewhere. I have been keeping my eye on the new version that’s coming ( Burrito ) which looks to be much better for coders, but it’s just implementing features that we’ve seen in FDT and Flash Develop for years now.

In Humble Beginnings… Flash Develop

Flash Develop General Window

Flash Develop is a Open Source IDE built on Microsoft .NET 2.0 which means PC only. People have used Visualization on OSX with success but it’s definitely not the ideal solution for OSX users. If your still coding in the Flash IDE ( you poor soul ) I would definitely say check it out as there’s no excuse not to at least try it (if your on PC).

I started with Flash Develop when I was still freelancing during and after University and I think it’s a great piece of software if your on PC. It’s probably enough for majority of people out there till you get into the bigger and bad-ass projects. It’s Debugger wasn’t all of that great when i was using it but it’s not all that bad in recent updates.

Code completion is pretty good (as with all IDE’s that are even worth consideration these days), gives really good code hints and searches through all of your classes, imports and SWC’s that have been added to your project to give proper code hinting and highlighting.

Code generation is enough for mostly developers out there, it’s almost caught up FDT as far as creating new classes. It shares the ability to exact methods from interfaces like all 3 IDE’s.


Creating New Classes

It’s Snippet (Template) system is okay, it’s isn’t as crash hot as the system used in IntelliJ and FDT but it’s enough to get bits of boilerplate code into your document quickly. Snippets have it’s own menu that must be activated on a special shortcut unlike the other two where it pops up with code hinting.  You can create class templates for creating templates for classes you use frequently ( I was using a templates for all my Robotlegs classes)

Snippet / Template Popup

There’s no method that I know to overriding methods from super classes which is a bit of a bummer, you have to actually navigate to the super class yourself to find out what’s in there.  ( 17/10/10 Philippe has kindly alerted me that you can override super methods, you just type in override then hit the ‘quick fix’ shortcut and it pops with the list )

The biggest thing I miss while going back to FlashDevelop is refactoring and the ability to use Quick-Open like the other two IDE have. Refactoring is really needed in big projects while your constantly moving classes and renaming things accordingly when your applications grow and scope changes. There is actually a Refactoring menu in FlashDevelop but i could never figure out how to actually use it, it always seems to be grayed out.

FDT, The Main Player

Cross Class code generation

FDT is made by a group in Germany called PowerFlasher , I would say FDT is the most popular professional development tool out there. It’s built on the Eclipse which is a Java based ( which has it’s advantages and disadvantages ) . FDT has quiet a big following and community and you’ll find no shortage of users sitting on Twitter and most Flash Development type agencies. Pretty sure people are using it for Flex work too these days ( I myself would miss the design view too much compared to Flash Builder ) .

There are 3 versions of FDT, Pure , Plus and Max. The differences are outlined on their website here , for this article I’m going to be comparing Max as it had the features I needed when developing.

The interface will look familiar if you have used Eclipse for any other type of development , you can almost get plug ins for almost all languages out there , also it’s mullti-platform so it work in both OSX and Windows. Adobe Flash Builder ( aka Flex Builder ) is also built on Eclipse so you should have no problem learning FDT if your coming from there.

The first time I opened FDT i was bombarded with a barrage of buttons I’ve never seen before, till this day I don’t know what 1/2 the buttons do or i never use them. The user flow was a bit different as the first time I tried FDT as I was still compiling out of the Flash IDE at that point.

FDT has real time error hightlighting, red squiggly lines comes up when something is wrong ( like a spelling mistakes in a word processor ) , it’s pretty accurate and is very helpful to find typo’s while coding rather than at compile time.

Class completion and Hinting is good ( I actually don’t find much discrepancy between the 3 IDE as far as code completion goes ).

Code generation is fantastic, i find FDT by far the ‘quickest’ when actually setting up a project and creating classes. Really enjoy the FDT work flow, I can start typing a variable or class before I declare it and FDT’s quick fix system generally knows what I’m trying to do and sorts me out, I don’t actually have to be in the same class I’m writing the function for it. I can be in Class A that references class B and create a function in class B. Overriding super classes , implementing interfaces etc is  a breeze.

Cross Class code generation

The Quick Fix system in FDT is fantastic, soon as the red squiggly lines come up to tell me something is wrong I can hit the Quick Fix shortcut and it would recommend me the fix, generally it’s just importing a class, declaring a variable or function, my favorite FDT feature..

FDT ‘quick fix’ helping me out

The template system is better in FDT than in Flash Develop, you’re able to add ‘variables’ into your templates , so you’re able to snippets that duplicate user input several places.

The Refactoring tools are good , I’m more then satisfied by FDT’s refactoring tools to use on old projects and extracting pieces of code to make Standalone classes after a project is completed. You have Rename and move, and you can drag classes into new packages and FDT will go find all references to it and adjust them all safely.

The Profiler in FDT is quiet good, I didn’t have a chance to use it at all on the other IDE’s but i found the one in FDT useful in finding where I had memory leaks because I forgot to take out listeners and destroy objects that were no longer used.

FDT Profiler

The Debugger in the Plus and Max version is good, it’s really nice to have the ability to have a line-by-line debugger when working on big projects, really speeds up debugging and pushing the last few steps of a project out.

FDT also has ANT, FlexUnit and Source Control Built in which is a great plus.

IntelliJ The New Kid

IntelliJ is a oldschool Java IDE IDE and has been quiet around some time, Jetbrains (The Creators of IntelliJ ) have recently introduced a Flex SDK plug-in for IntelliJ that has enabled the development of ActionScript 3. Although the IntelliJ IDE has been around quiet a while ; the Flex component of it is quiet young. There was some heavy hitters AS3 developers such as John Lindquist and Jesse Freeman that highly praised IntelliJ so I thought I’d give it a shot to see what the fuss was about. There is a Free edition but unfortunately the Flex component doesn’t work in that version so you much buy the retail version that cost around $599 USD.

IntelliJ’s vast platforms

I was a bit worried it was would be missing some critical features that I would need because IntelliJ being fairly new to the world of ActionScript, but everything was there that I needed to work with.

IntelliJ also shares real time error checking like FDT does.

Template system is good, I had a few fights with it at the start but then got the hang of it, seems to be a few bugs that i got around by asking around their helpful forums.

Code navigation is good (as all 3 IDE’s) You can open class type and find where variables are declared by key stroke.

IntelliJ Code Generation

Code completion is good, There was a few gripes of the code generation I wasn’t a a fan of however, I like it how in FDT and Flash Develop it shows what method arguments while your typing it in , seems with intelliJ it the little helper box dissapeared as soon as you started to type.

IntelliJ Code Generation

Code generation I find better than Flash Develop , but not quiet there compared to FDT. I couldn’t figure out how to create a new class from a undeclared string like you can in FDT’s Quick Fix system which is a bit of a shame. (  19/10/10 Turns Out there was a whole different quick-fix menu I was un aware of which would have made my life a whole lot easier if I actually figured it out, shame on me and apologise in advance to the IntelliJ team for that. I have added screenshots to show the options.  What I don’t like about this feature is that once you ‘Quick-Fix’ a new class all you can define is the Destination, It would have been good if you could see the full class creation box e.g. Where the class extends, it’s interface, and a proper ‘search packages’ of where you want the class to sit )

IntelliJ Code Generation

More IntelliJ code generation

More IntelliJ Quick Fix System

Debugger in IntelliJ is quiet good, has the ability to create ‘conditional’ line breaks which is really handy and a unique feature to IntelliJ. I was able to have different ‘build’ configurations and one was to build then launch the browser and debug remotely.

Refactoring in IntelliJ is fantastic, best out of the 3 by far. Renaming functions and classes is done live so you once you hit rename and start typing you can see all the changes live. The other refactoring options are vast the refactoring menu mostly goes beyond my level. I really like the ability to pull members up and down classes as well.

More IntelliJ Refactoring Options

IntelliJ also has ANT, Malvern, FlexUnit and various source control built in.

There was numerous growing pains at the starts but towards the end working with it became much easier. I think there’s many of features unique to IntelliJ that at my level can’t appreciate. I know alot of people go crazy over it but I just couldn’t share the excitement.

Features

Here are the features that I use and how i scored them personally , I know alot of people aren’t going to agree with me or I just didn’t delve deep enough to fully appreciate some of the feature of certain IDE’s.

Feature Flash Develop FDT IntellIJ
Ease of Use Good Good Good
Speed Great Great Good
Value Fantastic OK OK
‘Quick-Fix’ Good Fantastic Fantastic
Customising IDE Good Fantastic Fantatsic
Live Error Highlighting None Fantastic Great
Code Hinting Fantastic Fantastic Good
Auto Code Complete Fantastic Fantastic Fantastic
Template / Snippets Good Fantastic Great
Code Navigation Great Fantastic Fantastic
SWC viewing Good Great Great
Debugger Good Great Fantastic
Run Configurations OK Great Great
Refactorer OK Great Fantastic
Version Control Systems OK Fantastic Fantastic

Conclusion

If it was for my myself and I was on PC, I would find it hard justifying to myself why I’d pay almost 900 AUD for FDT or IntelliJ when Flash Develop has 90% the functionality i need for them both. Obviously now that I’m on OSX at work these things change. I was recommended FDT pure + MonsterDebugger as cost effective OSX alternative to Flash Develop but I would loose a line breaking debugger and would have no Refactoring tools at all which was not really a option for me.

What IDE would I recommend out of FDT or IntelliJ ? It’s hard to pick because while it was a Joy to do actual coding in FDT, intelliJ’s refactoring tools are quiet amazing and it’s worth checking it out if you haven’t seen it in use. But obviously, it’s unviable to have 2 IDE’s around. I think IntelliJ has lots of room to improve so I would like to re-evaluate it in a year or so’s time when a few people more are on board and it matures a bit.

But as it stands, if there would be one AS3 IDE i would buy with my own money, it would FDT.

Gaia and Robotlegs together

Gaia and Robotlegs together

I have been doing a fair bit of adventuring in unchartered territory these last couple of months and the main things I have learnt is the concept of using programming frameworks.  I was recommended this combination by a wise person at the beginning of a project a project a few months ago .

About Gaia

Gaia is a fantastic front end framework made by Steven Sacks and has been around quiet some time.  It takes care of all the monotonous things at the start of the project and manages your assets. You simply write a XML for the basic layout of your site, and GAIA Does this for you;

  • Creates a new FlashDevelop Project
  • Creates all FLA (Index,Main,Nav,Preloader etc)
  • A FLA for each page with document Class
  • Some placeholder Page Animations
  • SWFAddress for Routing/Deeplinking
  • Placeholder navigation
  • SEO (yes it works)
  • Asset managment

All in one click, it’s a fantastic tool that I’d recommend, it does however has it’s limitation and uses so it’s not for every project.

After the initial Gaia scaffolding of the, you access Gaia using it’s very well documented API to handle global navigation and the state off the site (e.g. which page you are on ), after that though, you are on your own (which is great!) , Gaia keeps out of your way so you can do whatever you like, it  tries to be non-obstructive and doesn’t tie you down like some other front end frames works I’ve tried to use.

About Robotlegs

I wrote a blog entry on Robotlegs a few weeks ago, I’ve learnt a large amount since then but it’s still relevant to now. I’ll take a quote from there

“Robotlegs is a Framework based upon the MVC (Model View Controller) design pattern, MVC is a universal software architecture pattern that is used within many object oriented programming languages.  The Model is your program state, keeping your program variables and overall keeping the data for your program state. The View is everything that the user users, anything from a Movieclip, to a button to a sound.  And the controller is the medium that connects the view to the model.  There’s a ton of information about the MVC model if you want to know more about it.  What Robotlegs tries to do is help you program your application together, there’s no strict hard rules but more so a blueprint to get you started.”

Full article here

http://www.simtechmedia.com/blog/2010/07/my-experience-so-far-with-robotlegs/

Why use them together?

If you have two fantastic AS3 frameworks than why use them both at the same time?  Do some of their roles double up on each other? I would say yes, but there is definitely solid roles both can play in making a application where both can work in harmony, there is definitely grey area between the two frameworks and how you develop is up the actual developer (at it should be!)

Using both frameworks you can separates all front end visual tasks from your application. In a common scenario a Flash Designer will create all the pages/sections/assets of the website, Gaia itself has no knowledge of what Robotlegs is or is doing , as far as Gaia is concerned, it’s a self contained part of your flash website and is dispatching user interface events, this is pretty typical of what a VIEW does in a MCV type application.

How to use them together

So how do you use both of these technologies together? I won’t go into detail on how to use Robotlegs as there’s many resources out there to do that. Here is my approach on getting things wired together.

The typical setup is have your Context in Main, that way any Robotlegs and Gaia have a direct path to each other.

The next step is to have public functions in your Gaia pages that you would want Robotlegs to have access too, then create a Interface for your Gaia pages to make those functions visible.

Next step adding the Mediator in your Context

mediatorMap.mapView("com.roboGaia.pages.GaiaPage", GaiaPageMediator, IGaiaPage);

Notice I am not importing the Gaia Page class into my Context but a reference to it, this is so Robotlegs is not importing the whole class, just a reference to it. First variable is your Class path to your view, then your mediator , then your interface. Here is how it’s all communication is made between Gaia and Robotlegs.

What’s in the mediator and what’s in the View in this setup?

This is a infamous question that has popped up several times in my travels; where should the listeners for the UI sit, one option is this, the View listeners for its own UI, and sends UIEvent through the interface like so;

Another option is to have the UI listeners in the mediators and have the view be objects with no listeners as such;

I am a fan of the first approach as you don’t need anything to be on the mediators and it makes the mediators a bit lighter, there’s arguments for both approaches but it’s up for personal interpretation.

In Ending…

I hope you have found this entry interesting, this last couple of weeks on this project has taught me quite a bit and I hope someone out there finds some use it in. Feel free to contact me about anything I wrote about in email or twtter

My Experience so far with Robotlegs

Robotlegs Logo

I’ve been using with Robotlegs these last couple of weeks and jumping on the latest craze that seems to be sweeping through the AS3 development community.  Coming from someone who has never fully implemented a AS3 framework before (but I do understand design patterns and concepts) the learning curve was actually quiet hard.   I’m sure that anyone who is familiar with PureMVC would feel right at home as it seems to continue where PureMVC had left off with a few less of its downfalls.

I took it upon myself to spend a full weekend trying to start a fresh project using it, now that I’ve gotten a firmer grasp of the Robotlegs framework , I can honestly say I don’t know how I could lived without it, makes making any type applications that revolves around dynamic data so much easier to create.

Brief introduction to Robotlegs
Robotlegs is a Framework based upon the MVC (Model View Controller) design pattern.  It is a universal software architecture pattern that is used within many object oriented programming languages.  The Model is your program state, keeping your program varibles and overall keeping the data for your program state. The View is everything that the user users, anything from a movieclip, to a button to a sound.  And the controller is the medium that connects the view to the model.  There’s a ton of information about the MVC model if you want to know more about it.  What Robotlegs tries to do is help you program your application together, there’s no strict hard rules but more so a blueprint to get you started.

Why use a framework at all?
The main reason for me to use a framework is that it saves time,  I don’t think they’ll ever be a situation where you could say ‘you need to use a framework for this project will be impossible to complete’, frameworks are there to assist you, and it makes larger projects much more structured and controlled therefore saving  you (or your employer) time, or gives you more time in making your application better rather than doing your boiler plate stuff (the things you should do but half the time you don’t).

Everything has its place
Even though Robotlegs lets you use the frameworks how you like, there’re best practices you should try to follow while using the it, the beauty the framework is that if it’s not working, most likely your doing something wrong and against the framework flow. (As a wise guy once told me).

Complete decoupling and Strong cohesion
Frameworks makes it much easier to decouple the classes from each other, the view and the model are completely separated and have no idea about each.   The view is very ‘ignorant’ , it has no idea what’s going on, while the model has no idea how the data arrives to it, it has its own responsibility of keeping data it has received valid and has no idea what else is happening in the framework.

Helps collaborated development easier
I am currently working on a project where another developer is working with me on the User Interface elements while I’m working on the data parts, about 98% of the time anything he changes will not break what I’m working on and likewise, this is another benefit of having things decoupled.

Reusable Code
I know us Objected Oriented Programmers try to make classes we can reuse, but for me the hit rate of this has been pretty sparse, I have reused snippets of functions and classes, but no whole classes reused.   But with making Robotlegs classes I believe that the next major project I work on I’ll be able to re-use some of the models, commands and services I create.

Quicker debugging and launch
Another time saving ability is how quickly the debugging process is, soon as a bug comes up you know exactly where the bug comes is and where it’s isolated to, and you less likely run into the problem of breaking something unrelated while debugging.

Conclusion
I know this blog entry has been me banging the Robotlegs war drum a bit hard, but I really do think it’s a great tool for any as3 developer who wishes to ‘take it to the next level’, below are some resources to get you started. – Enjoy

Resources
http://www.robotlegs.org/
– Robot Legs Home page, great resources there
http://johnlindquist.com/2009/11/18/robotlegs-hello-world-video-tutorial/
– Tutorial on Robotlegs by legendary John Lindquist
http://insideria.com/2010/06/robotlegs-for-framework-beginn.html
– Pretty good Starting tutorial on Robotlegs

I’ve been using with Robotlegs these last couple of weeks and jumping on the latest craze that seems to be sweeping through the AS3 development community. Coming from someone who has never fully implemented a AS3 framework before (but I do understand design patterns and concepts) the learning curve was actually quiet hard. I’m sure that anyone who is familiar with PureMVC would feel right at home as it seems to continue where PureMVC had left off with a few less of its downfalls.

Here are my initial reactions of using Robotlegs

I took it upon myself to spend a full weekend trying to start a fresh project using it, now that I’ve gotten a firmer grasp of the Robotlegs framework , I can honestly say I don’t know how I could lived without it, makes making any type applications that revolves around dynamic data so much easier to create.

Brief introduction to Robotlegs

Robotlegs is a Framework started by

Why use a framework at all?

The main reason for me to use a framework is that it saves time, I don’t think they’ll ever be a situation where you could say ‘you need to use a framework for this project will be impossible to complete’, frameworks are there to assist you, and it makes larger projects much more structured and controlled therefore saving you (or your employer) time, or gives you more time in making your application better rather than doing your boiler plate stuff (the things you should do but half the time you don’t).

Everything has its place

Even though Robotlegs lets you use the frameworks how you like, there’re best practices you should try to follow while using the it, the beauty the framework is that if it’s not working, most likely your doing something wrong and against the framework flow. (As a wise guy once told me).

Complete decoupling and Strong cohesion

Frameworks makes it much easier to decouple the classes from each other, the view and the model are completely separated and have no idea about each. The view is very ‘ignorant’ , it has no idea what’s going on, while the model has no idea how the data arrives to it, it has its own responsibility of keeping data it has received valid and has no idea what else is happening in the framework.

Helps collaborated development easier

I am currently working on a project where another developer is working on the User Interface elements while I’m working on the data stuff, about 98% of the time anything he changes we break what I’m working on and likewise, this is another benefit of having things decoupled.

Reusable Code

I know us Objected Oriented Programmers try to make classes we can reuse, but for me to achieve that has pretty sparse, I have reused snippets of functions and classes, but no whole classes I reused. But with making Robotlegs classes I believe that the next major project I work on I’ll be able to re-use some of the models, commands and services I create.

Quicker debugging and launch

Another time saving ability is how quickly the debugging process is, soon as a bug comes up you know exactly where the bug comes is and where it’s isolated to, and you less likely run into the problem of breaking something unrelated while debugging.

Conclusion

I know this blog entry has been me banging the Robotlegs war drum a bit hard, but I really do think it’s a great tool for any as3 developer who wishes to ‘take it to the next level’, below are some resources to get you started. – Enjoy

Resources

http://www.robotlegs.org/
– Robot Legs Home page, great resources there

http://johnlindquist.com/2009/11/18/robotlegs-hello-world-video-tutorial/
– Tutorial on Robotlegs by legendary John Lindquist

http://insideria.com/2010/06/robotlegs-for-framework-beginn.html
– Pretty good Starting tutorial on Robotlegs

Busy Busy

Been too long since I’ve updated my Blog , I promise you I haven’t lost interest! Just been so busy, I will post some of my latest findings very soon

My UML chart for indecat

Here is a screenshot of my first UML chart I made in VISIO for the project I’ve been working on for quiet some time now. (indecat)

I’m really digging it, makes visualising where you are going when making a big program easier

The Program is still far from ideal, I actually would love to try and remake it using a premade framework such as robot legs (everyone is raving about it)

Vietnam and Hong Kong

Just got back not long ago from travelling through Vietnam and Hong Kong! Was pretty good and got some great photos

UML

Alright, I have tried to use UML to create a class relationship diagram in the latest build of a project. I’m still trying my hardest to find a tool that is effective with AS3 but so far Visio seems to the goer for now. It’s still missing events and the ability to show/hide attributes and methods which is a major bummer, but i’m sure i’ll figure it out.

Jesse Wardens Video Blog #3

Apple’s iPad, HTML5 Video, Gaia Flash Framework – JXLTV – Episode #3
http://jessewarden.com/2010/01/apples-ipad-html5-video-gaia-flash-framework-jxltv-episode-3.html

Interesting video blog by industrial pro Jesse warden, he goes into some pretty interesting idea’s and thoughts on the new iPad. He also goes through some new framework called Gaia, which I haven’t heard of before, should be interesting to look into further

The iPad – More trouble for flash?

There is huge debate on the Flash’s future when devices like the iPad wont support it, it’s safe to assume that the iPad will become popular by the response of the public, given that most apple mobile devices are indeed becoming increasingly popular it does stick in the back of my mind that i’m specialising in a dying trade.
With the looming HTML 5 beta looking to maybe give Flash Video a bit of greif, I should be wondering if I should be touching up on my PHP, Ajax and Html skills?