Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flex best practices? [closed]

I have the feeling that is easy to find samples, tutorials and simple examples on Flex.
It seems harder to find tips and good practices based on real-life projects.
Any tips on how to :

  • How to write maintainable actionscript code
  • How to ensure a clean separation of concern. Has anybody used an MVC framework such as cairngorm, puremvc or easymvc on a real Flex project ?
  • How to fetch data from a server with blazeds/amfphp ?
  • How to reduce latency for the end-user ?
  • ...
like image 923
Alexandre Victoor Avatar asked Sep 18 '08 19:09

Alexandre Victoor


1 Answers

I work often with Flex in my job, and I will be happy to help.. but your questions deserve an article for each one :) I'll try some short answer.

Maintenable code: I think that the same rules of any other OO languages apply. Some flex-specific rules I'm use to follow: use strong typed variables, always consider dispatching events as the way for your UI components talk each other (a little more initial work, very flexible and decoupled later).

Frameworks: looked at it, read the documentation.. very nice, but I still feel that their complications are not balanced by the benefits they provide. Anyway I'd like to change my mind on this point..

Talking with server: Right now I'm using BlazeDS, it works very well.. there are many tutorials on the subject out there, if you find any trouble setting up it I would be happy to help.

Latency: Do you mean in client/server comunications? If so, you should explore the various type of channels BlazeDS implements.. pull-only, two-way http polling, near real-time on http (comet).. if you need more, LiveCycle Data Services ES, the commrcial implementation from which BlazeDS is born, among other things offer another protocol called RTMP, it isn't http-tunnelled so there can be problem with firewalls and proxies, but it offers better performance (there is a free closed-source version of LCDS). I use the standard http channels in intranet environments, and found no real performance problems even with large datasets.

Well.. quite a lot of stuff, can't be more specific now on each of this points, ask you if need :)

like image 111
Cosma Colanicchia Avatar answered Sep 28 '22 02:09

Cosma Colanicchia