Based on the development approach of the cross-platform Mobile solution of mixed mode
Technical field
The present invention relates to a kind of development approach based on the cross-platform Mobile solution of mixed mode, belong to technical field of virtualization.
Background technology
Along with the development of mobile Internet, the intelligent mobile terminal such as mobile phone, panel computer becomes the important carrier of information, and under the trend of mobile, traditional business starts progressively to mobile service expansion, and the demand of enterprise application system mobile is also thereupon growing.
At present, man-to-man Development control area pattern is all located in electrical network business mobile application and development, result in the present situation that the mobile platform of enterprise's existence is little, many, assorted.
Man-to-man Development control area pattern, because producer is different, result in Technical Architecture and the complete disunity of standard, centralized management difficulty is large, there is greater risk in information security, and construction cycle length can be made, there is serious overlapping development problem, cause construction investment to be wasted greatly.
The unified management and control means of each operation system Mobile solution construction disappearance, information security and managing risk high.
Summary of the invention
The object of the invention is: provide a kind of development approach based on the cross-platform Mobile solution of mixed mode, the resource that can realize between different mobile platform and Mobile solution layer is mutual, to solve current existing technical matters.
Technical scheme of the present invention
Based on a development approach for the cross-platform Mobile solution of mixed mode, when Mobile solution layer obtains remote pages information by different mobile platform, adopt and a JS storehouse is set between Mobile solution layer and mobile platform, realize the page and Mobile solution layer is mutual.
In the aforesaid development approach based on the cross-platform Mobile solution of mixed mode, specific implementation process is: remote pages is split as data and page structure, page structure provides assembly needed for page structure and layout method by JS storehouse, and the ability of visit data, then in JS storehouse, the engine corresponding with mobile platform is set with between mobile platform, the browser corresponding with mobile platform and public function module is provided with in engine, when Mobile solution layer is wanted to obtain remote pages information, JS storehouse receives instruction and is passed in engine by instruction, the mobile platform corresponding with engine only obtains the data of long-range page, and data to be turned back in JS storehouse by former road and together with page structure corresponding with data in JS storehouse, show in Mobile solution layer.
In the aforesaid development approach based on the cross-platform Mobile solution of mixed mode, mobile platform comprises IOS, Androld and WindowsPhone.
Owing to have employed technique scheme, compared with prior art, the invention remote pages is split as page structure and data, and JS storehouse provides assembly needed for page structure and layout method, make Mobile solution layer when obtaining remote pages information, only need obtain data and without the need to obtaining page structure, greatly reduce system cloud gray model desired data amount, again by arranging for engine corresponding to different mobile platform, realize Mobile solution layer and moved the ability obtaining remote pages by different platform, the principle of the invention is simple, greatly reduce running frequency and the desired data of internal system.
Accompanying drawing explanation
Accompanying drawing 1 is principle of the invention schematic diagram.
Embodiment
Embodiments of the invention: a kind of development approach based on the cross-platform Mobile solution of mixed mode, as shown in drawings, when Mobile solution layer obtains remote pages information by different mobile platform, adopt and a JS storehouse is set between Mobile solution layer and mobile platform, realize the page and Mobile solution layer mutual, this Mobile solution layer is the mixed mode applications layer based on HTML5JSCSS3.
Specific implementation process is: remote pages is split as data and page structure, page structure provides assembly needed for page structure and layout method by JS storehouse, and the ability of visit data, then in JS storehouse, the engine corresponding with mobile platform is set with between mobile platform, the browser corresponding with mobile platform and public function module is provided with in engine, when Mobile solution layer is wanted to obtain remote pages information, JS storehouse receives instruction and is passed in engine by instruction, the mobile platform corresponding with engine only obtains the data of long-range page, and data to be turned back in JS storehouse by former road and together with page structure corresponding with data in JS storehouse, show in Mobile solution layer, wherein mobile platform comprises IOS, Androld and WindowsPhone.
It may be noted that, in the present embodiment, Mobile solution layer is the mixed mode applications layer based on HTML5JSCSS3;
JS storehouse provides assembly needed for page structure and layout method for JS storehouse, and the ability of visit data, wherein assembly is the basic configuration module (i.e. page structure) of remote pages, this JS of visit data ability storehouse itself has ability, and namely those skilled in the art complete the exploitation in JS storehouse after by the thinking of the present embodiment by prior art.
The engine corresponding from different mobile platform, the browser comprised in engine is the browser that different mobile platform is corresponding, this is prior art, the general module corresponding from different mobile platform is also prior art, and its both organic unities above-mentioned are just got up to realize the maintenance of greatly saving manpower and later stage in later stage programming by the present embodiment.
The present embodiment specific implementation process, if Mobile solution layer needs to obtain personal information by remote pages, first personal information is divided into personal information structure and personal information data, as shown in fig. 1 by means of arrows, Mobile solution layer sends instruction and penetrates in JS storehouse, extract in JS storehouse personal information structure assembly (namely in personal information as name, height, the arrangement mode of the data such as age in the page and the universal coding of itself), and simultaneously by personal information request of data by (in the present embodiment, mobile platform can comprise IOS from different mobile platform, Androld and WindowsPhone) in corresponding engine, arrange browser corresponding to different mobile platform and general module in engine, if be obtain remote pages information by this IOS mobile platform when obtaining personal information, then (in this engine, the browser corresponding with IOS mobile platform and general module are set by the engine corresponding with IOS, command signal first passes through browser by JS system, pass to general module again), then IOS mobile platform is entered, then IOS mobile platform completes and obtains personal information data Bing Anyuan road from remote pages and return and enter JS storehouse, and the personal information textural association corresponding with JS storehouse showing in Mobile solution layer, same principle, Mobile solution layer completes same operation by Androld and WindowsPhone mobile platform, thus complete the cross-platform Mobile solution of Mobile solution layer.
Same principle, the present embodiment also can realize Mobile solution layer obtains local resource ability by different Mobile solution platform, and its principle is consistent with acquisition remote pages information.