Flash & Flex
October 16th, 2009 @ 15:10
I’ve conducted a small study recently, trying to figure out if we could evolve in our Flash RIA development somehow. I’ve read and experimented a lot with Flex, MXML and related tools to see if we’re missing something (we’re not using it very much today).
It’s not that we’re unhappy with how things are done now, but with the new Flex 4 and everything associated to it, I’ve felt that there’s an opportunity to make some improvements to our workflow.
Summing it up
As presented below, there are a few conclusions to be drawn here, for example:
- Flex 4 seems to be a really nice upgrade and probably something you can’t ignore in the end.
- There’s little information on the web about development of large Flash/RIA applications (like those we do). Pretty much all focus is on Flex development of small-to-medium sized applications. I’m not to speculate on the reasons why no one is spreading the word, but hope that my work can shed some light on the area.
- There’s a lot of fuzz around the Adobe products in general and Flex in particular. Very few seem to have any criticism at all when it comes to Flex, which is a bit disturbing, as nothing that looks too good to be true ever is. But maybe I’ve just been looking at the wrong side of the web? Just a reflection…
Presentation of findings
I held an in-house presentation on my findings yesterday, and I thought I’d better share it with the world (= your favourite search engine). I’ve stripped it down a bit, as there were some company specific things in there, but most of it is free for everyone to read.
A few things to consider before jumping in, though:
- This is a PowerPoint (well, OpenOffice actually) slide with notes. There was lots said when presenting each slide, so I can’t guarantee that you’ll learn everything I said. I understand this is not perfect, but figured that it’s better to upload this than nothing.
- It’s just plain slides with notes, really. I did have some imagery in the original slides, but left it out as it’s probably only needed as “distraction” when viewed on a large screen with me talking next to it. So don’t get mad if it’s boring!
- The plan wasn’t actually to hold an in-house presentation, but I figured it was a good idea. So the format on which it is presented may or may not be optimal, as it’s pretty much been summarized as I’ve went along. It could be a good idea to shape it up and make it a bit better, but at the moment, it’s more important just getting it “out there”.
The presentation itself
With that having been said – and my back having been covered
– here it is (also available as a PDF):
Download (PDF, 134.18KB)
EDIT: Also added the presentation to SlideShare.
Flash & Flex
September 22nd, 2009 @ 11:09
In my post a few days ago, I mentioned that that Scott Delap and his team were using the Swiz MVC framework. I decided to try it out, and I have to say it looks quite promising. The Swiz tagline is “Brutally simple micro-architecture for Rich Internet Application development with Adobe Flex”, and it was actually pretty easy to set up. The framework is similar to the way Java Spring works with autowiring, so if you’re familiar with that you’ll probably like Swiz.
I’ve only read the docs and tried the demo out so far, but it’s a very interesting candidate for future Flex projects. It’s quite easy to separate the views and controllers from the business logic and using both MXML and ActionScript views seems to work fine. Swiz really gets the job done.
Seems better than PureMVC
I’ve tested the PureMVC framework earlier and kind of liked it, but developing with PureMVC gets quite repetitive and you produce quite a lot of boilerplate code. I like it better when the MVC framework easily guides you towards a proper structure, without having to do too much work to get there.
Also, there seem to be pretty good community activity in the Swiz Google Code project.
It seems like the best MVC framework candidate so far!
Flash & Flex
September 18th, 2009 @ 15:09
I came across a really interesting presentation from Scott Delap on InfoQ:
Scott Delap shares his experience creating a lobby interface for an online game using Flex&Air. He details on related technologies used, available tooling and frameworks pros&cons, remoting options, unit, functional and load testing approach used.
To sum it up, it’s a good and elaborate presentation from a Java developer’s perspective, with reflections from a online multiplayer game development project. I enjoyed the full hour of watching it!
They’ve dealt with many of the questions we have and their conclusions are very interesting.
Presentation summary
I’ve summarized the most interesting contents of the presentation. They’re actually notes taken during the presentation, so please forgive any poor language or formatting:
- The Flex Builder WYSIWYG actually works, which isn’t common at all
- MVC in Flex is pretty much MVc, where the controller and view are sort of bundled together
- When choosing an MVC framework, Swiz turned out to be most interesting (among likes of Cairngorm, PureMVC etc). Swiz is similar to Spring with auto-wiring. Also supports Dependency Injection, Command Chains, and has MXML support even for non-views (i.e. for wiring the M:s, V:s and C:s).
Their MVC implementation:
- MXML for the views
- ActionScript for the controllers
- Remoting interfaces + specific back-end implementation
- Swiz wiring it all up
- They found no real reasons to use a “big MVC framework”, whereas Swiz did the job well enough
Remoting
Looked at several candidates, where WebORB, Hessian, XMPP, GraniteDS, Rest not weren’t considered enough for various reasons. Also evaluated BlazeDS, which doesn’t scale and has no NIO support.
Best candidate: LiveCycleDS - supports NIO, RTMP and lots of connections:
- Good for remoting Java <> Actionscript and easy to integrate
- Some Java <> ActionScript translations a bit problematic, i.e. enums and null values
- Some lack of documentation when it comes to messaging
Unit testing
- Evaluated ASUnit, FlexUnit, DpUnit/Fluint
- Chose Fluint, but could just as well have chosen FlexUnit. Unit testing Utilities, Controllers, Remoting Services with Mocks
Functional testing
- FlexMonkey not working properly with AIR and had a bit of lag
- Wrote a stripped-down version of Selenium
Load testing
Currently no good way of performing load testing.
- Hard to simulate 1000:s of users
- No really good tool for load testing at the moment
Final thoughts on Flex
- MXML works as advertised
- Easy to do complex things
http://opensource.adobe.com/wiki/display/blazeds/BlazeDS/