The more I code in AS3 the more I want to be able to use it as a server side programming language - mainly as a replacement for PHP. I might be missing something, but at first glance, I don't see any reasons this wouldn't be possible with a little effort from Adobe.
Let's look at the current manifestations of ECMAScript 4, the standard on which ActionScript 3 and the new version of JavaScript are based. There is Flash/Flex (SWF) with delivery to the web browser via a plug-in, JavaScript for direct interaction with the web browser, and AIR (Apollo) for desktop delivery. The only missing piece is server-side deployment, a fact of which I'd bet Adobe is well aware.
PHP is a great server-side language which I use very often, but every language has its own nuances, and switching continuously between PHP and AS3 often opens the door for several small bugs due to the syntactical differences.
As a framework for how much effort it would take to port AS3 for server-side usage, let's look at how PHP5 and AS3 compare on key web development factors. These core features are supported in both PHP5 and AS3:
- MySQL/database integration (PHP built-in, AS3 through classes)
- Open source and free
- Extendable (PHP through plugins, AS3 through classes)
- Large developer community
- Class-based development possible (Full OOP in AS3)
So with most of the features needed already included in AS3 or written by the community, why not take the extra step and port it to the server side? I'm sure Adobe doesn't want to sell Coldfusion 8 short, so there is that corporate hurdle. I could see it being integrated with Coldfusion in a similar manner that ActionScript can be included in MXML through the usage of a code/cdata block.
All said, nothing is stopping the community from developing an open source project based around this concept. A quick search of Google reveals that at least one other person is having similar thoughts.
Would you use AS3 if it was ported for server-side usage?










