I've talked about this in part in other posts and on other blogs. It seems everyone I talk to about it thinks its a good idea, but that doesn't mean it will happen.
What am I taking about, well it is now common knowledge that ColdFusion 9 will support full script syntax, that means that if you wish you can write all your cfc's without a single tag.
Great, cant wait, there is no place for tags in clases IMHO, and yes they are classes as far as I am concerned not components.
Adobe are on a big push about how ColdFusion 9 and Flex 4 will play so well together, well if they are serious about this, they need to bridge the gap and do it now, not in ColdFusion 10 or later, as they will miss the boat.
And by bridge the gap, I mean, they need to have a common (or similar) syntax between both ColdFusion & Flex. There is no reason they cant do this, the cfc's are parsed and compiled before anything is executed, so its just a bit of extra parsing.
Some examples, if I may
Script: var q = new Query();
ActionScript: var q = new Query();
Now technically ActionScript 3 would have
var q:Query = new Query();
But seeing as ColdFusion is loosly typed, this isn't necessary, thus the above two are equilivant, perfect, Im a happy man.
But this isn't always the case.
Script: Component {
ActionScript: public class {
This one annoys me, why ColdFusion people needed to call a class a component is beyond me. Especially annoying since a component in Flex is something completly different, everyone else calls it a class, so lets call it a class.
The next one is annoying because of how often you write it
Script: private function query getEmployee(employeeId) {
ActionScript: private function getEmployee(employeeId):query {
now this might seem minor, but if you are swapping back and forward from CF to AS all day, it will be very annoying.
Now the major reason they should do this and now, is that there are a lot of legacy Flash developers, moving to ActionScript 3 and Flex who are looking for a back end. They try things, I've seen them on twitter asking what to use, amfphp, weborb, coldfusion. Now if coldfusion supported an actionscript style syntax, it would be a no brainer, and we might turn a large user base of ActionScript people over to ColdFusion.
Now, I'm not saying we should drop old school cfscript syntax or tags, these should work also, as backward compatibility is important, but there is no reason why the parser cant support both. I urge all you who agree to comment, post a blog, comment on the Tim Buntel or Ben Forta blogs. Make a noise and lets lock in a long future of Flex and ColdFusion.
14 February 2009
Subscribe to:
Post Comments (Atom)
convert dvd to ipod converter movie Software for online marketing to load..
Find debt consolidation loans and more. Apex Professionals llc
hard drive rescue
winston cigarettes
reduce high blood pressure
Technical Analysis
Buy Windows 7 data recovery software
Search Technical Schools and Colleges term paper Dubai Holidays Packages

11 comments:
Dale,
First lets talk about the fact that they are two different languages, so the fact that I spend as much time in Javascript than I do with Coldfusion these days is like me saying that Coldfusion needs to be also Javascript complient.
However as they are different languages, then they should be treated in that manner.
The problem is the integration with the 2 langauges, that needs more support. And rather than map the CFC in Flex I would rather see, an object be available to be returned to Flex and one can use the methods from their like a webservice goes, or remote objects.
I am not in favour of AS3 style syntax within a language that is not or never has been geared to one other language integration.
But I do agree that component was actually a good name in the days it was introduced, as it wasnt OO back then and hence really wasn't a class.
but how things change in time;-)
Dale I can't agree with you more. I would love to be able to use the same syntax for my backend ColdFusion code leveraging all Coldfusion has to offer with the exact snytax I use for the front end ( Actionscript ).
@Andrew,
It makes perfect sense, its the reason .NET supports multiple languages, because people what choice. ColdFusion needs to catch up.
@Paul,
I would like to hear from Adobe as to a good reason not to do this, I cant think of any downside.
Dale,
If and I will say this as I have stated this many times before, instead of looking at the solution coming from ColdFusion because I doubt it will ever happen.
The language is moving in a direction that AS3 will maybe never be compatible with.
However as I have blogged before, if one needs to be able to code with AS3 for a server sided language, it would be better to raise awareness that this would be a good thing.
I would like to see that ColdFusion can run other languages within ColdFusion... Oh wait a minute it can.
There is no reason why an AS3 style server sided language can't be written now, Java supports this with their Script Engine Manager and is how one is able to run PHP, Groovy and Ruby as well as maybe many others that use that engine.
Now comes the beauty about a seperate engine, you are no longer tied to ColdFusion and it could run as a separate entity.
The point is that one doesn't need to wait for it to happen, and people are able to create that need right now. The downside is that you don't have the support of Adobe's knowledge in AS3.
I am not saying that the need is not there, I am saying that they are two sperate languages that are both very capable of further integration via another tier if need be right now.
Just a follow up to this entire discussion.
For those who don't know about Tamarin then it might be a good chance to look at this, or if you don't know about Rhino then maybe its a good start to look at as well.
Now I know that this is not 100% what your asking for Dale, however it highlights what I have been trying to say for over 12 months now when this discussion comes up.
If you are interested then do look at how cfgroovy adds more power to ColdFusion right now, and that is what I mean by its available right now for ecmascript support in ColdFusion.
While I agree that this is possible, I think you may be underestimating the amount of effort that would be required to not only write a Java compiler for ActionScript, but one that would tie into the underlying ColdFusion Java classes, as well as be kept up to date with the latest versions of ActionScript and ColdFusion. This would be a very large undertaking.
I agree with you that it would be cool to have server side ActionScript. Though I doubt it will be in Centaur (CF9) and if you look on Adobe labs you can see the major announced features. One feature which seems to somewhat resemble your suggestion is "ColdFusion services exposed for Flex and AIR via Actionscript libraries" but what that will entail is unknown. Unless someone out there would like to shed some light on this feature?
If you've used Flash media server you would have had the chance to use AS in it's current server side form which is a some what lack lustre AS1. If Adobe wanted to push AS as a server side tech this was it's chance. Even with the later version they haven't which I think is a bit silly. Potentially it could have been a direct competitor to CF.
If AS3 is on the server side there has to be some great benefit for having it there. Some mixing of tech and features which at the moment I don't see happening. If your main concern is the ability to write classes in script then you will be able to do that in Centaur.
Adobe doesn't see CF as the only back end and I don't see the need to make this the case. CF has it's own merits and reasons why you use it. I don't see the need to capture every migrating AS1-2 developer as a potential CF developer.
To a certain extent I think you believe AS3 support in CF would bring a huge increase the CF developer base... It's like your assuming AS1-2 developers who don't use a server side tech would take up CF by default. I think that is a wrong assumption since there is a lot more to that decision.
Can I also add that there is also a high drive for other server languages to have Flex integration as well.
Grails is gaining a huge momentum in supporting Flex remoteing now, so does this mean that Grails needs to be AS3 ECMA script too?
So the age old argument that it will bring more developers to CF is not the problem, nor will it be a part of the solution.
As much as I see the benefits of what Dale is saying, it would be like turning around and saying to all other developers that we should be adopting one singular scripting language and that also will never happen.
I do not see ECMAScript as a very powerfull language, and even though it has been around for a very long time it isnt really getting anything ground breaking either.
Coldfusion on the other hand, is what already is making the distinction between what is RAD and what is not, I personally dont see AS3 as a RAD development language at the moment.
Can I also say that maybe some point down the future, there could be the case of writing a server runat into Coldfusion and allow the developer to be able to interpolate between the 2 languages of CF and AS. But lets face it there is already talk on how the future of the language is going to move forward, and what really needs to be discussed is how Coldfusion could deliver a better and easier interploation between server and client and writing CF code in AS3 is not the answer.
Hell as much as I would like to see it, why dont we just adopt all languages to become the one syntax style and make it totally easy for everyone then!
I'm pretty sure the intention of this post is to have Actionscript syntax for Coldfusion code not a server side compilation of actionscipt ( Flex/Flash ) code into swfs.
I for one am in favor of the actionscript syntax for Coldfusion.
@Andrew, Im not sure you understand what I'm talking about.
@Anonymous, You are correct.
I want them to support either java or actionscript style syntax withing a cfscript block.
Not that hard, ColdFusion parses the code and turns it into java, just a bit more parsing needed.
@Dale - I actually do understand, and with the addition of leveraging of Rhino you can create your own script block to write ECMA script.
As for it being native in ColdFusion I doubt it will happen, as much as I see your point I dont see it actually happening.
Post a Comment