What is the difference between Adobe AIR and Royale?


#1

Hi!

I use my app in AS3 / Flash CC -> Adobe AIR -> Windows / Android

I’m new in Royale, with Royale I can use only my AS3 code?
Royale is a competitor of the Adobe AIR?
Using Royale to compile to Windows and Android is best than Adobe AIR?

Or Royale is better only to export to HTML (not my case)?
Migrating to Royale is expected to better performance than Adobe AIR?

My App uses captive runtime.

Thanks a lot. :slight_smile:


**admin edit:** moved to its own topic

Are You Some Kind of Fanatics if You're Still Using ActionScript 3
#2

Hi,

I think it would be best to ask them directly see on their site

now without being an expert in Royale I can answer a bit

You can use both AS3 and MXML

Royale difference is at the level of the compiler
it can output SWF file like the Apache Flex SDK
but it can also output HTML/CSS/JS from AS3 and MXML


Not really, Adobe AIR is a runtime that can “play” SWF files
another runtime is the Flash Player plugin for the browser which can also play SWF files

the difference between Adobe AIR and Flash Player will be about
which API the SWF have access to, in short the capacity of the runtime

when Royale output HTML/CSS/JS formats there the runtime is the browser
and so the capacities are the one of the Web API in the browser


It really depends on which output format interest you

if you use Adobe AIR as a runtime you can compile with those choices

  • use the Adobe AIR SDK and compile SWF (and other formats like IPA, APK, etc.)
    that will run with the Adobe AIR runtime )with iOS it’s a bit different)
  • use the Apache Flex SDK merged with the Adobe AIR SDK
    and same as above compile SWF that will run with the Adobe AIR runtime
  • use Apache Royale and compile SWF or HTML/CSS/JS
    SWF format will run with the Adobe AIR runtime
    HTML/CSS/JS will run in the browser

If it’s not your case to target HTML format then yeah Royale is not really useful for you


Nope, the performance will depends on the runtime where you code is running.

If your goal is to target Adobe AIR as a runtime, either compiling from Apache Flex SDK, Adobe AIR SDK or Royale should output the same SWF, so the same SWF runtime in the Adobe AIR runtime should have same performance.


So I try to keep it simple but it is a bit more complicated than that.

Sure even if Royale can also output SWF than can run in Adobe AIR runtime,
you don’t necessarily gonna structure your code the same way as with Apache Flex SDK or Adobe AIR SDK.

With Royale the goal is to structure the code with MXML
based on an example here HelloWorld.mxml

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:mx="library://ns.apache.org/royale/mx"
                   width="600" height="400" >
	<!-- to do: layout="absolute" minWidth="955" minHeight="600" -->
	<fx:Style>
		@namespace mx "library://ns.apache.org/royale/mx";
		
		/* set position:absolute to make the (x,y) properties work */
		mx|Label {
			position: absolute;
		}
		
	</fx:Style>

	<mx:Label text="Hello World" x="20" y="20" />
        
</mx:Application>

this can compile to either a SWF or HTML and so can play in either Flash/AIR or a browser
but yeah you have to use MXML and the component framework associated to it.

So I would say the main advantage of Royale is to be able to write part of your code in ActionScript 3,
but I would say the main disadvantage is not be able to write “pure AS3” code because you have to use MXML for the UI layout.


#3

Thanks a lot for the explanation.

So if I have an “working” App in Adobe AIR for Windows and Android, this is the best option. If I go to Royale is probably a step backwards, cause the Adobe AIR is more native and possible best performance depending of the code/app. Am I correct?

There is a competitor of Adobe AIR to create multiple “native” target App with the same code?
O Adobe AIR não é 100% nativo, certo? O “Unity” é quase um Adobe AIR, certo?

I started developing apps in AS3 only 8 months ago, each day the App has better performance and stability, but I noticed the AIR 24 have better stability than AIR 28-29… Strange things…
My App does not use the new things, only video playback and XML communication. So is truly possible that one old version has more stability for my App than the new ones?

I like Adobe AIR, I use pure AS3, no MXML. But my Apps have worst stability in new versions (28, 29) than old versions (24) of the SDK. I’m testing the AIR SDK 30 to see is stability is better.

AIR 28 - 30 have to be better performance than old versions, no? Or the AIR system version is: new major version works differently than other major versions?
I will make tests on AIR 25, 26, 27 to see if the performance is good.

You actually use only Adobe AIR to dev to Windows/Android? Or you use something differently/better?

What do you think about the versions? Each new stable major version has better performance than the precessors? Or the new major version are focused on new functionalities?

EDIT:
Haxe is a competitor of Adobe AIR? If you create a very efficient App in Adobe AIR and in Haxe. Which one will possibly have better performance and stability?

Thanks a lot. :slight_smile:


#4

when you talking about performance you can NOT solely depend on what tools you are using.
Because in real life application there hundreds of different cases, targets , devices and the kind of apps itself.

Put simply: you CAN NOT expect great performance on just the tool you are using. Still LOT of underneath work to do.

People often said that C++ has better performance over all other shit in programming universe.
While its true that C++ have better access to machine resources, it DOES NOT automatically performant by default. Using C++ without deep understanding could instead break your app instead of making it faster because once you failed to correctly manage memory , things can go very wild.

The same thing is almost true on other tech.

Even if you were expecting so-called “fast native performance” using C++ , relying on the toolkit itself simply NEVER enough.


#5

There is no magic bullet.

There is not a single technology out there that gonna make an app performant by default.

When I read

oh boy … you got a lot to learn…

Things like performance and stability does not come from the technology you use or the SDK version etc.
it comes from your code, how you write it, how you plan for it

Read Performance-tuning Adobe AIR applications, the introduction explains it quite well

Application performance is perennial. It’s in its nature. In order for an application to perform well, every part of the application has to perform well. Lapse in one area and it brings your entire application down. It’s difficult to write a large application without letting your guard down once in a while.

Questions about performance often indicate a failure to understand this weakest-link-in-the-chain aspect of the problem. Here are some of my favorite lousy questions about performance and AIR applications:

  • Will my AIR application be fast?
  • Is AIR fast enough to do X?
  • Isn’t AIR too slow to do Y?

(Here’s proof also that no matter what your kindergarten teacher told you, there is such a thing as a lousy question.)

AIR almost never makes it impossible to achieve good performance in your application. On the other hand, AIR can’t do it for you, either. Like I said, it’s the nature of the problem.

Fortunately, standard tuning techniques apply to AIR as much as they’d apply to writing any piece of desktop software.

If you search this forum archives for performance you will find that
Memory and Performance

The developer writing the app is responsible for its performance and/or stability.

So yeah Adobe AIR is not responsible, see above

AIR almost never makes it impossible to achieve good performance in your application. On the other hand, AIR can’t do it for you, either.

If you want performance, as a developer it is your job to put that in place.

First, you have to measure it, if you’re coming with a “feel” or an “impression” you are already doing it wrong.

Second, you can not expect to add more and more stuff to your app and keep the performance without putting the effort to make it performant.

And yeah it does take a lot of efforts.


#6

Thanks, what you said is truly. :slight_smile:


#7

oh boy … you got a lot to learn…

Things like performance and stability does not come from the technology you use or the SDK version etc.
it comes from your code, how you write it, how you plan for it

When I read these words, my first think is: It is not possible, I’m correct, hard work and my app is not the big problem.
But thinked again and again and again… And you are correct, The “classes” I use in the App are very old, but useful, but something is not correct. I’m changing my whole app to not depend on some classes, to focus better in my main code, so if something goes wrong, probrably I will find easier the problem …

The little I have tested, the new version of AIR are better in CPU and memory management, so my “App and classes” are the problem.

If you want performance, as a developer it is your job to put that in place.

First, you have to measure it, if you’re coming with a “feel” or an “impression” you are already doing it wrong.

Second, you can not expect to add more and more stuff to your app and keep the performance without putting the effort to make it performant.

And yeah it does take a lot of efforts.

You are correct again, I will not add any feature until my App have better performance.

Thanks a lot! :slight_smile: