CN105468398A - Module uploading method, request method and loading method for cross-terminal architecture - Google Patents
Module uploading method, request method and loading method for cross-terminal architecture Download PDFInfo
- Publication number
- CN105468398A CN105468398A CN201410520198.6A CN201410520198A CN105468398A CN 105468398 A CN105468398 A CN 105468398A CN 201410520198 A CN201410520198 A CN 201410520198A CN 105468398 A CN105468398 A CN 105468398A
- Authority
- CN
- China
- Prior art keywords
- module
- terminal
- cross
- line module
- terminal system
- 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.)
- Pending
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The present application provides a module uploading method, a request method and a loading method for a cross-terminal architecture. The loading method comprises: by predefining a code format of user modules, registering the user modules which are written according to the format to the cross-terminal architecture, i.e. converting the user modules into modules which can be used by the cross-terminal architecture; moreover, performing differential handling on differences of terminal systems; and loading the determined to-be-used modules into the terminal systems according to different processing modes. According to the technical solution adopted by the present application, by unifying the code format of the user module, the condition that cross-terminal developers repeatedly write the same code in order to realize the same function is avoided, thereby improving development efficiency and maintainability of a final product code; and moreover, differential handling on the terminal systems enables the modules to be compatible.
Description
Technical field
The application relates to field of computer technology, particularly the module method for uploading of cross-terminal framework, requesting method and loading method.
Background technology
Along with javascript is applied at increasing platform, comprise traditional client, such as pc browser, also be applied to movement, dull and stereotyped client in recent years, such as, touch screen browser, and nodejs server end, this just shares code for the client and server end being difficult to realize in the past and provides possibility, and when solving cross-terminal problem, prior art there is no good solution.Common way uses different frameworks and class libraries for each platform, this result caused is, one side developer wants the framework under familiar with understanding different platform to use, some identical functions are had on the other hand under different platform, and under existing technical scheme, this part identical function needs to repeat to realize based on different frameworks and class libraries under different platform.
User interface library) framework, but YUI framework still lays particular emphasis on traditional client and pc browser, for the support very imperfection of touch screen browser and nodejs server end.
The deficiencies in the prior art are, still do not have a kind of framework can solve cross-platform code sharing preferably at present, and can carry out the javascript exploitation of cross-terminal based on this framework.
application content
The technical matters solved in the embodiment of the present application is, provides the module method for uploading of cross-terminal framework, requesting method and loading method, in order to solve cross-platform code sharing.
Provide a kind of module loading method of cross-terminal framework in the embodiment of the present application, it is characterized in that, comprise step:
Receive the line module write according to the line module code format of definition being uploaded to cross-terminal framework;
Utilize transfer tool this line module is converted into cross-terminal framework can module;
When receiving terminal system and loading the request of line module, send the query statement of inquiry terminal systematic difference Program Interfaces situation and standard application DLL (dynamic link library) tenability to terminal system;
The application programming interface situation reported according to terminal system and standard application DLL (dynamic link library) tenability cross-terminal framework can module in determine the line module that will load;
The line module that will load determined is loaded in the terminal system of the request of sending by unified module loading interface.
Additionally provide a kind of module method for uploading of cross-terminal framework in the embodiment of the present application, it is characterized in that, comprise step:
Definition line module code format;
Line module code format according to definition writes line module;
Described line module is uploaded to cross-terminal framework.
Additionally provide a kind of module method of reseptance of cross-terminal framework in the embodiment of the present application, it is characterized in that, comprise step:
Terminal system accesses described cross-terminal framework;
Terminal system sends the request loading line module to cross-terminal framework;
Receive the query statement that cross-terminal framework sends, and report application programming interface situation and standard application DLL (dynamic link library) tenability;
Receive the line module that cross-terminal framework response line module load request loads.
The beneficial effect of the application is:
In the technical scheme that the embodiment of the present application provides, by the form of pre-defined line module code, the line module write according to this form is registered in cross-terminal framework, namely be converted into this cross-terminal framework can module, and for the difference of terminal system, carry out process of having any different, the module that will use determined is loaded in terminal system according to different processing modes.Adopt the technical scheme of the application, avoid cross-terminal developer by Universal Subscriber Module code format and repeat to write duplicated code for realizing identical function, improve the efficiency of exploitation and the maintainability of final products code.
Further, to the differentiated treatment of different terminals system, achieve the compatibility for touch screen browser and nodejs server end.
Accompanying drawing explanation
The specific embodiment of the application is described below with reference to accompanying drawings, wherein:
Fig. 1 is the implementing procedure schematic diagram of the module loading method of cross-terminal framework in the embodiment of the present application;
Fig. 2 be disappearance standard application DLL (dynamic link library) in the embodiment of the present application or on it application programming interface and the discrepant terminal system of standard application DLL (dynamic link library) load the loading schematic diagram of line module;
Fig. 3 is the loading schematic diagram not supporting the terminal system loading line module of standard application DLL (dynamic link library) in the embodiment of the present application;
Fig. 4 is the schematic diagram of loader and module two data structures in the embodiment of the present application;
Fig. 5 is the implementing procedure schematic diagram that the line module batch in the embodiment of the present application loads;
Fig. 6 is the use schematic flow sheet of the module method for uploading of cross-terminal framework in the embodiment of the present application;
Fig. 7 is the implementing procedure schematic diagram of the module method of reseptance of cross-terminal framework in the embodiment of the present application.
Embodiment
Clearly understand to make the technical scheme in the embodiment of the present application and advantage, be described in more detail below in conjunction with the exemplary embodiment of accompanying drawing to the application, obviously, described embodiment is only a part of embodiment of the application, instead of all embodiments is exhaustive.
Inventor notices in R&D process:
Prior art solves the still imperfect solution of cross-terminal problem, common way uses different frameworks and class libraries for each platform, the result caused is the framework use under one side developer wants familiar with understanding different platform, have some identical functions under different platform on the other hand, and this part identical function needs to repeat to realize based on different frameworks and class libraries under different platform under existing technical scheme.
For the above-mentioned deficiency of prior art, provide the module method for uploading of cross-terminal framework, module request method and module loading method in the embodiment of the present application, be described with embodiment below.
The concept related in embodiment is as follows respectively:
Cross-terminal: refer to that, at PC end, mobile terminal, PAD holds, and uses same set of technical scheme under multiple terminal environments such as server end.
Modern browser: be called as previous generation browser relative to IE6, IE7, IE8, modern browser comprises IE9+, chrome, firefox, safari etc.
API: refer to application programming interface, user the API of invocation framenort can realize more complicated application.
Nodejs: refer to the running environment of javascript at server end.
Fig. 1 is the implementing procedure schematic diagram of the module loading method of cross-terminal framework, as shown in the figure, in concrete enforcement, and can be as follows:
Step 101, reception are uploaded to the line module write according to the line module code format of definition of cross-terminal framework;
In enforcement, the line module that this cross-terminal framework receives is that developer writes according to predefined line module code format, and the line module code format of this definition can be identical with server-side code form.By definition line module code format, exploitation and the code sharing of developer can be facilitated.And line module code format is identical with server-side code form, the consistance of line module and server end can be kept like this, to solve framework in prior art, incomplete problem be supported to server end.
Step 102, this line module is converted into cross-terminal framework can module;
In enforcement, the line module cross-terminal framework that developer uploads to cross-terminal framework can not directly use, and need to utilize transfer tool be translated into cross-terminal framework can module, transfer tool here normally adds a function encapsulation to the line module uploaded.The encapsulation of this function can also control the execution opportunity of this line module.
Step 103, when receiving terminal system and loading the request of line module, send the query statement of inquiry terminal systematic difference Program Interfaces situation and standard application DLL (dynamic link library) tenability to terminal system;
In enforcement, when cross-terminal framework receive terminal system want load line module request after, now need specifically to inquire about terminal system, comprise inquiry terminal system and whether lack standard application DLL (dynamic link library), application programming interface on it and whether have difference with standard application DLL (dynamic link library) and it is to standard application DLL (dynamic link library) tenability etc.According to the difference of the terminal system inquired, different line modules is loaded to terminal system, namely do different process.
Step 104, the application programming interface situation reported according to terminal system and standard application DLL (dynamic link library) tenability, cross-terminal framework can module in, determine the line module that will load;
In enforcement, owing to likely there are differences with standard application DLL (dynamic link library) for the application programming interfaces of different terminal systems on it, or disappearance standard application DLL (dynamic link library), again or this terminal system do not support standard application DLL (dynamic link library), so want to realize cross-terminal code sharing to do differentiation process with regard to needing according to different terminal systems.Therefore, after obtaining the application programming interface situation that reports of terminal system and standard application DLL (dynamic link library) tenability, can cross-terminal can module in determine the line module that this terminal system will load.
Step 105, by the line module that will load determined by unified module loading interface, be loaded in the terminal system of the request of sending.
In enforcement, the embodiment of the present application provides unified module loading interface, and namely client and server adopts same module loading interface.The module loading interface of client and server is carried out unify to overcome YUI framework in prior art and incomplete problem is supported to server end.Particularly, after determining the line module that terminal system will load, by unified module loading interface, this line module is loaded in the terminal system of the request of sending.
In a preferred embodiment, the line module code format of this definition can be identical with server end nodejs form, other modules namely using require statement to need, and uses module.exports to derive the function of current block.Such as:
Wherein require represents import other modules (and then using its function) in current block, and module.exports then represents that the function deriving current block is for other modules.The effect of such definition provides the form that a kind of module writes to developer, and adopts this form to write module and just can unify cross-terminal code sharing, improves cross-terminal system provide possibility for developer develops on this basis.
In enforcement, this transfer tool can be the code of line module is added superior function encapsulation.
Particularly, after the block code form according to definition is write line module by developer, be uploaded to cross-terminal framework, cross-terminal framework receives this line module uploaded, and this line module code format will be converted into the code format of framework needs.This time, cross-terminal framework by adding the encapsulation of function before and after the code of line module, this line module is converted into framework can module, namely complete user-defined Module registers in framework.Example code is as follows:
add(function(require,exports,module){
//usermodulecode
); // be converted into cross-terminal framework can module
Cross-terminal framework provides module converter instrument, for generation of by the code of the code of line module after a function encapsulation, is registered in cross-terminal framework by the variablees such as require, module in the mode of function parameter.This module converter instrument can also can come to transform line module code online off-line manner.
In a preferred embodiment, when the line module that will load determined is loaded in the terminal system of the request of sending, can to lacking standard application DLL (dynamic link library) or application programming interface on it, and terminal system discrepant with standard application DLL (dynamic link library), by the application programming interface providing the mechanism of another name to carry out this terminal system of completion.
Also be, standard application programming interface is that standard specifies the application programming interface that client browser provides, individual module loading interface is the application programming interface that this programme provides, if certain client browser (such as IE6) does not realize the application programming interface that standard specifies, the application programming interface of corresponding this browser of module completion so in the embodiment of the present application, will be loaded.
Particularly, as shown in Figure 2, in practice, developer wishes that the code of line module can operate in terminal system without any amendment, but often each terminal system also exists difference in reality, the IE browser of such as old edition, it lacks a lot of standard A PI, and the API even it provided and standard A PI is variant.Now, in different terminal systems, loading different modules by providing the mechanism of another name to realize in the embodiment of the present application, calling different functions.
Such as, by unified dom module, event/dom module, the relevant dom operation of browser platform and event binding operation can be carried out:
After aforesaid operations, standard browser applicator platform is only loaded into dom/base and event/dom/base module, then can be loaded into dom/base, dom/IE, event/dom/base, event/IE module at the IE browser platform of old edition, affect being configured to of the behavior:
Namely identical module name realizes module at different platforms corresponding to different.
Fig. 2 be disappearance standard application DLL (dynamic link library) or on it application programming interface and the discrepant terminal system of standard application DLL (dynamic link library) load the loading schematic diagram of line module.As shown in Figure 2, lack standard application DLL (dynamic link library) or on it application programming interface and the discrepant terminal system of standard application DLL (dynamic link library) when loading line module, comprise step:
Step 201, determine that the line module that will load is dom module;
Step 202, by Query Result to terminal system, judge that whether terminal system is the IE browser of old edition;
Step 203, when terminal system is not the IE browser of old edition, perform load dom/base;
Step 204, when terminal system is the IE browser of old edition, perform load dom/base, dom/IE.
In enforcement, when being loaded in the terminal system of the request of sending by the line module that will load determined, to the terminal system supporting standard application DLL (dynamic link library), the method for pre-registration module can be used, return empty realization or loading line module.
Particularly, as shown in Figure 3, in practice, need under touch screen application scenarios to introduce some gesture event processing modules for the treatment of multipoint operation, so-called gesture event refers to that touch screen machine (such as IOS Adriod touch-screen mobile phone, flat board etc.) can point drag and drop icon by one, two fingers amplify the operations such as picture, and the operation pointed here will send event to program, and program response events carries out picture mark position change or amplifies the operations such as picture.Owing to not supporting gesture event processing module for some terminal systems, now, the method for pre-registration module can be used to return empty realization.Such as: event pinch is amplified for multiple point touching, at the platform not supporting to touch, empty realization is directly returned for this module, and for supporting that the platform touched just carries out further far module loading.Example code is as follows:
Namely to the platform not supporting to touch, use sky to realize module and replace multiple point touching to amplify event pinch, so just achieve the differentiated process to terminal system.
The mechanism of another name is provided and uses pre-registration sky to realize the method for module, carried out Function Integration Mechanism to different terminal systems ground difference, YUI system side of comparing overweights conventional client pc browser, supports that incomplete problem has good solution for touch screen browser and nodejs server end.
Fig. 3 does not support that the terminal system of standard application DLL (dynamic link library) loads the loading schematic diagram of line module.As shown in Figure 3, do not support that the terminal system of standard application DLL (dynamic link library) is when loading line module, comprises step:
Step 301, by Query Result to terminal system, judge whether terminal system supports touch;
If step 302 is not supported to touch, then register sky and realize module;
Step 303, determine that the line module that will load is pinch module;
Whether there is sky in step 304, inquiry cross-terminal framework and realize module;
Step 305, when there is not sky and realizing module, perform and load pinch module;
Step 306, when existing after sky realizes module or module loading, return personal code work.
In enforcement, the line module that will load determined is loaded in the terminal system of the request of sending and can be loaded by the loading interface of individual module.
In concrete enforcement, when loading line module by the loading interface of individual module, concrete loading code is:
use(modules,fn).
Wherein modules is the module name array needing to load, and fn is the call back function when calling after module array loaded.So-called call back function, refers to, the follow-up function that will perform after module loading in the embodiment of the present application.
Visible, the batch that can be realized module by the loading interface of individual module loads.Can definition data structure in the embodiment of the present application, comprise loader and module two data structure definitions.Be illustrated in figure 4 the schematic diagram of loader and module two data structures.Each use can produce a loader example, and this loader can monitor the module collection when time use loads, when triggering call back function corresponding to this use after the whole loaded of this module collection.
Same individual module also may in repeatedly use calls, and namely individual module may correspond to multiple loader example, when notifying after individual module loaded that all loader examples of its correspondence check whether its all module loaded.
Particularly, be illustrated in figure 5 the implementing procedure schematic diagram that line module batch loads, as shown in the figure, batch loads and can comprise the steps:
Step 501, determine the line module set module that will load;
Step 502, execution load and generate loader example;
Step 503, execution parallel batch line module load;
Step 504, judge individual module whether loaded;
Step 505, when notifying loader example collection belonging to this module after individual module loaded;
The notified rear line module whether all loaded detected in set of step 506, loader example collection;
Step 507, when after the equal loaded of line module in line module set module, call fn readjustment terminate.
In enforcement, the loading interface of individual module is formed after reunification to client terminal system and server end cross-terminal framework.
In concrete enforcement, because the concrete loading behavior at client and server end upper module is different, so the code sharing of cross-terminal will be realized, unified module loading interface must be formed.Forming process is as follows:
Be load corresponding module script by dynamically generating the script node pointing to module script address in client (terminal system), example code is as follows:
At the code that nodejs server end can use vm module to carry out Dynamic Execution to read from local file, example code is as follows:
The wherein function of Registering modules that provides for framework of add.
Finally define consistent loading individual module API:
GetScript (modUrl, success, error); // generate individual module loading interface
Client and server end has been unified module loading API, solving prior art supports incomplete problem to nodejs server end on the one hand, on the other hand, can realize better uploading and loading in conjunction with defining the module that line module code format makes developer write, can be used faster and more easily, be achieved sharing of code.
Wherein, the loading interface of individual module can be positioned at client terminal system or server cross-terminal framework.
In concrete enforcement, the loading API of individual module can be arranged in terminal system and also can be positioned at cross-terminal framework, its objective is the loading interface of unified individual module, use the loading line module that this API can be convenient from cross-terminal framework, better code is shared.
In enforcement, before the line module that will load determined is loaded in the terminal system of the request of sending, can also comprise:
Module dependence table according to generating carrys out load-on module.
Particularly, because the request linking number loaded to request module on cross-terminal framework may be a lot, therefore, need to be optimized loading.Illustrate below:
Optimize if do not do, when terminal system calls a module, namely time use ([' a ']), because a module depends on b, c module, so in actual motion, the request of first issuing out a.js will be caused, load b.js respectively again when a.js downloads to terminal system, c.js, comes to the request of 3 serials.
By generation module dependence table, 3 serial requests are become 1 in the embodiment of the present application, greatly improve module loading speed, be implemented as:
Extraction module dependence table also analyzes line module code:
This section of code is joined in application configuration file, so when all dependences of calling meeting recursive analysis load-on module when use carries out module loading, and generate a combo module dependence table, thus the code of all modules that can a module and its be relied in the lump downloads to user side execution.
For convenience of description, each several part of the above method and function can realize when implementing the application in same or multiple software or hardware.
Fig. 6 is the use schematic flow sheet of the module method for uploading of cross-terminal framework in the embodiment of the present application, as shown in the figure, can comprise step:
Step 601, definition line module code format;
Step 602, according to definition line module code format write line module;
Step 603, described line module is uploaded to cross-terminal framework.
In enforcement, the line module code format of definition can be identical with server-side code form.
Particularly, the line module code format of definition is identical with server end nodejs form: other modules using require statement to need, and uses module.exports to derive the function of current block.
In enforcement, after described line module is uploaded to cross-terminal framework, the code of line module can be added superior function encapsulation.
Particularly, after the block code form according to definition is write line module by developer, be uploaded to cross-terminal framework, cross-terminal framework receives this line module uploaded, and this line module code format will be converted into the code format of framework needs.This time, cross-terminal framework by adding the encapsulation of function before and after the code of line module, this line module is converted into framework can module, namely complete user-defined Module registers in framework.
Cross-terminal framework provides module converter instrument, for generation of by the code of the code of line module after a function encapsulation, is registered in cross-terminal framework by the variablees such as require, module in the mode of function parameter.This module converter instrument can also can come to transform line module code online off-line manner.
In addition, this function encapsulation effect except line module is registered in framework, be converted into cross-terminal framework can module, the execution opportunity of the code of line module can also be controlled.
Fig. 7 is the implementing procedure schematic diagram of the module method of reseptance of cross-terminal framework, as shown in the figure, in concrete enforcement, and can be as follows:
Step 701, terminal system access described cross-terminal framework;
Step 702, terminal system send the request loading line module to cross-terminal framework;
The query statement that step 703, reception cross-terminal framework send, and report application programming interface situation and standard application DLL (dynamic link library) tenability;
The line module that step 704, reception cross-terminal framework response line module load request load.
In concrete enforcement, when terminal system needs to load some functional module, first, cross-terminal framework be accessed, and send the request loading line module (functional module that needs are used) to cross-terminal framework.When terminal system access cross-terminal framework, cross-terminal framework can be inquired about terminal system, the standard application DLL (dynamic link library) judging its type and can support, the rear situation according to terminal system, carries out the loading that line module is carried out in its request of distinguishing response.
In enforcement, when receiving the query statement that cross-terminal framework sends, can inquiry terminal system whether lack the application programming interface of standard application DLL (dynamic link library) or terminal system and standard application DLL (dynamic link library) whether variant.
In enforcement, when receiving the query statement that cross-terminal framework sends, inquiry terminal system whether can support standard application DLL (dynamic link library).
In enforcement, after receiving the line module of cross-terminal framework response line module load request loading, may further include:
Run the line module being loaded into terminal system.
Be described below in conjunction with a concrete exemplifying embodiment.
First, developer writes line module according to the line module code format nodejs form of definition, the line module write is uploaded in cross-terminal framework, cross-terminal framework receives this line module uploaded, and with module converter instrument, function encapsulation is carried out to this line module, be converted into cross-terminal framework can module.Secondly, terminal system, when needs load-on module, accesses cross-terminal framework, and proposes the request loading line module.Then, cross-terminal framework is inquired about terminal system after receiving this request, if the IE browser of old edition, then utilizes and provides the mechanism of another name to load; If do not support the terminal touched, then the empty method realizing module of registration is utilized to load.So just achieve and different load modes is adopted to different terminals system, achieve the compatibility to terminal system.In the process, the line module code format that developer uses except unified definition, also unifies module loading interface, and this just makes development module that developer can be convenient and utilizes existing module, and code is shared better.In addition, rely on table by automatically-generating module, can the loading velocity of hoisting module greatly, improve user awareness, and improve the service efficiency of line module.
During concrete enforcement, the embodiment of the present application supports javascript programming language, hardware is supported javascript running environment.
Visible, in the technical scheme provided in the embodiment of the present application, first by the form of pre-defined line module code, the line module write according to this form is registered in cross-terminal framework, namely be converted into this cross-terminal framework can module, and for the difference of terminal system, carry out process of having any different, the module that will use determined is loaded in terminal system according to different processing modes.And be optimized by the module loading speed of automatically-generating module dependence table to cross-terminal framework.Adopt the technical scheme of the application, avoid cross-terminal developer by Universal Subscriber Module code format to repeat to write same code for realizing identical function, improve the efficiency of exploitation and the maintainability of final products code, further, enable module compatible to the differentiated treatment of terminal system.
Those skilled in the art should understand, the embodiment of the application can be provided as method, system or computer program.Therefore, the application can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the application can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code.
The application describes with reference to according to the process flow diagram of the method for the embodiment of the present application, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Although described the preferred embodiment of the application, the technician of this area meat once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the application's scope.
Obviously, those skilled in the art can carry out various change and modification to the application and not depart from the spirit and scope of the application.Like this, if these amendments of the application and modification belong within the scope of the application's claim and equivalent technologies thereof, then the application is also intended to comprise these change and modification.
Claims (16)
1. a module loading method for cross-terminal framework, is characterized in that, described method comprises:
Receive the line module write according to the line module code format of definition being uploaded to cross-terminal framework;
This line module is converted into cross-terminal framework can module;
When receiving terminal system and loading the request of line module, send the query statement of inquiry terminal systematic difference Program Interfaces situation and standard application DLL (dynamic link library) tenability to terminal system;
The application programming interface situation reported according to terminal system and standard application DLL (dynamic link library) tenability, cross-terminal framework can module in, determine the line module that will load;
The line module that will load determined is loaded in the terminal system of the request of sending by unified module loading interface.
2. the method for claim 1, is characterized in that, the line module code format of described definition is identical with server-side code form.
3. method as claimed in claim 2, it is characterized in that, the line module code format of definition is identical with server end nodejs form, other modules using require statement to need, and uses module.exports to derive the function of current block.
4. the method for claim 1, is characterized in that, described transfer tool is the code of line module is added superior function encapsulation.
5. the method as described in as arbitrary in Claims 1-4, it is characterized in that, described when the line module that will load determined is loaded in the terminal system of the request of sending, to disappearance standard application DLL (dynamic link library) or on it application programming interface and the discrepant terminal system of standard application DLL (dynamic link library) by providing the application programming interface of machine-processed this terminal system of completion of another name.
6. the method as described in as arbitrary in Claims 1-4, it is characterized in that, described when the line module that will load determined is loaded in the terminal system of the request of sending, to supporting that the terminal system of standard application DLL (dynamic link library) uses the method for pre-registration module to return and emptyly realizes or load line module.
7. the method as described in as arbitrary in claim 1 to 6, it is characterized in that, described unified module loading interface is the individual module loading interface formed after reunification client terminal system and server end cross-terminal framework.
8. method as claimed in claim 7, it is characterized in that, described individual module loading interface is positioned at client terminal system or server cross-terminal framework.
9. the method as described in as arbitrary in claim 1 to 8, is characterized in that, before being loaded in the terminal system of the request of sending by the line module that will load determined by unified module loading interface, also comprise:
Module dependence table according to generating carrys out load-on module.
10. a module method for uploading for cross-terminal framework, is characterized in that, described method comprises:
Definition line module code format;
Line module code format according to definition writes line module;
Described line module is uploaded to cross-terminal framework.
11. methods as claimed in claim 10, it is characterized in that, the line module code format of described definition is identical with server-side code form.
12. methods as claimed in claim 11, is characterized in that, the line module code format of definition is identical with server end nodejs form: other modules using require statement to need, and use module.exports to derive the function of current block.
The module method of reseptance of 13. 1 kinds of cross-terminal frameworks, is characterized in that, described method comprises:
Terminal system accesses described cross-terminal framework;
Terminal system sends the request loading line module to cross-terminal framework;
Receive the query statement that cross-terminal framework sends, and report application programming interface situation and standard application DLL (dynamic link library) tenability;
Receive the line module that cross-terminal framework response line module load request loads.
14. methods as claimed in claim 13, it is characterized in that, when receiving the query statement that cross-terminal framework sends, inquiry terminal system whether lack the application programming interface of standard application DLL (dynamic link library) or terminal system and standard application DLL (dynamic link library) whether variant.
15. as arbitrary in claim 13 as described in method, it is characterized in that, when receiving the query statement that cross-terminal framework sends, whether inquiry terminal system supports standard application DLL (dynamic link library).
16. as arbitrary in claim 13 to 15 as described in method, it is characterized in that, after receiving the line module that cross-terminal framework response line module load request loads, comprise further:
Run the line module being loaded into terminal system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410520198.6A CN105468398A (en) | 2014-09-30 | 2014-09-30 | Module uploading method, request method and loading method for cross-terminal architecture |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410520198.6A CN105468398A (en) | 2014-09-30 | 2014-09-30 | Module uploading method, request method and loading method for cross-terminal architecture |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105468398A true CN105468398A (en) | 2016-04-06 |
Family
ID=55606139
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410520198.6A Pending CN105468398A (en) | 2014-09-30 | 2014-09-30 | Module uploading method, request method and loading method for cross-terminal architecture |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105468398A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106293855A (en) * | 2016-08-23 | 2017-01-04 | 上海创景计算机系统有限公司 | The loading method of dependent file |
CN106371770A (en) * | 2016-09-05 | 2017-02-01 | 杭州华为数字技术有限公司 | Data write-in method and device |
CN106790541A (en) * | 2016-12-22 | 2017-05-31 | 武汉斗鱼网络科技有限公司 | Data capture method and device |
CN108694044A (en) * | 2018-05-04 | 2018-10-23 | 武汉灵动在线科技有限公司 | A kind of one key generation method of client UI modules and device |
CN109522014A (en) * | 2018-10-19 | 2019-03-26 | 中国平安人寿保险股份有限公司 | Algorithm process method, electronic device and readable storage medium storing program for executing based on new product development |
CN109714470A (en) * | 2018-10-23 | 2019-05-03 | 北京理工大学 | A kind of method and system for realizing mobile phone application module based on nodejs |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101000555A (en) * | 2006-01-13 | 2007-07-18 | 北京金远见电脑技术有限公司 | Hand terminal system |
CN101814024A (en) * | 2009-10-23 | 2010-08-25 | 深圳创维-Rgb电子有限公司 | Framework and tool for designing cross-platform 3D interface |
CN102520990A (en) * | 2011-12-01 | 2012-06-27 | 太仓市同维电子有限公司 | Cross-platform compatible general application device supporting embedded system and loading method thereof |
CN103209200A (en) * | 2012-01-16 | 2013-07-17 | 上海耀诚通信科技有限公司 | Cloud service switching system and service inquiring and switching method |
-
2014
- 2014-09-30 CN CN201410520198.6A patent/CN105468398A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101000555A (en) * | 2006-01-13 | 2007-07-18 | 北京金远见电脑技术有限公司 | Hand terminal system |
CN101814024A (en) * | 2009-10-23 | 2010-08-25 | 深圳创维-Rgb电子有限公司 | Framework and tool for designing cross-platform 3D interface |
CN102520990A (en) * | 2011-12-01 | 2012-06-27 | 太仓市同维电子有限公司 | Cross-platform compatible general application device supporting embedded system and loading method thereof |
CN103209200A (en) * | 2012-01-16 | 2013-07-17 | 上海耀诚通信科技有限公司 | Cloud service switching system and service inquiring and switching method |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106293855A (en) * | 2016-08-23 | 2017-01-04 | 上海创景计算机系统有限公司 | The loading method of dependent file |
CN106371770A (en) * | 2016-09-05 | 2017-02-01 | 杭州华为数字技术有限公司 | Data write-in method and device |
CN106371770B (en) * | 2016-09-05 | 2019-07-12 | 杭州华为数字技术有限公司 | Method for writing data and device |
CN106790541A (en) * | 2016-12-22 | 2017-05-31 | 武汉斗鱼网络科技有限公司 | Data capture method and device |
CN106790541B (en) * | 2016-12-22 | 2019-06-21 | 武汉斗鱼网络科技有限公司 | Data capture method and device |
CN108694044A (en) * | 2018-05-04 | 2018-10-23 | 武汉灵动在线科技有限公司 | A kind of one key generation method of client UI modules and device |
CN109522014A (en) * | 2018-10-19 | 2019-03-26 | 中国平安人寿保险股份有限公司 | Algorithm process method, electronic device and readable storage medium storing program for executing based on new product development |
CN109522014B (en) * | 2018-10-19 | 2024-04-16 | 中国平安人寿保险股份有限公司 | Algorithm processing method based on new product development, electronic device and readable storage medium |
CN109714470A (en) * | 2018-10-23 | 2019-05-03 | 北京理工大学 | A kind of method and system for realizing mobile phone application module based on nodejs |
CN109714470B (en) * | 2018-10-23 | 2020-08-04 | 北京理工大学 | Method and system for realizing mobile phone application modularization based on nodejs |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105468398A (en) | Module uploading method, request method and loading method for cross-terminal architecture | |
WO2021184725A1 (en) | User interface test method and apparatus, storage medium, and computer device | |
US10180899B2 (en) | Device for automatically generating test cases for embedded software using symbolic and concrete execution | |
US20150331727A1 (en) | Code service for language-independent dispatch | |
CN102662646B (en) | Sensing data disposal route and computing node | |
JP2018528559A (en) | Method and system for realizing data tracking by software development kit | |
JP2021096857A (en) | Data processing method, device, electronic apparatus, and storage medium | |
CN104246659A (en) | Instantiable gesture objects | |
CN108469979A (en) | A kind of method for page jump, device, server and storage medium | |
CN103927193B (en) | Loading method, service end virtual machine during the migration operation of java application function | |
CN111752581B (en) | Upgrading method and device of distributed system and computer system | |
CN102271121A (en) | Service-model-oriented cloud computing development platform realization method | |
US20130254780A1 (en) | Techniques to remotely access object events | |
CN111723002A (en) | Code debugging method and device, electronic equipment and storage medium | |
CN104883384A (en) | Method and apparatus for providing end capabilities of client for light application | |
CN110990048A (en) | Method and system for monitoring resource loss of Unity project | |
US20140136578A1 (en) | Techniques to manage virtual files | |
CN107102937B (en) | User interface testing method and device | |
CN109597952B (en) | Webpage information processing method, system, electronic equipment and storage medium | |
CN101360126B (en) | B/S structure remote computing platform based on MATLAB and COM technology | |
CN111339560B (en) | Data isolation method, device and system | |
CN112256252B (en) | Interface generation method and device, storage medium and electronic equipment | |
CN111488286A (en) | Method and device for independently developing Android module | |
CN110908573B (en) | Algorithm model training method, device, equipment and storage medium | |
CN110851313B (en) | Sensor debugging method, intelligent terminal, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160406 |