21 January 2008

Flex 3 vs ColdFusion 8 Ajax

Round 2,

Well I love the new ColdFusion 8 Ajax stuff, just completed an entire configuration application using it. Then move onto a small Flex 3 project, which then went to Air.

After completing the Flex 3 app, I thought hmm, I wonder if the configuration application would be better in Flex. The answer in this case is probably yes, I'm going to do it again in Flex and see how it goes, the good thing is the CF8 version is driven by CFC's which I can still use in the Flex version.

I thought I'd summarise what I think are the pros and cons of both.

ColdFusion 8 Ajax Pros
  1. Fast and familiar for ColdFusion developers to learn.
  2. Easy integration into existing CF sites designs, security models etc.
  3. Still code based, no designer yet, and being a coder, I like writing code.

ColdFusion 8 Ajax Cons

  1. Harder to debug
  2. Slow on the loading (large libraries)
  3. Slow rendering
  4. Not as easily extendable
  5. Not as graphically pleasing

Flex 3 Pros

  1. Robust classes which extend easily
  2. Easily make graphically pleasing UI's
  3. A Designer for placement / snapping of UI can make UI design faster.
  4. Nice ECMA compliant language

Flex Cons

  1. Long learning curve for CFers'
  2. Need to use and learn FlexBuilder (different if your not on CFEclipse)
  3. A lot more complex, the easy stuff is easy, but it gets complex quickly.

So I think if you use both you might want to consider which is best for your needs. Some of our customers simply are not allowed to install the flash player, so Flex is out. But I would say that it's worth playing with both and seeing which suits your needs best.

10 January 2008

Poker Blind Timer Flex Version

I did this once before, but somehow lost it, so did it again in Flex.

The original Flash 9 version was almost identical. I've made this version available with View Source enabled, so you can pick on my code if you like. (Right Click on the Timer to view source)

http://flex.fraser.id.au/BlindTimerFlex/

INSTRUCTIONS.

1. Enter the Minutes, how often blinds increase.
2. Enter the starting small blind amount.
3. Tick if you want the blinds to balance to 250 once at 200 or higher.
4. Click Start to start the timer, a sound will sound when blinds increase.
5. Click Pause if you wish to pause the timer at any point during the game.
6. Click Reset to reset the timer back to your options, normally at the start of a new game.

200/250 balance explained.

Lets say you have a poker game starting at small blind 50 so the small / big blinds would look like

50 / 100
100 / 200
200 / 400
400 / 800
800 / 1600
1600 / 3200

You can see that those numbers after 200 aren't really nice numbers. But with 200/250 balance ticked, you will get the following.

50 / 100
100 / 200
250 / 500
500 / 1000
1000 / 2000
2000 / 4000

EDIT: Got the AIR version running, that was too easy, Nice! If you want to install the AIR version, can get it here.
http://flex.fraser.id.au/BlindTimerFlex/BlindTimer.zip

All feedback welcome.

NEW VERSION: http://dale.fraser.id.au/2010/02/poker-blind-timer-version-2.html

Is Flex the ColdFusion Killer?

I am a big ColdFusion fan, and I love the ColdFusion 8 features, especially the Ajax stuff. But being in the ColdFusion space you are inundated with Flex stuff, there is a lot of Flex at every ColdFusion conference, a lot of CF people are moving to Flex and writing blog posts and tutorials etc. Try finding a CF conference that doesn't have Flex path or topics.

Even the CF god Ben Forta is heavily involved in the Flex side of things these days.

Adobe and the general community is pushing Flex. Now there is a good reason for this, it's a good product, but the overwhelming push into the CF community is seeing a lot of CF developers move to Flex.

I have to say that the more Flex I do, the more I like it and the less I want to do in ColdFusion, mind you I do use ColdFusion for the back end. There are some things that Flex has that ColdFusion missed the boat on.

1. A nice ECMA scripting language ActionScript.
2. Full OO Capabilities.
3. A Fully integrated and good IDE.

Honestly, writing Flex / ActionScript code then going back to CFSET and GTE is a bit painful. So once ColdFusion programmers pick up Flex, how many of them will want to do Flex only and leave the ColdFusion for others.