Our Blog

In my previous post, I made the comment that we'll be doing more Flex 2.0 stuff and less cfforms. It seems that it was a shock for some people. I was going to respond in a comment there, but I realized that it was better to make a new post on that.

Ok, don't panic, guys :) we will be making a smooth transition from cfform to Flex. Flex will ship next summer so we have a lot of time. Also, we are thinking about opening a cfform and Flex forum here at asfusion because we can not handle the amount of email that we get everyday and I believe that the forum will help making the communication better (Quick poll here: what do you think about that?)

Going back to the topic of Flex, these are some of the reasons why I think that if you are a ColdFusion developer you may want to take a look at what Flex 2.0 is capable of. I will also outline what I believe the Flex-ColdFusion relation will be.

1. Less expensive than Flex 1.5. For less than $1,000, you have an IDE (a very good one in fact) that will compile an swf with all the framework components ready to be uploaded to any server.

2. No more Flex server. You can deploy your swf to any hosting company. You don't need to spend in a server product that only compiles a GUI. There will be another server product, but it will be optional and adds more data connectivity like push, pull, and real-time communication

3. ActionScript 3.0 has lot of beautiful improvements

  • It is a strictly typed language
  • Has runtime exceptions
  • Includes Regular Expressions and EX4
  • It's 100% ECMA compatible
  • Has a better hierarchical chain. No more MovieClip dependency. No more timelines
  • improved OOP language approach
  • and more

4. The player 8.5

  • It's more robust. They wrote a new virtual machine from the ground up. Now the player has 2 virtual machines and its size has only increased by 100k.
  • Faster, faster, faster. It's amazing how fast the new player is, sometimes 10 times faster than the previous version.
  • New bytecode, more optimized
  • Now the classes are based on traits. This makes it possible to instantiate more objects and consume less resources because the virtual machine knows from which class each object is.
  • New garbage collector
  • JIT (Just in time) Compiled Code (around 10x performance improvement)

5. ColdFusion has everything to start developing with Flex (as opposed as other language such as PHP)

  • A new version of Remoting is available, Remoting 3.0, that will make the AMF packages smaller and it will fix a lot of problems.
  • The ColdFusion Adapter is available now to download. It provides the next Remoting generation.
  • Integration of ColdFusion with the DataServices in the future, (it’s not in the alpha yet) but it will open amazing opportunities

6. The syntax of mxml is very similar to cfform, if you understand how an HBox, VBox, Panel, Alert work, you will find that Flex has almost the same names. Events like click, change, etc are also similar to those in cfform.

7. Framework:

  • A robust OO framework that is ready to use with more than 40 components available. Comparing Flex with cffrom, Flex has a lot more to offer.
  • Easy component development. If you ever had to build your own component you know how time-consuming it is. I used to build my complete set of components in Flash MX (version 6) and I can guarantee you that it’s a long and difficult task. Now Flex 2 simplifies this process a lot.
  • No more mixing or strange practices that insert properties to your class on the fly, breaking the encapsulation paradigm. Now the event model is built-in in the player. Add and remove listeners are cleaner methods because you don't need to pass references to the calling object (this). No more delegates when adding a new listener.
  • Very extensible: you can create your own components and organize your application in different files. As an example, you can separate your views from the model. That kind of flexibility is not possible in a cfform.
  • Separation of the styles from the code. Ability to create and load external style sheets
  • States: It's a new way to organize your components or views. For example, you can have a component with two states, one it's shown when the user is logged in and the other when the user is not logged in. The states are amazing; they give you more flexibility in the development of your app.

8. Flex 2.0 Builder IDE

  • It is built on top of the Eclipse IDE. If you never used Eclipse before, it may be a little hard in the beginning, but once you feel comfortable, you’ll never go back. Bye bye DreamWeaver. Macromedia is also supporting CFEclipse so you can develop your complete application in only one editor.
  • Has a great debugger. You can step into your code and inspect all your properties right there. Add and remove break points makes it easy to track specific problems. That's is very important because I think one of the most frequent question that we receive is how to debug a cfform, what tools to use, etc.
  • Has a Design view that makes it easy to create your layout, you can drag and drop your components and position them to build your app. But if you are a hardcore, you can omit the Design view and make it all by hand ;)

OK everything is good but what will you miss?
You will miss the ability to create a query on your cfm file and use it in a cfgrid or dropDown later on the code.
You will miss Dreamweaver o Homesite if any of them is your editor of choice. You can continue coding on them for your cf development, but you’ll need to use Eclipse for your mxml development, unless you use the compiler directly.
BTW, we added a new pool asking for your CF editor of choice :)

In the near future, we'll be making cfforms for small things and Flex applications if the project is big. One doesn't replace the other. If I need a form for a website, I’ll always use the easy way, that is using a cfform. But if I need a whole application, the easiest way is to do it with Flex. Now that Flex is affordable, why not use it?

Well, to end this long post, I want to say that Flex will have a strong position on the Web 2.0. I think that with this framework, we have the tools to make the web a little better. Not long time ago, making a Rich Internet Application was a big task. Usually, you had to build everything from scratch, there was no framework to support your development, no layout manager to position your components, no debugging tools available, only trace() for all you debugging. Now everybody is talking about Ajax and saying that is the new wave, but it has the same problems that Flash had a few years ago. Flash and Flex have fixed a lot of these problems.

A good debugging environment, a good Framework, good Documentation, good layout managers and good performance are the foundations of building any application, either in the desktop or in the browser. Now the line between the browser and the desktop is blurred. And because of that, there is a man in the dark lands of Mordor that wants all the power. He's making the Avalon-Sparkle ring to rule all the other rings. I hope that the little Frodo (MacroDobe) can make his journey and destroy the ring. Otherwise, expect more Avalon and Sparkle posts here ;)

Nahuel Foronda

Nahuel Foronda

21 Comments

  1. Peter Tilbrook

    Peter Tilbrook

    Nice to see you bagging Dreamweaver but what version? The latest? Version 8?

    Because even Dreamweaver 8 lacks fully updated tag support and documentation for ColdFusion MX 7.01. And the word from Macromedia is "do not expect it - ever". CFEclipse is further behind even.
  2. Michael White
    Ok, so I know nothing about action script other than what you taught me, do I hang on until AS3?
    By the way, on your wishlist, I notice you have a lot more items to choose from! you guys must do a lot of cooking (effluvium from your Culinary Masterpieces inspiring the appetites of your neighbors?)
  3. Rick Smith
    Although I still don't share your enthusiasm about Flex, the forums sound like a wonderful idea.
  4. Neil Bailey

    Neil Bailey

    Nahuel,

    You guys can do no wrong in my eyes. I am truly as excited about Flex 2 as you seem to be, but as my BOSS has only JUST bought into flash forms, I will need a resource for both. As always, ASFusion fills a void with exactly what was needed.
  5. João Fernandes

    João Fernandes

    Rick too bad you weren't at MAX to see the potential that flex 2 can bring to coldfusion developers.

    As Nahuel said, CFForm will be a good choice for small forms but when you'll need bigger interfaces flex 2 will be your choice.


  6. Jason
    Hi Nahuel, Flex-Coldfusion forum is definitely the right way to go! I can imagine the email reply that you and Laura has been doing.
    What do you think if the forum itself are using Flex-ColdFusion? I think it going to be the best Showcase ever!
  7. darron
    Just wanted to clarify a few points on AS3:

    * AS3 is no more strictly typed than AS2 is. The new VM that runs AS3 has performance optimizations for code that you strictly type, but it's not a requirement of the language itself. That is, AS3 is still dynamic if you want it to be, or strict if you want it to be, just like AS2. The big difference here is that there's a "-strict" compiler flag to warn you when you don't specify a datatype.

    * AS2 has runtime exceptions as well (since Flash Player 7). However, the 8.5 Player doesn't let them siliently fail anymore. If you don't wrap code in a try/catch, you'll see the error window appear, which is super-handy (or, well, super annoying depending on your point of view).

    * AS3 still has MovieClips and timelines. When BLAZE is released to create version 8.5 .swf files, there will still be timelines. The difference here is that the Flex framework abstracts the timeline concept from you, but in that respect Flex 2.0 is no different than 1.0 and 1.5.

    The real key differentiating features here are the new DisplayList, new "Clean" API, new features like E4X, Regular Expression, Sockets, better handling of binary data (with classes like ByteArray), and the performance of the new VM based on strong typing.

    Finally, people are starting to see how cool Flex is. What took everyone so long? ;-)
  8. Michael
    Hi there,

    I still got the domainname, cfflex.com but don't have the time to set something up over here... So maybe we can join forces or something, because CF and Flex are going to be huge together :-)

    Just let me know if someone is interested in setting something up, [email protected]
  9. Darron wrote:
    > "Finally, people are starting to see how cool Flex is. What took everyone so long?"

    Only one thing: The price.
    Flex was a nice technology from the beginning but it was very expensive to sell to a client.

    Jason,
    I think the best would be to use one already built and one that plays friendlier with google :)

    Rick,
    If you have a project that requires a lot of client side processing (that is a RIA), What technology would you use?
  10. Michael
    Great article, it was a great summary. FYI we featured the article on our podcast at:

    http://www.coldfusionpodcast.com
  11. Philippe Maegerman
    I read this great post on Tim Buntle's blog, it's called 'Flex Builder 2 for you (the CFer)'
    http://www.buntel.com/blog/index.cfm?mode=entry&entry=288DC68A-4E22-1671-535CD529A4509E3E
  12. Neil Bailey

    Neil Bailey

    Hopefully someone can help me out here?

    I am passing in the selected items of a multiple select box to a CFC, via the selectBoxName.selectedItems value. There is at least one item selected (via an <option selected> value).

    However, when I get to the CFC, and try to access arguments.selectBoxName[1].data, I get the following error message:

    "Element 1 is undefined in a Java object of type class java.util.ArrayList referenced as ".

    Does ANYONE have ANY idea what the hell is going on here? I am doing a VERY similiar thing in various other applications, without a problem at all. Any help would be much appreciated.

    Thanks,

    nb
  13. I've watched the MAX videos, flex 2 is great, but i would like to see more cfform examples here, please we've just updated to CF MX 7
  14. Kurt
    I would love to see a good post showing a basic Flex app connected to Coldfusion using the new Flex Builder 2.0. I have followed Macromedia's insructions and even looked at their sample and cannot get Flex to talk to my CF code and datasource.

    BTW, thanks for all the cool stuff you guys post, your knowledge is inspiring.
  15. Davd
    Yup.. i agree with Kurt.. what we need are some straight forward, start here - end here type examples. As someone trying to expand my CF skills by learning more code, trying to understand OOP methodology and designs (DAO/DTO/Beans), deciding which framework (Fuse/Mach) to take on, and now trying to take on flex/cfforms i find it very difficult to juggle which one to focus on or even which flow to take. There are all kinds of examples all over the place, but very few from the ground up. Ben Forta's books and the Real Estate example here seem to be the best i've seen all over the web. I've never seen so many live examples anywhere else. EasyCFM.com is the best resource for general CF tutorials and help, but you guys really out do yourselves when it comes to anything related to flash. What i would personally love to see is a flowchart of what CF professionals like yourselves would tell someone starting out where to start, and then provide solid examples of each stage, but thats asking a lot from anyone. But as educational resource sites such as these it would be great to see some standards for each specialty forum such as yours! :) So yes, a Flex app for beginners on up to advance coders would be a great thing indeed! Sorry i got so carried away.. just excited .. like a kid in a candy store! :)

    Thanks again all of you for your time.. truly amazing to see so many willing to help others!

    -- David
  16. Philippe Maegerman
    Because all of these new toys are using the flash sandbox/playground, you should start by learning actionscript and the base classes offered by the flash player, so you will know better in what you are playing.
    Now Flex is a special beast boosted with a lot of extra cool stuff.
  17. Avi Flax

    Avi Flax

    Sorry to comment on an older post but this seemed appropriate. I'm wondering if there is or may be soon some way to utilize E4X in ColdFusion. Any ideas? Thanks!
  18. Avi Flax

    Avi Flax

    Had a typo in my email address in my last comment, just adding this so I can successfully subscribe. Sorry!