2009
10.04

Implementing enterprise solutions into “cool shit” application

This is series of articles called “Behind The Scenes”, where we describe particular project in different ways. this time it will be our fist one. Think360.

Picture1

Think360

Series Articles:

1) Planning, Platforms, Frameworks, Workspace

2) Architecting, Folder structures, Backend
3) Away3D vs Papervision3D, 3D Modelling, Physics, Sound, Optimization

Introduction:

Why I’m writing those articles? Well, for last 3 years I was reading articles of others and learn from them, so had some “philanthropic” moment when I decided that would be good to share my knowledge finally and this was perfect project for that.

Aim of this article is not to give you ready to go solution rather than to show you how you COULD build more complex solutions on flash platform. I’m warning you, I’m not Adobe expert, I’m not Flash evangelist and I’m not even university educated (author-note: consider removing last words). So whatever you read here is my subjective opinion coming from my experience with this project.

Planning:

Choice of platform/frameworks

It’s very important to choose right base blocks for your project. Bigger project means bigger importance of this stage. So what was our choice? When I was planning those essential blocks, many times my mind came across eternal sentence “Make everything as simple as possible, but not simpler”. I’m sure everybody knows well who said that.
But, there was one issue with this and it could be described like this:
“When you want build sports car you have generally two options upgrade normal car or downgrade supercar”.
This is one of the most essential questions you should answer when planning bigger scale project. On the end we decided to go for “supercar” philosophy because of probability of adding supercar features into our sports car in future.

Platforms:

Flash

We are flash developers in most of the time and we love flash community. Speaking technically, despite hard fight on front with HTML5 (6, 7 so on), Silverlight, JavaFX, AJAX, Unity3D and others, Flash is still the best overall choice for interactive content on web and it was definitely best for this project.

.NET

Ok, If you stop reading here I completely understand it:). Microsoft technology is not very favourite chap in Flash territory. But we decided to go for it because of more scalable choice, Umbraco and VisualStudio (Forgive me all, but as far as like Flex Builder and even more new Flash Builder and I mean it, they are still little bit of joke in compare with this monsterous mother of IDE. Adobe, please stop treating evolving of Flash Builder as upgraded “car” and start treat it as downgrading supercar). And yes, for me as person coming from both backgrounds nearly simultaneously was this favour choice anyway. But our html version is done with WordPress which means PHP to be fair.

Backend:

Umbraco

For me, best open source .NET CMS and one of best overall. It’s even better than some commercial alternatives. Great community, even the story behind evolution of it is very interesting.

WebORB for .NET

Connect two opposite worlds, Flash and .NET. It offers you practically everything you need to for develop, test and deploy RIA applications. Another great choice was FluorineFX (open source) but WebORB.NET’s superior console application won.

Pureherit.NET

our internal framework which is responsible to provide facade bridge between Front-end and Umbraco.

Front End:

PureMVC

As core part of our internal framework this was obvious choice. If you need small-mid size project, go for something like Cairngorm. If fact I used it before I get into PureMVC and in some way I still like it despite its chronic singeltoniolity. But if you plan big project, go for PureMVC. It’s more complex and slower to setup but once you’ll have several hundreds or even thousands files in your structure, you’ll see why.

Fabrication

This little utility should be nominated on Nobel Prize. It just revolutionized our development (and I’m sure many other ones). PureMVC is like solid powerful computer. On other end, fabrication is like operating system. It hides all that complexity and allows you to build incredibly complex solutions incredibly quickly. Fabrication however works on top of another great utility called Pipes to be exact. Thanks Darshan for this!

SpringActionscript

This is very helpful IoC/DI container for AS3 based on Spring framework. It made deployment of our project a piece of cake.

Pureherit

this is our internal enterprise framework we use for building complex solutions. It wraps features of previous frameworks under one hood and adds additional scalability, modularity and platform features.

Development:

Flex4

It was tough choice between well established Flex 3 and Flex 4, which is still in beta. But looking on “craziness” of this project we decided to give it go wit new baby. Project itself wasn’t really “Flexi”. It doesn’t have spreadsheets, loads of data or shopping cart. However the reason why this “flexiness” IS there and why IS hidden is similar to one when you buy one of those boring German cars like BMW M divisions or Audi RS*… they are very civilized, comfortable and in some way boring when you drive them gently, but at some point you met some geek on traffic lights with his shiny blinking Porsche thinking he is driving god so you have to put him out of this illusion. That time you really need that power. And those civilized cars become monsters and leaves Porsche guy looking embarrassed like child who lost his lollipop (nothing against Porches to be clear). Similar to this weird example, it is with software. You need think forward when deciding how much complexity on the beginning of project is worth of, when adding another robustness/complexity in future, whiles still maintaining cost, speed, maintainability and other factors of present. At some point, many days, months or even years after you finished project, client comes back to you and says “Hey what about shopping cart?” and should be able to predict this or at least try it in some way. Flex is heavy, slow, more complex, but as there is possibility to add future modules and complexity we go for this rather than recoding whole thing from scratch when it comes to it. And as seen on this project, doing it properly you don’t loose on speed or size practically anything.

Away3D

This thingy saved our butts. When PV3D was on its last breath with hi-poly performance this just started showing real potential of flash player and its 3D future allowing us to fine-tune it nearly like famous Toyota Supra. I’ll be writing about Away3D closely in following articles.

Papervision3D

on final version we dropped PV3D in favour of Away3D but is still worth of mentioning as most of our knowledge comes from PV3D core team, forums, enthusiasts and actually engine itself. And all that knowledge was used when working with and optimizing Away3D. PV3D is great engine, but unfortunately its lack of support for new FP10 features was really noticeable in this project.

Bulkloader

this little library is synonym of “loading”. It’s engine behind of all our assets management tools.

TweenMAX

Hard choice was between GTween and this. On the end we decided for TweenMAX as all of us already familiar with it and it’s little bit more feature packed.

SWFObject

When it comes to scary (for most of flash population as I found) HTML world and embedding flash there, this is unquestionable choice. Even Flex4 support it so what else to say.

SWFAddress

The only thing what really surprise me is how it’s possible that SWFObject and SWFAdress are still separate projects. They are destined to be together! Rostislav, Geoff…c’mon guys, buy each other some beer and marry those 2 brilliant things with each other.

Box2D (full name is Box2DFlashAS3 …Well, I’ll stick with Box2D)

I felt in love with this little physics engine . It’s like ugly duck when you first look at it (it has c like interface so what you expect) which transform to beautiful swan when you put it to do what it supposed to do…physics. The speed of this thing is just impressive.

Mayherit

this is our internal game framework I started developing few moths ago and it hides the complexity of Box2D for example.

Testing:

FlexUnit

Our unit testing framework of choice. Even better that new Flash Builder got it by default. To be honest I like ASUnit more, but looking forward to use FB 4, we decided to go for FlexUnit.

XRay

As our old school testing tool, we used this for our AS3 Projects/Modules. Even it’s little bit outdated and there are now more choices outhere, It still do it’s job well.

FlexSpy

We used it to test flex related projects. Great testing interface and simplicity were major arguments to adopt this tool.

Beherit

this is (now open source and in Alpha version) flash micro-framework I developed and used on my small-scale projects when I worked at ASOS.com. It was created to simplify high volume development, leaving developer time to do all that cool stuff (with deep-linking, state machine, paging etc is in some way similar to Gaia Framework, but is more oriented to developer designed to work in Flex Builder not Flash). But this time it was used rather for testing small bits. As setting up ready to go project template was matter of 1-2 minutes it was our first choice.

Other free/open source tools and software we used:

Subclipse – Flex Builder svn client
TroiseSVN – Windows based context menu svn client
VisualSVN Server – Great, easy to setup svn server
DotProject – PHP based project managment tool
Mantis – PHP based bug tracking
StarUML – UML design tool. It even has utility to export UML classes straight to Actionscript ones. Great feature!
Hamachi – allows you to setup VPN in practically “seconds”

So this was introduction of our building blocks. Now we can start building something.

In next article I will go trough architecting phase allowing backend/frond end scalability by still leaving performance on both sides.

As our first post hopefully you wasn’t bored. If you know something cool what could be implemented in such a workflow or use different one, put some comment. Would be happy to see!
Stay tuned :)

.NET
Ok, If you stop reading here I completely understand it. Microsoft technology is not very favourite chap in Flash territory. But we decided to go for it because of more scalable choice, Umbraco and VisualStudio (Forgive me all, but as far as like Flex Builder and new Flash Builder and I mean it, they are still little bit of joke in compare with this monster mother of all IDE. Adobe, please stop treating evolving of Flash Builder as upgraded normal car and start treat it as downgrading supercar). And yes, for me as person coming from both backgrounds nearly simultaneously was this favour choice anyway. But our html version is done with WordPress which means PHP.
  1. [...] [...]

  2. [...] Planning, Platforms, Frameworks, Workspace 2) Architecting, Folder structures, Backend 3) Away3D vs Papervision3D, 3D Modelling, Physics, [...]

  3. [...] Planning, Platforms, Frameworks, Workspace 2) Architecting, Folder structures, Backend 3) Away3D vs Papervision3D, 3D Modelling, Physics, [...]