CN108810045B - Flash application updating method and system based on Json file - Google Patents
Flash application updating method and system based on Json file Download PDFInfo
- Publication number
- CN108810045B CN108810045B CN201710296645.8A CN201710296645A CN108810045B CN 108810045 B CN108810045 B CN 108810045B CN 201710296645 A CN201710296645 A CN 201710296645A CN 108810045 B CN108810045 B CN 108810045B
- Authority
- CN
- China
- Prior art keywords
- file
- flash application
- module
- json
- json file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/73—Program documentation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Library & Information Science (AREA)
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a Flash application updating method and system based on a Json file, wherein the method comprises the following steps: according to the function of the Flash application, a Json file is configured at a server side, and the Json file comprises all module names which need to be loaded by the function of the Flash application; creating a configuration strategy file at a server side, wherein the configuration strategy file comprises a network domain name of a Flash application; loading a configuration strategy file by a Flash application, and loading a Json file according to the configuration strategy file; analyzing the Json file after the loading is finished by the Flash application to obtain all module names which need to be loaded by the functions of the Flash application; and traversing all the module names by the Flash application, and initializing the module controller corresponding to each module name. The invention can get on and off the function in the Flash application on the basis of not needing to iterate the Flash application; the invention not only obviously reduces the working cost, but also greatly reduces the error rate and the bug occurrence probability, and is very suitable for popularization.
Description
Technical Field
The invention relates to the field of Flash application updating, in particular to a Flash application updating method and system based on Json files (JavaScript Object notification, lightweight data exchange format files).
Background
With the development of communication technology, Flash applications have been widely used in the internet in large numbers. The life cycle of a Flash application is often the life cycle of an entire Flash product. In the life cycle of the Flash application, the Flash product may repeatedly bring some functions online to the user for use (for example, obtaining an activity gift package) according to different time nodes, and may bring some functions offline; for example, a spring festival gift bag is used in spring festival of this year, and when the spring festival is over, the function needs to be off-line, and then on-line is carried out in spring festival of next year.
At present, according to different time nodes, when the Flash application has the same functions of online and offline, the current method generally comprises the following steps: and performing product iteration once on the version of the Flash application by developers every time the Flash application is in the online and offline function, namely covering the old version of the Flash product with the new version of the Flash product. However, the above method has the following drawbacks:
the Flash products of the new and old versions are different only in that the online function is added, and a large amount of labor cost is input for the online function, so that the working cost is increased, the error rate of manual iteration is high, the bug occurrence probability of the Flash products is increased, and the quality of the Flash products is further reduced.
Disclosure of Invention
Aiming at the defects in the prior art, the invention solves the technical problems that: how to go up and down the functions in the Flash application on the basis of not needing to iterate the Flash application. The invention not only obviously reduces the working cost, but also greatly reduces the error rate and the bug occurrence probability, can ensure the quality of Flash products, and is very suitable for popularization.
In order to achieve the above purpose, the Flash application updating method based on the Json file provided by the invention comprises the following steps:
s1: according to the function of the Flash application, a Json file is configured at the server side, the Json file comprises all module names which need to be loaded by the function of the Flash application, and the operation is switched to S2;
s2: creating a configuration policy file at the server, wherein the configuration policy file comprises a network domain name of the Flash application, and turning to S3;
s3: loading a configuration strategy file by the Flash application, loading a Json file according to the configuration strategy file, and turning to S4;
s4: the Json file after the Flash application is analyzed and loaded is obtained, all module names which need to be loaded by the functions of the Flash application are obtained, and the step is switched to S5;
s5: and traversing all the module names by the Flash application, and initializing the module controller corresponding to each module name.
The invention provides a Json file-based Flash application updating system, which comprises a Json file configuration module, a configuration policy file creating module, a Json file loading module, a Json file analyzing module and a Flash application function on-line module, wherein the Json file configuration module, the configuration policy file creating module, the Json file loading module, the Json file analyzing module and the Flash application function on-line module are positioned on a server;
the Json file configuration module is used for: configuring a Json file according to the function of the Flash application, wherein the Json file comprises all module names which need to be loaded by the function of the Flash application, and sending a configuration policy file establishing signal to a configuration policy file establishing module;
the configuration policy file creation module is to: after receiving a configuration policy file creating signal, creating a configuration policy file, wherein the configuration policy file comprises a network domain name of Flash application, and sending a Json file loading signal to a Json file loading module;
the Json file loading module is used for: after receiving the Json file loading signal, loading a configuration strategy file, loading the Json file according to the configuration strategy file, and sending a Json file analysis signal to a Json file analysis module;
the Json file parsing module is used for: after receiving the Json file analysis signal, analyzing the loaded Json file to obtain all module names required to be loaded by the function of the Flash application, and sending a Flash application function on-line signal to the Flash application function on-line module;
the Flash application function online module is used for: after receiving the Flash application function on-line signal, initializing the module controller corresponding to each module name according to all module names.
Compared with the prior art, the invention has the advantages that:
(1) it can be known from S1 to S5 of the present invention that, in the present invention, a corresponding Json file is configured for a function in a Flash application, and when the function needs to be on-line, the Flash application loads and parses the Json file, and when the function needs to be off-line, the Flash application is initialized normally, and the Json file is not loaded and parsed. Therefore, the invention separately operates the functions in the Flash application and the Flash application, so that developers can go up and down the functions in the Flash application on the basis of not needing to iterate the Flash application, thereby not only obviously reducing the working cost, but also greatly reducing the error rate and the bug occurrence probability, ensuring the quality of the Flash product and being very suitable for popularization.
On the basis, the Json file is used for controlling the online and offline of the functions in the Flash application, and the data format of the Json file is simple and easy to read and write; moreover, the Json file is a compressed file, occupies small bandwidth, is easy to analyze, and supports multiple languages.
(2) According to the method and the device, the Json file is loaded and analyzed in the Flash application initialization process, so that the function corresponding to the Json file can be online in the Flash application before the Flash application initialization is completed, the function can be displayed immediately after the Flash application initialization is completed, and the operation quality of the Flash application is ensured.
Drawings
Fig. 1 is a flowchart of a Flash application updating method based on a Json file in the embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
First, the development principle of the present invention is described:
the Flash application can be considered as a stage (container) to which several logical visual elements are added by developers, and the visual elements can be considered as a view (views, such as panels, buttons, etc.). Namely, the Flash application seen by the user is a set of a plurality of visual elements, and the visual elements seen by the user are all the visual elements added to the stage.
For Flash functionality, 1 function is a set of view elements, i.e. a view of a function, and a function generally needs some logic operations as support to control the state of the view of the function (e.g. add to stage, modify font size color, etc.).
In view of the above information, the present invention seeks to operate the above-described Flash function separately from the Flash application, thereby enabling the Flash application to iterate without having to go online with respect to the Flash function.
On the basis, referring to fig. 1, the Flash application updating method based on the Json file in the embodiment of the present invention includes the following steps:
s1: according to the function of the Flash application, a Json file is configured at a server side, the Json file comprises all module name arrays which need to be loaded by the function of the Flash application, and the configuration mode of the Json file is as follows: { moduleList [ name1, name2, name3.... namen ] }; the moduleList is a string array for which all module names need to be loaded, and the string array includes name1, name2, and name3.... times. namen, and corresponds to a specific module name.
The benefits of using the Json file in S1 without using other external policy files (e.g., xml file, txt file, etc.) are: the data format of the Json file is simple and easy to read and write; moreover, the Json file is a compressed file, occupies small bandwidth, is easy to analyze, and supports multiple languages.
S2: creating a configuration policy file at a server, wherein the configuration policy file comprises a network domain name of a Flash application, and the configuration mode of the configuration policy file is as follows:
<cross-domain-policy>
<allow-access-from domain="url"secure="true"/>
</cross-domain-policy>
wherein url is the network domain name of the Flash application.
The principle of S2 is: the only limiting strategy when a Flash application is cross-domain is a cross domain. When the Json file is loaded by the Flash application, if the Flash application and the Json file are not in the same security domain, the security sandbox can be triggered, and the configuration policy file can allow the Flash application to read and write the Json file in a cross-domain mode, so that the problems are solved.
S3: initializing a Flash application, loading a configuration strategy file in an initialization process, and acquiring a network domain name of a Json file; loading the Json file according to the network domain name of the Flash application in the configuration policy file and the network domain name of the Json file in S1, wherein the specific implementation mode is as follows:
_load=new Loader()
_load.contentLoaderInfo.addEventListener(Event.COMPLETE,dataC omplete);
_load.load(new URLRequest(url));
where Url is the network domain name of the Json file and _ load is the loader.
In the S3, the Json file is loaded and analyzed in the Flash application initialization process, so that the function corresponding to the Json file can be online in the Flash application before the Flash application initialization is completed, the function can be displayed immediately after the Flash application initialization is completed, and the operation quality of the Flash application is ensured.
S4: after the Json file is loaded, analyzing the Json file by a dataComplete method to obtain all module name arrays which need to be loaded by the functions of the Flash application, wherein the specific implementation mode is as follows: var OpenCodeArr: the Array is (data) as Array, where OpenCodeArr is a data Array parsed from a Json file, and data is Json data carried in a dataComplete method.
S5: traversing all module name arrays by the Flash application, initializing the module controller corresponding to each module name, and further completing the function on-line of the Flash application, wherein the specific implementation mode is as follows:
for(var i:int=0;i<OpenCodeArr.lenght;i++)
{New(OpenCodeArr[i]as class)}。
the Json file-based Flash application updating system in the embodiment of the invention comprises a Json file configuration module, a configuration policy file creating module, a Json file loading module, a Json file analyzing module and a Flash application function on-line module which are positioned on a server side.
The Json file configuration module is used for: configuring a Json file according to the function of the Flash application, wherein the Json file comprises all module name arrays which need to be loaded by the function of the Flash application, and sending a configuration policy file establishing signal to a configuration policy file establishing module;
the configuration policy file creation module is to: after receiving the configuration policy file creating signal, creating a configuration policy file, wherein the configuration policy file comprises a network domain name of Flash application, and sending a Json file loading signal to a Json file loading module.
The Json file loading module is used for: after receiving a Json file loading signal, initializing a Flash application, loading a configuration strategy file, and acquiring a network domain name of the Json file; loading a Json file according to a network domain name applied by Flash in a configuration policy file and the network domain name of the Json file; and sending a Json file analysis signal to a Json file analysis module.
The Json file parsing module is used for: and after receiving the Json file analysis signal, analyzing the loaded Json file to obtain all module name arrays needing to be loaded by the function of the Flash application, and sending a Flash application function on-line signal to the Flash application function on-line module.
The Flash application function online module is used for: after receiving the Flash application function on-line signal, initializing the module controller corresponding to each module name through all module name arrays.
According to the embodiment of the invention, the corresponding Json file is configured for the function in the Flash application, when the function needs to be on-line, the Flash application loads and analyzes the Json file, and when the function needs to be off-line, the Flash application is initialized normally without loading and analyzing the Json file. Therefore, the invention separately operates the functions in the Flash application and the Flash application, so that developers can go up and down the functions in the Flash application on the basis of not needing to iterate the Flash application, thereby not only obviously reducing the working cost, but also greatly reducing the error rate and the bug occurrence probability, ensuring the quality of the Flash product and being very suitable for popularization.
Further, the present invention is not limited to the above-mentioned embodiments, and it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and these modifications and improvements are also considered to be within the scope of the present invention. Those not described in detail in this specification are within the skill of the art.
Claims (8)
1. A Flash application updating method based on Json files is characterized by comprising the following steps:
s1: according to the function of the Flash application, a Json file is configured at the server side, the Json file comprises all module names which need to be loaded by the function of the Flash application, and the operation is switched to S2;
s2: creating a configuration policy file at the server, wherein the configuration policy file comprises a network domain name of the Flash application, and turning to S3;
s3: loading a configuration strategy file by the Flash application, loading a Json file according to the configuration strategy file, and turning to S4;
s4: the Json file after the Flash application is analyzed and loaded is obtained, all module names which need to be loaded by the functions of the Flash application are obtained, and the step is switched to S5;
s5: traversing all module names by the Flash application, and initializing a module controller corresponding to each module name;
before the Flash application loads the configuration policy file in S3, the method further includes the following steps: the Flash application is initialized.
2. The Json-file-based Flash application update method of claim 1, wherein: before loading the Json file according to the configuration policy file in S3, the method further includes the following steps: and the Flash application acquires the network domain name of the Json file.
3. The Json-file-based Flash application update method of claim 2, wherein: the process of loading the Json file according to the configuration policy file in S3 includes: and loading the Json file according to the network domain name applied by the Flash in the configuration policy file and the network domain name of the Json file.
4. The Json file based Flash application updating method according to any one of claims 1 to 3, wherein: all module names described in S1, S4, and S5 are a set of tuples.
5. A Flash application updating system based on Json files is characterized in that: the system comprises a Json file configuration module, a configuration policy file creation module, a Json file loading module, a Json file analysis module and a Flash application function on-line module which are positioned on a server side;
the Json file configuration module is used for: configuring a Json file according to the function of the Flash application, wherein the Json file comprises all module names which need to be loaded by the function of the Flash application, and sending a configuration policy file establishing signal to a configuration policy file establishing module;
the configuration policy file creation module is to: after receiving a configuration policy file creating signal, creating a configuration policy file, wherein the configuration policy file comprises a network domain name of Flash application, and sending a Json file loading signal to a Json file loading module;
the Json file loading module is used for: after receiving the Json file loading signal, loading a configuration strategy file, loading the Json file according to the configuration strategy file, and sending a Json file analysis signal to a Json file analysis module;
the Json file parsing module is used for: after receiving the Json file analysis signal, analyzing the loaded Json file to obtain all module names required to be loaded by the function of the Flash application, and sending a Flash application function on-line signal to the Flash application function on-line module;
the Flash application function online module is used for: after receiving a Flash application function on-line signal, initializing a module controller corresponding to each module name according to all module names;
before the Json file loading module loads the configuration policy file, a Flash application is initialized.
6. The Json file-based Flash application update system of claim 5, wherein: before the Json file loading module loads the Json file according to the configuration policy file, the network domain name of the Json file is required to be acquired.
7. The Json file-based Flash application update system of claim 6, wherein: the process of loading the Json file by the Json file loading module according to the configuration policy file comprises the following steps: and loading the Json file according to the network domain name applied by the Flash in the configuration policy file and the network domain name of the Json file.
8. The Json file based Flash application update system of any one of claims 5 to 7, wherein: all module names in the Json file configuration module, the Json file analysis module and the Flash application function on-line module are a group of arrays.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710296645.8A CN108810045B (en) | 2017-04-28 | 2017-04-28 | Flash application updating method and system based on Json file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710296645.8A CN108810045B (en) | 2017-04-28 | 2017-04-28 | Flash application updating method and system based on Json file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108810045A CN108810045A (en) | 2018-11-13 |
CN108810045B true CN108810045B (en) | 2021-03-16 |
Family
ID=64070491
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710296645.8A Active CN108810045B (en) | 2017-04-28 | 2017-04-28 | Flash application updating method and system based on Json file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108810045B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104615458A (en) * | 2014-12-31 | 2015-05-13 | 福建天晴数码有限公司 | Module loading method and system based on json data format |
CN105302564A (en) * | 2015-11-09 | 2016-02-03 | 中国人民解放军91655部队 | Online office software service control and implementation method |
CN105426204A (en) * | 2015-11-05 | 2016-03-23 | 浪潮软件集团有限公司 | Web high-speed loading rendering method based on domestic CPU, operating system and browser |
WO2017019749A1 (en) * | 2015-07-30 | 2017-02-02 | Nasdaq, Inc. | Software application architecture |
-
2017
- 2017-04-28 CN CN201710296645.8A patent/CN108810045B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104615458A (en) * | 2014-12-31 | 2015-05-13 | 福建天晴数码有限公司 | Module loading method and system based on json data format |
WO2017019749A1 (en) * | 2015-07-30 | 2017-02-02 | Nasdaq, Inc. | Software application architecture |
CN105426204A (en) * | 2015-11-05 | 2016-03-23 | 浪潮软件集团有限公司 | Web high-speed loading rendering method based on domestic CPU, operating system and browser |
CN105302564A (en) * | 2015-11-09 | 2016-02-03 | 中国人民解放军91655部队 | Online office software service control and implementation method |
Also Published As
Publication number | Publication date |
---|---|
CN108810045A (en) | 2018-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10255051B2 (en) | Generation of dynamic software models using input mapping with feature definitions | |
US20120331447A1 (en) | Adaptive change management in computer system landscapes | |
US9696972B2 (en) | Method and apparatus for updating a web-based user interface | |
US10067863B1 (en) | Feature targeting of test automation lab machines | |
US20180121339A1 (en) | System and Method for Testing Behavior of Web Application Software | |
US20180322037A1 (en) | Impersonation in test automation | |
CA2968947C (en) | Enhanced upgrade path | |
US20130232245A1 (en) | Automation for virtualized it environments | |
US20140082511A1 (en) | Method and system for emulating desktop software applications in a mobile communication network | |
US10521243B2 (en) | Pre/post deployment customization | |
CN103608799A (en) | Automated user interface object transformation and code generation | |
US10776254B1 (en) | Executing integration scenario regression tests in customer landscapes | |
US10740537B2 (en) | Enterprise form dependency visualization and management | |
US20180322038A1 (en) | Segmenting user population to manage dynamic software quality | |
US20140130031A1 (en) | Loading remote binaries onto a write-protected device | |
US20080184078A1 (en) | Manipulating a configuration file for a network switch | |
US10757169B2 (en) | Selective master data transport | |
CN108810045B (en) | Flash application updating method and system based on Json file | |
CN113515275A (en) | WYSIWYG cloud industrial configuration software system and development method thereof | |
US11487411B2 (en) | Context-driven group pill in a user interface | |
US10713041B1 (en) | Application configuration manager | |
US9477492B2 (en) | Deploying multi-channel or device agnostic applications | |
CN110673879A (en) | One-key adjustment method and device for element style of configuration software | |
US20100037240A1 (en) | Non Intrusive Application Mechanism | |
CN108829411B (en) | Method and system for updating Flash application through server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |