CN103440134A - Webkit kernel-based storage resource service local extension method - Google Patents
Webkit kernel-based storage resource service local extension method Download PDFInfo
- Publication number
- CN103440134A CN103440134A CN2013103918858A CN201310391885A CN103440134A CN 103440134 A CN103440134 A CN 103440134A CN 2013103918858 A CN2013103918858 A CN 2013103918858A CN 201310391885 A CN201310391885 A CN 201310391885A CN 103440134 A CN103440134 A CN 103440134A
- Authority
- CN
- China
- Prior art keywords
- cpp
- idl
- file
- webkit
- user
- 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 Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a webkit kernel-based storage resource service local extension method mainly solving the problem that the demand of a user can not be met due to poor capacity of extending applications in a webkit and poor capacity of dynamically loading a native library in the webkit in the prior art. The webkit kernel-based storage resource service local extension method comprises the following steps: the webkit carries out authoring and versioning according to a.idl document provided by the user to generate JSXXX. cpp, JSXX. h, webkitDOMXXX. cpp, webkitDOMXXX. h and webkitDOMXXXPrivate. h documents; the user places an extension operation related to web presentation to a /Source/webCore/page catalog, and writes an interface function of the extension operation in a corresponding.cpp document; an idl document according with a WEBIDL specification is written according to the extension operation of the user and an authoring and versioning process of a makefile.am document, DOMWindow.h, DOMWindow.cpp and DOMWindow.idl are correspondingly corrected. By adopting the scheme, the webkit kernel-based storage resource service local extension method achieves the purposes of high extensibility and convenience in use, and is high in practical value and popularization value.
Description
Technical field
The present invention relates to a kind of extended method, specifically, relate to a kind of local extended method of the storage resources service based on the webkit kernel.
Background technology
Development along with wireless communication technology, mobile terminal is day by day universal, and mobile Internet user and business are explosive growth, and in future 3 years, the mobile Internet user of China will be over the online computing user, in 5 years, the scale of mobile Internet business will be over traditional internet.
Simultaneously, along with the development of internet, the form that data present on network is more and more, and the scale of data is also to exceed the speed increment of people's imagination, only according to the processing power of or several station servers, is the demands that can not meet far away.And for a lot of large-scale operators, the ability that its business is calculated and analyzed data set has proposed very high requirement to computational resource, and at the aspect of performances such as reliability, fault-tolerance and consistance to system aspect the business service processing, challenge has all been proposed, thereby, adopt Distributed Calculation engine platform to become possibility, the ability that takes full advantage of single computational resource is processed large-scale dataset, this function that namely our cloud storage background system provides.
Browser as the Internet era user-network access entrance, status in network is self-evident, how to realize fast Development, dispose all kinds of business, meet the user in many-sided business demands such as study, life, work, become one of industry focus that particularly mobile operator pays close attention to.Wherein, Mobile Widget(moves microtec) rely on the advantages such as its technical threshold is low, the user experiences, can cross-platformly move, become the best-of-breed technology of mobile Internet terminal application of new generation.At present, the whole world comprises all release one after another oneself Widget product of many well-known telecom operators, Internet firm, mobile phone terminal manufacturers such as China Mobile, Waduven, Yahoo, Google, Nokia, and the Widget application has become terminal user's new lover.And webkit also becomes the first-selection of Widget kernel as the browser kernel of current main-stream, yet the ability of webkit dynamic load local library is poor, and in webkit, the ability of expansion oneself application is poor, can't meet consumers' demand.
Summary of the invention
The object of the present invention is to provide a kind of local extended method of the storage resources service based on the webkit kernel, the ability that mainly solves the webkit dynamic load local library existed in prior art is poor, and in webkit, the ability of expansion oneself application is poor, the problem that can't meet consumers' demand.
To achieve these goals, the technical solution used in the present invention is as follows:
The local extended method of the storage resources service based on the webkit kernel comprises the following steps:
(1) the .idl file compiling that webkit provides according to the user generates JSXXX.cpp, JSXX.h, webkitDOMXXX.cpp, webkitDOMXXX.h and webkitDOMXXXPrivate.h file;
(2) user will show under be placed into/Source/webCore/page of relevant extended operation catalogue with the page, and the interface function of this extended operation is programmed in corresponding .cpp file;
(3) write according to user's extended operation the idl file that meets WEB IDL standard, and compilation process, DOMWindow.h, DOMWindow.cpp and the DOMWindow.idl of makefile.am file carried out to corresponding modify.Alter mode in the present invention preferably adds in the DOMWindow.idl attribute column object oriented of stating in DOMWindow.h, and property value is made as Replaceable.
In described step (3), the compilation process of makefile.am file is as follows:
(3a) add corresponding h, cpp, idl, JSXXX.h and JSXXX.cpp file in the GNUmakefile.list.am under Source/WebCore;
(3b) add corresponding WebKitDOMXXX.h and WebkitDOMXXX.cpp file in the GNUmakefile.am under Source/WebCore/bindings/gobject.
Specifically, described idl file comprises idl attribute, interface attributes and parameter.
Compared with prior art, the present invention has following beneficial effect:
(1) the application of the invention, the access that the user can be served by the form of operation interface easily, the user who has greatly promoted whole system experiences, by with cooperating of background service system of cloud storage, offering user's operation of stores service more easily, realize local expansion, thereby reduced the operation complexity of front end subscriber, increased the versatility of whole system, can make the user convenient, accept by the form of webpage the service that cloud storage system etc. provides efficiently, there is outstanding substantive distinguishing features and marked improvement, be applicable to large-scale promotion application.
Embodiment
Below in conjunction with embodiment, the invention will be further described, and embodiments of the present invention include but not limited to the following example.
Embodiment
For the ability that solves the webkit dynamic load local library existed in prior art poor, and the ability of expansion oneself application is poor in webkit, the problem that can't meet consumers' demand, the invention discloses a kind of local extended method of the storage resources service based on the webkit kernel, because prior art peripheral user is mainly undertaken alternately by http protocol and gateway, by gateway, undertaken after protocol conversion again and the storage inside system interaction, the storage inside system is carried out the corresponding service request of replying again afterwards according to request and is sent to gateway, the reply of client requests externally is provided by gateway again, thereby, the present invention has carried out research and development to part mutual between front end and gateway and has improved, be added in the webkit kernel and realize the expansion to browser function by the API by cloud storage system, it mainly comprises the following steps:
Adopt the mode of binding, be that the .idl file compiling that webkit provides according to the user generates JSXXX.cpp, JSXXX.h, WebKitDOMXXX.cpp, WebKitDOMXXX.h and WebKitDOMXXXPrivate.h file, wherein, the JSXXX.cpp of generation and JSXXX.h are associated with original JavascriptCore in server;
To show under be put into/Source/webCore/page of relevant extended operation catalogue with the page;
Write interface function, interface function is programmed in the .cpp file of user's needs; Write the idl file that comprises IDL attribute, interface attributes and parameter etc., wherein, the IDL interface specification is with reference to WEB IDL standard; DOMWindow.h, DOMWindow.cpp and DOMWindow.idl are carried out to corresponding modify;
Revise the compilation process of makefile.am file, in the GNUmakefile.list.am under Source/WebCore, add corresponding h, cpp and idl file and JSXXX.h and JSXXX.cpp; Add corresponding WebKitDOMXXX.h, WebkitDOMXXX.cpp in the GNUmakefile.am under Source/WebCore/bindings/gobject.
Take DOMWindow and JSDOMWindow as example, and wherein, JSDOMWindow only provides the semanteme of interface, and DOMWindow provides its concrete realization.Finally realize its function to three grades of mapping relations of C++ by HTML again to JS, call the javascript interface in HTML, and between javascript and C++, be the relation of interface and realization, interface adopts the javascript mode to be defined and the realization of interface adopts the mode of C++.Wherein with the mutual part of background service system, by the C++ object, encapsulated, by under put into/WebCore/page of packaged object catalogue; Simultaneously, write idl file, the calling interface of JS be resolved and be converted into to system can in order to contact with high-level interface according to idl file.
According to above step, just can realize the local function expansion of the corresponding interface.
In the present invention, API has mainly simulated the message format of http protocol, and http protocol is encapsulated, and by sending the HTTP message, background server is filed a request to the function that realizes that the user is required.In order to be achieved, the mode that need load the html page in application layer by webkit is called the application layer api interface.The interface lexical or textual analysis is as table 1:
Table 1
In the present invention, each message request must comprise the mutual complete message form of communication, and the state of this message is irrelevant with the state of message before.REST has described the interacted system of a framework pattern, and REST constraint condition is during as an overall applicability, will generate one simple, can expand, effective, safe and reliable framework.
The service process of a whole set of cloud storage system is as follows: the user sends request by calling registration interface to backstage, and after succeeding in registration, the user logs among system by account, carries out own needed operation.File is pressed the sheet access, and storing process is divided into data storage and metadata store, and upload file metadata after all bursts of whole file are all uploaded successfully, download as its inverse process; Directory operation is the operation for its metadata information.Wherein file operation is divided into: upload, download, delete and inquire about; Directory operation is divided into: create, delete, obtain catalogue and obtain directory states.
The mode that application layer user loads from browser by the html file by given is called application layer javascript API, and then the realization of calling bottom C++, and the background server transmission order to us, require background server that service is provided.For this reason, the function services design interface that we can be in advance can provide according to user's demand and our background server.Our interactive interfacing partly relates generally to be and gateway between mutual, therefore we need to simulate encapsulation and the parsing to http protocol, the demand encapsulation according to us that is us by the HTTP message protocol of basic principle, web server by the gateway end first carries out the parsing of agreement request, and the corresponding status request field of having resolved is sent to gateway, carry out different operations by gateway according to different field lexical or textual analysis again, Recovery Process is its inverse process, finally replys message and is sent to front end subscriber by web server.
The interface of upload file sheet of take is example:
The interface designed is write under WebCore/page in corresponding packaged file to the absolute path that parameter is the file that need to upload.
Upload procedure is divided into uploading data and metadata information, and file is carried out to burst according to certain size, according to the http protocol form designed, by data upload; Completing after whole file data uploads successfully, after the form encapsulation by the metadata information of file according to design, uploaded, upload and successfully indicate that whole file uploads successfully.
The web server that the HTTP message of uploading can first be delivered to the gateway end carries out protocol analysis, and will resolve accordingly field and be sent to gateway as unique cryptographic hash of user's authorization information, file fragmentation information, file sheet etc., carry out corresponding protocol conversion by gateway according to different fields, the agreement request of letter is sent to background service system, by service system, completes corresponding operation.
Corresponding interface is added in corresponding .idl file according to WEB IDL format specification, in order to generate corresponding JS calling interface, contact with Applied layer interface.
Write corresponding calling interface with HTML, in three grades of invoking upon mapping modes of interface that we were mentioned, carry out the work of calling of interface.
The working specification of all the other interfaces is similar, our packaged example all is based on the operational instances of webpage, former capital will be positioned over it under page catalogue, and create their the routine example of list in the DOMWindow object, in other words, they are to place and exist in the mode of global object, due to each parameter in the present invention write and the behavior of calling is proven technique very in industry, thereby more do not speak more bright at this.
According to above-described embodiment, just can realize well the present invention.
Claims (3)
1. the local extended method of the service of the storage resources based on the webkit kernel, is characterized in that, comprises the following steps:
(1) the .idl file compiling that webkit provides according to the user generates JSXXX.cpp, JSXX.h, webkitDOMXXX.cpp, webkitDOMXXX.h and webkitDOMXXXPrivate.h file;
(2) user will show under be placed into/Source/webCore/page of relevant extended operation catalogue with the page, and the interface function of this extended operation is programmed in corresponding .cpp file;
(3) write according to user's extended operation the idl file that meets WEB IDL standard, and compilation process, DOMWindow.h, DOMWindow.cpp and the DOMWindow.idl of makefile.am file carried out to corresponding modify.
2. the local extended method of the storage resources service based on the webkit kernel according to claim 1, is characterized in that, in described step (3), the compilation process of makefile.am file is as follows:
(3a) add corresponding h, cpp, idl, JSXXX.h and JSXXX.cpp file in the GNUmakefile.list.am under Source/WebCore;
(3b) add corresponding WebKitDOMXXX.h and WebkitDOMXXX.cpp file in the GNUmakefile.am under Source/WebCore/bindings/gobject.
3. the local extended method of the storage resources service based on the webkit kernel according to claim 2, is characterized in that, described idl file comprises idl attribute, interface attributes and parameter.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013103918858A CN103440134A (en) | 2013-09-02 | 2013-09-02 | Webkit kernel-based storage resource service local extension method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013103918858A CN103440134A (en) | 2013-09-02 | 2013-09-02 | Webkit kernel-based storage resource service local extension method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103440134A true CN103440134A (en) | 2013-12-11 |
Family
ID=49693825
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013103918858A Pending CN103440134A (en) | 2013-09-02 | 2013-09-02 | Webkit kernel-based storage resource service local extension method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103440134A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104714829A (en) * | 2013-12-15 | 2015-06-17 | 中国航空工业集团公司第六三一研究所 | Compiling linkage method for ensuring consistency of object code and source code |
CN107547944A (en) * | 2016-06-27 | 2018-01-05 | 中兴通讯股份有限公司 | Interface realizing method and device, set top box |
CN108197024A (en) * | 2017-12-28 | 2018-06-22 | 深圳Tcl数字技术有限公司 | Built-in browser adjustment method, debugging terminal and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100269098A1 (en) * | 2005-04-18 | 2010-10-21 | Research In Motion Limited | System and Method For Generating A Web Service Definition And Database Schema From Wireless Application Definition |
CN102591664A (en) * | 2011-12-31 | 2012-07-18 | 四川长虹电器股份有限公司 | Network account management method based on embedded browser |
CN103235739A (en) * | 2013-04-25 | 2013-08-07 | 深圳市中兴移动通信有限公司 | Method and device for accessing local database by Web program |
-
2013
- 2013-09-02 CN CN2013103918858A patent/CN103440134A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100269098A1 (en) * | 2005-04-18 | 2010-10-21 | Research In Motion Limited | System and Method For Generating A Web Service Definition And Database Schema From Wireless Application Definition |
CN102591664A (en) * | 2011-12-31 | 2012-07-18 | 四川长虹电器股份有限公司 | Network account management method based on embedded browser |
CN103235739A (en) * | 2013-04-25 | 2013-08-07 | 深圳市中兴移动通信有限公司 | Method and device for accessing local database by Web program |
Non-Patent Citations (2)
Title |
---|
何娅: "嵌入式浏览器扩展机制的研究与设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
吴光旭等: "基于WebKit浏览器的本地扩展方法", 《电脑知识与技术》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104714829A (en) * | 2013-12-15 | 2015-06-17 | 中国航空工业集团公司第六三一研究所 | Compiling linkage method for ensuring consistency of object code and source code |
CN104714829B (en) * | 2013-12-15 | 2017-11-28 | 中国航空工业集团公司第六三一研究所 | A kind of compiling link method for ensureing object code and source code consistency |
CN107547944A (en) * | 2016-06-27 | 2018-01-05 | 中兴通讯股份有限公司 | Interface realizing method and device, set top box |
CN108197024A (en) * | 2017-12-28 | 2018-06-22 | 深圳Tcl数字技术有限公司 | Built-in browser adjustment method, debugging terminal and computer readable storage medium |
CN108197024B (en) * | 2017-12-28 | 2022-01-04 | 深圳Tcl数字技术有限公司 | Embedded browser debugging method, debugging terminal and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102393857B (en) | Method and system for local call based on web page | |
CN102209111B (en) | Open cross-platform system for cloud computing mobile network terminal equipment | |
TWI670611B (en) | Web file sending method, webpage rendering method and device, webpage rendering system | |
CN104572843B (en) | The loading method and device of a kind of page | |
CN106209925A (en) | Page loading method, client and system | |
CN103942225A (en) | Method and system for invoking resources of Hybrid App client and client | |
CN104541262A (en) | System and method for transparent in-network adaptation of rich internet applications | |
TW200521748A (en) | Transport and administration model for offline browsing | |
CN110020329B (en) | Method, device and system for generating webpage | |
CN102043832A (en) | Method for realizing cross-domain request callback on webpage | |
WO2017114190A1 (en) | File uploading processing method and device | |
CN104050212A (en) | Method and system for mobilizing a web application to take advantage of a native device capability | |
CN105786511A (en) | Implementation method for terminal device Web application management | |
CN104980464B (en) | A kind of network request processing method, network server and network system | |
AU2016101498B4 (en) | Data Interchange System | |
CN105701153A (en) | Method and device for reading webpage resources and electronic equipment | |
CN103440134A (en) | Webkit kernel-based storage resource service local extension method | |
CN102779045A (en) | Interface generating method, interface editor and electronic equipment | |
CN105205151A (en) | Method and system for saving browser page flow at mobile terminal | |
CN104408178A (en) | Device and method for WEB control loading | |
CN112214250A (en) | Application program assembly loading method and device | |
CN113760264A (en) | Method and device for multiplexing components among multiple applications | |
US20120117258A1 (en) | Techniques to deploy and undeploy content to and from web servers | |
CN102523271A (en) | Terminal and communication method and system thereof | |
CN103793459B (en) | Webpage opening method and device |
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 |
Application publication date: 20131211 |
|
RJ01 | Rejection of invention patent application after publication |