Here is a recording from my presentation about Flex Best Practices / Flex Architectural Patterns at the NLJUG. Sorry that the audio is not great on this one. It turned into more of a discussion than a presentation. Let me know what you think.
Video: Flex Best Practices
This entry was posted in Flex. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.


30 Comments
James thanks for posting your preso, great stuff!!
I’m interested to learn more about the Service Bus approach you mentioned you often use for Flex applications. If you have any links or code you could share on this that would be great.
Cheers, Mike G.
Would it be possible to get your power point slides? Also, could you provide your code for working with a Service Bus?
Also, the service bus framework that you were discussing (you couldn’t remember the name)…was it LCDS (LiveCycle Data Services)?
I’ll try to get my slides added here soon.
The message / service bus framework is Mate:
http://mate.asfusion.com
The slides are here:
http://www.jamesward.com/wordpress/wp-content/uploads/2008/07/ria_best_practices.ppt
Does FlexBuilder provide any support to manage modular apps when the main app is in one Eclipse project and various modules are in other Eclipse projects? Because modules are all loaded at runtime via the filename, I have to path specific to my Eclipse workspace and project structure. That differs from how I’m going to deploy the swfs in my production environment. Also, different projects may exist on different paths for different team members. So we all have to manage our module paths differently :(
regards,
-Chris
Hi Chris,
Usually for large projects you should use a build tool like Maven or Ant to handle compiling the modules. That way you can have better control over how the modules are named, deployed, and loaded.
-James
Speaking of Maven…how do you use it to build a Flex/Java app (i.e. something you deploy to a web container, which might use LCDS or BlazeDS, see this link for the type of project I am referring to: http://corlan.org/2008/06/05/creating-a-combined-flexjava-project-in-flex-builder-wo-lcdsblazeds/).
Even just a regular flex app…how do you do it?
Hi Craig,
Check out:
http://flex-mojos.googlecode.com/
And:
https://bugs.adobe.com/jira/browse/SDK-12730
-James
Hi! Thanks for the slides! One question: I’m very interested in your view on the ‘service bus’ approach. I suppose you see it as an alternative to the rather ‘heavy weight’ MVC approach? Some thoughts (or some documentation even if it’s not Flex based) would be very helpful.
Hi Tom,
My personal preference for large Flex applications is for a service bus approach as the overall application architecture, coupled with modules, and some hand rolled MVC for the micro architecture (self-contained with a module).
-James
Thanks for the feedback! Are there any service bus frameworks for Flex or non-Flex out there that I could use as a reference?
I’ve successfully hooked up Flex to ActiveMQ by using BlazeDS and LCDS (LiveCycle Data Services). The bus would come later in my prototyping but it’s a good start.
James:
Do you have any details/info on the sections of the presentation you didn’t cover in the video (testing, scalability, security)?
One question (you hopefully know) I have is do you know how to access a user certification stored in a browser from Flex? Or if there is another method how to get it into flex?
Hi Tom,
Check out Mate: http://mate.asfusion.com
Codecraig,
For testing check out FlexUnit and the Flex Automated Testing Framework. Scalability is a broad topic. But in general Flex applications scale much better than traditional web applications because more is being done on the client. Since Flex uses the browser networking stack security in Flex is similar to web applications. There isn’t any direct way to handle certificates in Flex. The browser handles certificates and usually Flex applications don’t need to do anything with them.
-James
Can you post the video up on Adobe Media Player for offline viewing?
cheers
Hi James,
I met you briefly today after your presentation, and asked you about the First Steps to Flex book (can’t actually remember the exact), but you’d already run out of copies. Out of curiosity, when and where will the book be available?
Hi James,
Great video!! There are a ton of great tips in here. Thanks for posting!
Here are two articles that are directly related to your video I thought they might help some people out:
Flex best practices – Part 1: Setting up your Flex project
http://www.adobe.com/devnet/flex/articles/best_practices_pt1.html
Mate: Event driven framework for Flex
http://www.flashmagazine.com/Reviews/detail/mate_event_driven_framework_for_flex/
Kind regards,
Sean
@NZ – I’ll look into that.
@Laurie – First Steps in Flex hasn’t officially been released yet. Hopefully it will be in the next few months. Check back here for updates.
@Sean – Thanks for the links! Both are great articles!
What was that tool you used for the screencast? I really liked how you could zoom in and out during your presentation.
Hi Matt,
I use Camtasia. It works great.
-James
I’d like to add my voice to the rest of the guys asking for the video to be put up somewhere where we can download it. It’s too long to view all in one go during my lunch hour but if I want to view the second half I have to wait for the swf to download all over again…
Also I too would be really interested to see some more of the rest of the presentation
Thanks,
Ed.
What format / codec would you all prefer?
-James
I agree some downloadable format is key. I would like to listen to this on the go.
Hi Andrew,
What format would you like?
-James
How about just allowing us to download the movie swf? Alternatively, any format that Media Player will handle.
And don’t forget to add all the stuff you didn’t get time to present……
Thanks,
Ed.
Hi Ed,
Here is the link to download the SWF:
http://content.screencast.com/users/jlward4th/folders/Default/media/2a9e80b1-6231-4e57-ac79-b2c37c0fb3a4/flex_best_practices.swf?downloadOnly=true
Let me know if that works for you.
-James
download works for me.
Thanks!
an h.264 version would help making this video more portable for ipod/pvr watching
Hi James, great video, thanks for posting.
You mentioned rolling out your own very simple service bus rather than using MATE – if you have an example available I’d love to see it.
Cheers,
Neil
Hi Neil,
This will be in the book Bruce Eckel and I are working on called “First Steps in Flex”. It’s not out yet but you can join the announce list at:
http://www.firststepsinflex.com
-James
5 Trackbacks
[...] post info By flexria Categories: Adobe, FLEX, RIA and rich internet applications Source [...]
[...] Desenvolver usando as melhores práticas de qualquer linguagem de programação tem sido bastante comentado entre os desenvolvedores de todo o mundo, pois traz uma série de benefícios para as aplicações a longo prazo. Além de utilizar os padrões de mercado, é mais fácil de dar manutenção. A apresentação com as melhores práticas para desenvolver Flex e ActionScript 3 está disponível aqui. [...]
[...] Best Practices I came across this video recording of James Ward presentation on Best practices with Flex. Do take the time to go through the complete [...]
[...] Watch this video on jamesward.com [...]
[...] 5, 2008 by mohitsambhar Best Practices in Flex a presentation by James Ward. Check this article for this is a treasure. Infact in one of my [...]