I am new in Flex Development, While creating a new Mobile project it asks me if I want to Connect it to Some Servers and gives me four options `ColdFusion, PHP, Java and blazeDS
I've been doing Flex -> ColdFusion for several years and while I sometimes get frustrated with coding ColdFusion, it has been great for handling the back end of Flex applications. That said, I also use BlazeDS with ColdFusion and Flex to power (push) messaging in a couple of clients.
Ultimately, I think ColdFusion (especially with the open source CFML server, Railo) is a fantastic back end (i.e, data provider) for Flex applications.
Since you're a Java guy, you can immediately drop the PHP option: its AMF remoting options are slower than the other 3 and you don't want to learn a new language.
That leaves us with Java, CF, and BlazeDS, which are all basically flavors of Java and performance-wise they can be fairly similar (if used correctly: see further on):
But there's one thing you need to know. Instantiation in CF is terribly expensive - I mean like 500 times slower than Java -, so if you have big lists it's definitely a nono. Unless you use the trick I bumped into a few months ago: instead of instantiating an object you have to create a 'struct' and give it a '__type__' attribute.
example, instead of:
var instance = new path.to.MyClass();
//or
var instance = createObject("component", "path.to.MyClass");
do it like this:
var instance = structNew();
instance["__type__"] = "path.to.MyClass";
and ColdFusion will be just as fast - or maybe even slightly faster - then Java.
I have some benchmarks to back this up. This image is a comparison of how much time it takes to create 50000 instances in some languages. (I was actually trying to tell my boss how crappy CF really is.) And CF8 (not in the chart) is even 100 times slower.
Then I added AMF serialization and the 'typed struct' (as described earlier) to the list and this is the result:
Some column names were lost in the graphic, but the second column from the left is the pure Java option. So with this approach CF9 seems to actually be faster than Java.