开发者

To ColdFusion (from PHP) for Flex/Flash backend? [closed]

Closed. This question is opinion-bas开发者_如何学JAVAed. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 3 years ago.

Improve this question

I'm starting to learn about Flex/Flash and come from a PHP background. It seems that ColdFusion has been the language of choice for Flash/Flex backend. But (the big but for me) I don't plan to build websites that will heavily depend on Flash (for SEO etc.), just websites that will incorporate Flash in small parts of them. I'm thinking for this reason, I'm not going to gain any advantage switching my backend work from PHP to ColdFusion. Since I'm new to the technologies, I'm not sure if that's the right thinking though. Can someone help out comparing PHP vs. ColdFusion (which I'm assuming is Adobe's favorite backend language)? in the context of what I said above would be helpful too. Am I going to be losing a lot of libraries, functionality, convenience, etc. by not doing my backend stuff in ColdFusion.


FWIW. Flash Remoting (AMF) in ColdFusion is much faster than the PHP alternatives. On the magnitude of 40x faster! If performance matters, then ColdFusion is really the only choice.


I have used both CF and PHP for a similar purpose: to execute database queries in the backend from a flash movie front end. These flash movies were, similar to your situation, more or less standalone, not heavily integrated into the website

I found that there is not much that you can acheive with CF that you can with PHP. Database operations are a tad easier to accomplish in CF than PHP, and that's about it. However, if your SQL skills aren't too shabby, this is not much of an issue.

IMHO, your needs are better suited by PHP because it's free, and you can get a WAMP or LAMP rig easily set up as your sandbox. If you just want a sandbox for CF, you either have to pay the sticker price* for the official Adobe software, or get vastly inferior imitations available, such as Railo Server.

Do note that for me, I was able to accomplish database operations on the backend using WAMP/LAMP and Adobe CF, but not with Railo, so that greatly limits your sandboxing experiments with CF. This was 9 months ago though, so you may want to check if Railo has improved since.

As for libraries, there are many more out there available for PHP than CF, due to a much larger developer community. Evidence from Google:
PHP : 15 million hits
CF : 0.5 million hits

In summary: go with PHP.

HTH


Edit:
As mentioned by Al, CF developer's edition is free.


I as well as many others wrote a length answers to ColdFusion Vs PHP which may provide a greater language comparison.

If you only doing small tasks you can stick with HTTP and XML data transfer on the flash side. Unless your moving a lot of data you won't see a great benefit from the AMF ( Adobe Messaging Format ). If you need such binary data transfer PHPAMF is available as is Adobe's open source BlazeDS which comes with ColdFusion and is available separately.

I personally feel you should stick with what ever tool is more comfortable to you. But don't be confused by those who treat ColdFusion as inferior. ColdFusion is a java application as such if you can pull in any and all of the vast java libraries available. Java has more libraries than ANY language even the coveted PHP. Also for development Adobe's ColdFusion is free and well as Railo's Open source offering which bundles with Blaze DS the same open source Java/AMF server that ColdFusion 9 comes with. I personally use Railo and BlazeDs with great success as free open source CFML options.


A few thoughts on the matter, from someone who has developed in both PHP and ColdFusion

  • ColdFusion has better OO support than PHP5 (or maybe I'm just doing PHP5 OO wrong)
  • ColdFusion works better with a wide variety of other technologies (Flash/AMF, Databases, LDAP, .NET, Outlook, SMS, SOAP, JSON etc..) out of the box with no addons.
  • PHP has a smaller memory footprint
  • PHP is more easily available from shared hosting providers

Having said all of that, if you're looking at building small addons to your website using Flash/Flex there's no reason why you should feel obligated to learn a new language, and redo the rest of your site into CF. PHP will work fine. If you're solely a PHP developer, and you've already got experience with PHP, it might be worthwhile to pick up CFML as a side language, just to open up contracting opportunities, and broaden your horizons, but it's probably not worth it if you're just trying to get this project done quickly, and "the right way"


I'd just like to add another vote for the "Stick with PHP" bandwagon (from an active Coldfusion developer):

  • PHP is free and has great resources and a good community.
  • Coldfusion has an ever-decreasing community.
  • Syntax wise, Coldfusion is an eyesore.
  • Although Adobe makes both Coldfusion and Flash/Flex, I've found that the advantages to using Coldfusion over PHP for Flash/Flex support are minimal.
  • As bguiz said, Coldfusion has better support for databases. Specifically, switching from one database to another is easy and painfree. However, once again, the advantages over PHP are minimal.
  • PHP has full OO support, and support for closures and other helpful functionality.
  • Learning PHP and using PHP will help you in the future. Learning Coldfusion will (more than likely) make you regret learning Coldfusion.

To me, they are both viable, good options. This isn't necessarily an easy choice, as each language has it's own strengths and weaknesses. Having used both extensively, however, I have to give PHP the edge.


IMO, based on what you're saying (the projects your working on integrating flash and flex with right now only make use of these technologies in small and limited scopes), you'd be insane to switch to CF. That's far too much misery and grief for next to no gain.

That being said, if you ever intend on broadening your scope of usage with these products, you should at the very least concurrently pick up some CF knowledge. If either of these technologies are going to be a significant part of your future development plans, you'll need a knowledge of Coldfusion to determine if switching to Coldfusion is going to provide you with significant ease-of-integration and/or performance benefits.

Unfortunately, there isn't a good online source that can hand-hold you while you learn Coldfusion (like the hundreds that exist for PHP); But finding a Volume 1 for the Coldfusion Web Application Construction Kit (WACK) for either 7 or 8 can give you a good foundation to build on (while I don't know about the CF7 WACK, the Flash and Flex integration are covered in depth in Volume 2 of CF8's WACK; but you'll still need to understand the basics before reviewing that).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜