Code Exchange between Flex and AIR

As you know, we could create a flex based RIA application. In addition, we could create an AIR-based desktop application. My question is: if we want to create a web application and a desktop application at the same time. Can we use the same codes to deliver our products to the website and desktop?

+3
source share
3 answers

If you are developing your own application for it, you should have no problem sharing 99% of the code base between Flex and AIR assemblies.

  • You will need a separate MXML application for Flex / AIR versions, as AIR uses WindowedApplicationand Flex usesApplication

  • API- AIR-only. , , AIR-only ( ) . , , Swift Suspenders.

  • , . , AIR Flex , . , , com.application.MyService, AIR Flex, com.application.MyService , " " .

  • , -define+=CONFIG::AIR. , , AIR.

:

public function getMyService() : IMyService
{
    CONIFG::AIR
    {
        return new MyServiceThatUsesAnAIROnlyAPI();
    }

    return new FallbackServiceForFlex();
}

, "" (.. !CONFIG::AIR), , (CONFIG::AIR CONFIG::FLEX)

+5

, , :

  • . .
  • Flex -
  • AIR AIR

Flex AIR . AIR AIR, -.

- - AIR, API.

+1

, . , .

, , . , , 3

  • ( - )

  • flex exporter = > , , flex # 1 .

  • air exporter = > , Air # 1 .

0

Source: https://habr.com/ru/post/1775381/


All Articles