Let's talk about the Flex App's deep link ~

Source: Internet
Author: User
This article focuses on the deeplink solution in flex2 and flex3 applications, the updated Use of urlkit, And the deeplink solution built in flex3. Refer to previous descriptions.

First, let's talk about the relationship between history management and deeplink In the flex app. First, there is no built-in solution for deeplink in the flex2 framework application (of course, we can use one of the solutions described above, such as urlkit), with only history management, that is, to support browser forward and back button commands, such a limited function (rarely used) is only a subset of deep link functions. deep link requires that web Applications Support mutual communication between URLs and application states (equivalent to two-way binding), browser back, forward Support (So of course bookmark will naturally support ). In this way, we can see that our application must implement deep link, whether in flex2 or flex3.

Let's talk about the deep link solution in flex2 and flex3 applications. In flex2, we usually choose open-source solutions such as swfaddress or urlkit, flex3 has built-in support for deeplink (for details, see Flex3 Help beta3). Whether in flex2 or 3, or which solution is used, basically, you can (strictly speaking) disable the history management Support of the flex app, which is in conflict with the function implementation process of deep link, in addition, deep link already includes the functions of the former, so there is no need to disable it. Another solution for implementing deep link in flex2 is to extract the implementation of deep link in flex3 and compile it into an independent swc for use. In flex3, the reality of this block is relatively independent, independent from the rest. For detailed steps, see using flex3 deep link in flex2 * Create a new Flex Library project based on the Flex 2.0.1 SDK
* Copy the following files into it from the Flex 3 SDK source:
Mx/core/Version. as (note: this is supported by the other files, but not compiled itself)
Mx/events/BrowserChangeEvent.
Mx/managers/IBrowserManager.
Mx/managers/BrowserManager.
Mx/managers/BrowserManagerImpl.
* Comment out the line in BrowserManagerImpl. init () which sets the historyManagementEnabled flag
-This does not exist in Flex 2.
* Compile the above files (excluding Version. as) into a SWC
* In your Flex 2 application, drop in an HTML template generated by Flex Builder 3 for a Flex 3
Deep-linking app. This template will include a history/subdirectory
JavaScript and CSS files in it, and the HTML page loading the app will refer to those files.
* Add the following line to your application startup, prior to calling BrowserManager. getInstance ()

Singleton. registerClass ("mx. managers: IBrowserManager ",
Class (getDefinitionByName ("mx. managers: BrowserManagerImpl ")));


* Create a new Flex Library project based on the Flex 2.0.1 SDK
* Copy the following files into it from the Flex 3 SDK source:
Mx/core/Version. as (note: this is supported by the other files, but not compiled itself)
Mx/events/BrowserChangeEvent.
Mx/managers/IBrowserManager.
Mx/managers/BrowserManager.
Mx/managers/BrowserManagerImpl.
* Comment out the line in BrowserManagerImpl. init () which sets the historyManagementEnabled flag-this does not exist in Flex 2.
* Compile the above files (excluding Version. as) into a SWC
* In your Flex 2 application, drop in an HTML template generated by Flex Builder 3 for a Flex 3 deep-linking app. this template will include a history/subdirectory with JavaScript and CSS files in it, and the HTML page loading the app will refer to those files.
* Add the following line to your application startup, prior to calling BrowserManager. getInstance ()

Singleton. registerClass ("mx. managers: IBrowserManager ",
Class (getDefinitionByName ("mx. managers: BrowserManagerImpl ")));


Urlkit is recommended for the following reasons:
1. convenient to use and declarative Application
2. The implementation of deep link in flex3 comes from urlkit
3. urlkit has the latest update (just now ~~, Very timely.) For ie7 and safari support and flex2 and flex3 unification
4. The deep-link support in flex3 is only a temporary version during flex development. adobe will implement a more automatic integrated solution in the future (see its flex3 deep-link implementation section ), urlkit should be used before this.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.