Java vs ActionScript

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
frosttec
Posts: 11
Joined: 01 Nov 2007, 12:53

Java vs ActionScript

Post by frosttec »

is there any diference betwen write a extension in AS or Java?
thx
turtlesoup
Posts: 77
Joined: 28 Dec 2007, 20:56

Post by turtlesoup »

java is faster.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Take into account that you can mix the two: you can write "time critical" code in Java and use it in Actionscript, so there's space for various optimizations.

Btw: pure Java code produce the best performance.
Lapo
--
gotoAndPlay()
...addicted to flash games
tobypb
Posts: 48
Joined: 15 Jun 2007, 20:50

Post by tobypb »

Aswell as being faster it seems to me the java extensions are cleaner from an Object Oriented perspective as the serverside extensions are ActionScript 2. For someone like myself this makes a big difference as I learnt OO and Java well before I learnt ActionScript. If the server side extensions were written in ActionScript 3 I'd feel differently about the issue as I think ActionScript 3 is a fantastic programming language.
frosttec
Posts: 11
Joined: 01 Nov 2007, 12:53

Post by frosttec »

Yes i agree with you. AS3 is a fantastic programming language. Until the smartfox extensions be in AS2 i think we all need for a clean code write in java ^^
thx for the answers
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

A couple of comments:

1. SmartFoxServer supports Actionscript 1.0 on the server side not 2.0
2. If you have good knowledge of Actionscript 3, using Java on the server side is a piece of cake. AS 3.0 is so much "inspired" by java to the point that almost all its keywords are present in Java too.

Check this language comparison for more details: http://flexblog.faratasystems.com/?p=115
Lapo
--
gotoAndPlay()
...addicted to flash games
tobypb
Posts: 48
Joined: 15 Jun 2007, 20:50

Post by tobypb »

I agree AS3 and Java are great languages. If it were possible I would have a combination of the two though, as there are some features of Java I wish AS3 had, such as function overloading and abstract classes, and some things AS3 has that I wish Java had, such as native getters and setters, and AS3's superb event handling mechanism.

Thinking about it I've written programs in C# before, which seems to encorporate pretty much the best of both these worlds.
Post Reply