CN105404504A - Debugging method and device of Web assembly - Google Patents

Debugging method and device of Web assembly Download PDF

Info

Publication number
CN105404504A
CN105404504A CN201510731607.1A CN201510731607A CN105404504A CN 105404504 A CN105404504 A CN 105404504A CN 201510731607 A CN201510731607 A CN 201510731607A CN 105404504 A CN105404504 A CN 105404504A
Authority
CN
China
Prior art keywords
file
web assembly
access
debugged
request
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.)
Granted
Application number
CN201510731607.1A
Other languages
Chinese (zh)
Other versions
CN105404504B (en
Inventor
张宏伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN201510731607.1A priority Critical patent/CN105404504B/en
Publication of CN105404504A publication Critical patent/CN105404504A/en
Application granted granted Critical
Publication of CN105404504B publication Critical patent/CN105404504B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a debugging method and device of a Web assembly. The debugging method comprises the following steps: under the OSGi (Open Service Gateway Initiative) development environment, after a situation that a user revises files in the Web assembly under debugging is detected, all files in the Web assembly under debugging are stored into a folder; the name of the folder and the names of the files in the folder are sent to a resource access catalogue; after an access request of the user is received, whether the file to be accessed by the access request is the file in the Web assembly under debugging or not is judged; if the file to be accessed by the access request is the file in the Web assembly under debugging, the file to be accessed in the resource access catalogue is searched, and a search result is returned; and if the file to be accessed by the access request is not the file in the Web assembly under debugging, the files in the Web assemblies except the Web assembly under debugging are searched, and the search result is returned. The hot debugging of Web assembly development is realized, and a development period is greatly shortened.

Description

A kind of adjustment method of Web assembly and device
Technical field
The embodiment of the present invention relates to software technology field, particularly relates to a kind of adjustment method and device of Web assembly.
Background technology
OSGi (OpenServiceGatewayInitiative) is the well-known Java modularization specification of industry, obtain the application server provider of main flow as Oracle (Oracle), IBM (InternationalBusinessMachinesCorporation, International Business Machine Corporation (IBM)) etc. the support of company, the Java blocking criteria on having come true.
In OSGi development environment, owing to being Componentized development scheme, each assembly be independent packing and mutually between undertaken alternately by the form of serving.The deployment of serving under being illustrated in figure 1 the development mode of OSGi.In this deployed environment, each Web assembly (namely suffix is the file of .jar) is all employed server and loads and be no longer extracted.In this case, when carrying out the debugging of application program, after needing the file revised in Web assembly to preserve, repack described Web assembly, and restart application server, then proceed debugging, all need to restart application server after each debugging, and Web assembly is loaded, this debud mode existence causes debugging cycle length, inefficient problem.
Summary of the invention
The invention provides a kind of adjustment method and device of Web assembly, to realize the heat debugging of Web Components Development, and then shorten the object of construction cycle.
First aspect, embodiments provides a kind of adjustment method of Web assembly, comprising:
Under OSGi development environment, after detecting that user modifies to the file in the Web assembly debugged, the All Files in the described Web assembly debugged is saved in file;
The title of the title of described file and described file file is sent in resource access catalogue;
When after the request of access receiving user, the file will accessed described request of access whether for described in file in the Web assembly debugged judge;
If so, then in described resource access catalogue, the described file that will access is searched for and returned Search Results;
If not, then the file in the Web assembly outside the described Web assembly debugged is searched for and returned Search Results.
Further, before the All Files in the described Web assembly debugged is saved in file, also comprise:
When receiving the file update instruction of arbitrary file in Web assembly, if judge that described Web assembly has been stored to described file, then in described file, carry out file update according to described file update instruction.
Further, described request of access is the request of access that user sends from browser.
Second aspect, the embodiment of the present invention additionally provides a kind of debugging apparatus of Web assembly, comprising:
Module preserved by file, under OSGi development environment, after detecting that user modifies to the file in the Web assembly debugged, is saved in file by the All Files in the described Web assembly debugged;
Title sending module, for being sent in resource access catalogue by the title of the title of described file and described file file;
File judge module, for when after the request of access receiving user, the file will accessed described request of access whether for described in file in the Web assembly debugged judge;
First file search module, during for being the file in the described Web assembly debugged when the file that will access, searching for the described file that will access and returning Search Results in described resource access catalogue;
Second file search module, during for not being the file in the described Web assembly debugged when the file that will access, searching for the file in the Web assembly outside the described Web assembly debugged and returning Search Results.
Further, also comprise:
File update module, for before the All Files in the described Web assembly debugged is saved in file, when receiving the file update instruction of arbitrary file in Web assembly, if judge that described Web assembly has been stored to described file, then in described file, carry out file update according to described file update instruction.
Further, described request of access is the request of access that user sends from browser.
When the embodiment of the present invention by debugging Web assembly under OSGi development environment, after detecting that user modifies to the file in Web assembly, All Files in the described Web assembly debugged is saved in file, and the title of the title of file and file file is sent in resource access catalogue, when receive from the request of access of user in the file that will access for described in file in the Web assembly debugged time, then in described resource access catalogue, the described file that will access is searched for and returned Search Results, make the access access of the Web assembly file of debugging being become to file file under debugging mode, achieve the heat debugging of Web Components Development, that is, after Web assembly file is modified, do not need to repack described Web assembly to realize timely debugging, shorten the construction cycle greatly, improve development efficiency.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of the deployment of serving under the development mode of OSGi in prior art;
The schematic flow sheet of the adjustment method of a kind of Web assembly that Fig. 2 provides for the embodiment of the present invention one;
The structural representation of the debugging apparatus of a kind of Web assembly that Fig. 3 provides for the embodiment of the present invention two.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.Be understandable that, specific embodiment described herein is only for explaining the present invention, but not limitation of the invention.It also should be noted that, for convenience of description, illustrate only part related to the present invention in accompanying drawing but not entire infrastructure.
Embodiment one
The schematic flow sheet of the adjustment method of a kind of Web assembly that Fig. 2 provides for the embodiment of the present invention one, the present embodiment is applicable to the situation of carrying out heat debugging under OSGi development environment, and the method can be performed by application server, specifically comprises following operation:
S110, under OSGi development environment, after detecting that user modifies to the file in the Web assembly debugged, the All Files in the described Web assembly debugged to be saved in file.
Preferably, can also comprise in this operation described file is named.Exemplary, can by described file called after folder_example, the benefit arranged like this, when there being multiple Web assembly to debug, can conveniently distinguish.
S120, the title of the title of described file and described file file to be sent in resource access catalogue.
Can be made in subsequent operation by this operation, when the file in the Web assembly debugged is conducted interviews, can be searched for by the file in the described resource access catalogue pair described file corresponding with the Web assembly debugged.
S130, when after the request of access receiving user, the file will accessed described request of access whether for described in file in the Web assembly debugged judge.If so, then S140 is carried out; If not, then S150 is carried out.
Optionally, described request of access can refer to the request of access that user sends from browser.Foundation can be provided as the position of the follow-up file to accessing by judging in this operation.Exemplary, the described file that will access can be the suffix such as such as index.jsp is the file of .jsp.
S140, in described resource access catalogue, the described file that will access is searched for and returned Search Results.
By this operation make when the described file that will access for described in file in the Web assembly debugged time, the Search Results obtained is the file of the latest edition after debugging namely after amendment.The described Search Results that returns specifically can refer to that the address of the file obtained by Search Results or content return to user.
S150, the file in the Web assembly outside the described Web assembly debugged is searched for and returned Search Results.
Concrete, when accessed file is not the file in the Web assembly debugged, just can the file in other Web assemblies be searched for.
When the embodiment of the present invention by debugging Web assembly under OSGi development environment, after detecting that user modifies to the file in Web assembly, All Files in the described Web assembly debugged is saved in file, and the title of the title of file and file file is sent in resource access catalogue, when receive from the request of access of user in the file that will access for described in file in the Web assembly debugged time, then in described resource access catalogue, the described file that will access is searched for and returned Search Results, make to become the access of file file to the access of the Web assembly file of debugging and resource access is redirected, achieve the heat debugging of Web Components Development, that is, after Web assembly file is modified, no longer need to repack described Web assembly to realize timely debugging, shorten the construction cycle greatly.
Preferably, on the basis of above-described embodiment, before the All Files in the described Web assembly debugged is saved in file, also comprise:
When receiving the file update instruction of arbitrary file in Web assembly, if judge that described Web assembly has been stored to described file, then in described file, carry out file update according to described file update instruction.This operation can be specifically, when being modified by the file of file arbitrary in Web assembly, whether has been stored to described file judges all files in described Web assembly; When all files in described Web assembly has been stored to described file, can only amended file be stored and replaced.The benefit of such setting is, when repeatedly revising described same Web assembly, does not need all to be stored by all files at every turn, only needs the file upgrading amendment, saves memory headroom, accelerate the renewal speed of file.
Embodiment two
The structural representation of the debugging apparatus of a kind of Web assembly that Fig. 3 provides for the embodiment of the present invention two.The part that can be used as application server is built in application server.As shown in Figure 3, a kind of debugging apparatus of Web assembly that the present embodiment provides mainly comprises:
File preserves module 210, title sending module 220, file judge module 230, first file search module 240 and the second file search module 250.
Module 210 preserved by file, under OSGi development environment, after detecting that user modifies to the file in the Web assembly debugged, is saved in file by the All Files in the described Web assembly debugged;
Title sending module 220, for being sent in resource access catalogue by the title of the title of described file and described file file;
File judge module 230, for when after the request of access receiving user, the file will accessed described request of access whether for described in file in the Web assembly debugged judge;
First file search module 240, during for being the file in the described Web assembly debugged when the file that will access, searching for the described file that will access and returning Search Results in described resource access catalogue;
Second file search module 250, during for not being the file in the described Web assembly debugged when the file that will access, searching for the file in the Web assembly outside the described Web assembly debugged and returning Search Results.
When the embodiment of the present invention by debugging Web assembly under OSGi development environment, after detecting that user modifies to the file in Web assembly, file is preserved module 210 and is saved in file by the All Files in the described Web assembly debugged, and the title of the title of file and file file is sent in resource access catalogue by title sending module 220, when after the request of access receiving user, the file that will access described request of access of file judge module 230 whether for described in file in the Web assembly debugged judge, when receive from the request of access of user in the file that will access for described in file in the Web assembly debugged time, the first file search module 240 is searched for the described file that will access and returns Search Results in described resource access catalogue, when the file that will access is not the file in the described Web assembly debugged, second file search module 250 is searched for the file in the Web assembly outside the described Web assembly debugged and returns Search Results, make the access access of the Web assembly file of debugging being become to file file, achieve the heat debugging of Web Components Development, shorten the construction cycle greatly.
Further, a kind of debugging apparatus of Web assembly that above-described embodiment provides also comprises:
File update module, for when receiving the file update instruction of arbitrary file in Web assembly, if judge that described Web assembly has been stored to described file, then carries out file update according to described file update instruction in described file.
Optionally, described request of access is the request of access that user sends from browser.
The debugging apparatus of above-mentioned Web assembly can perform the adjustment method of the Web assembly that any embodiment of the present invention provides, and possesses the corresponding functional module of adjustment method and beneficial effect that perform Web assembly.
Note, above are only preferred embodiment of the present invention and institute's application technology principle.Skilled person in the art will appreciate that and the invention is not restricted to specific embodiment described here, various obvious change can be carried out for a person skilled in the art, readjust and substitute and can not protection scope of the present invention be departed from.Therefore, although be described in further detail invention has been by above embodiment, the present invention is not limited only to above embodiment, when not departing from the present invention's design, can also comprise other Equivalent embodiments more, and scope of the present invention is determined by appended right.

Claims (6)

1. an adjustment method for Web assembly, is characterized in that, comprising:
Under OSGi development environment, after detecting that user modifies to the file in the Web assembly debugged, the All Files in the described Web assembly debugged is saved in file;
The title of the title of described file and described file file is sent in resource access catalogue;
When after the request of access receiving user, the file will accessed described request of access whether for described in file in the Web assembly debugged judge;
If so, then in described resource access catalogue, the described file that will access is searched for and returned Search Results;
If not, then the file in the Web assembly outside the described Web assembly debugged is searched for and returned Search Results.
2. method according to claim 1, is characterized in that, before being saved in file by the All Files in the described Web assembly debugged, also comprises:
When receiving the file update instruction of arbitrary file in Web assembly, if judge that described Web assembly has been stored to described file, then in described file, carry out file update according to described file update instruction.
3. method according to claim 1, is characterized in that, described request of access is the request of access that user sends from browser.
4. a debugging apparatus for Web assembly, is characterized in that, comprising:
Module preserved by file, under OSGi development environment, after detecting that user modifies to the file in the Web assembly debugged, is saved in file by the All Files in the described Web assembly debugged;
Title sending module, for being sent in resource access catalogue by the title of the title of described file and described file file;
File judge module, for when after the request of access receiving user, the file will accessed described request of access whether for described in file in the Web assembly debugged judge;
First file search module, during for being the file in the described Web assembly debugged when the file that will access, searching for the described file that will access and returning Search Results in described resource access catalogue;
Second file search module, during for not being the file in the described Web assembly debugged when the file that will access, searching for the file in the Web assembly outside the described Web assembly debugged and returning Search Results.
5. device according to claim 4, is characterized in that, also comprises:
File update module, for before the All Files in the described Web assembly debugged is saved in file, when receiving the file update instruction of arbitrary file in Web assembly, if judge that described Web assembly has been stored to described file, then in described file, carry out file update according to described file update instruction.
6. device according to claim 4, is characterized in that, described request of access is the request of access that user sends from browser.
CN201510731607.1A 2015-11-02 2015-11-02 A kind of adjustment method and device of Web component Expired - Fee Related CN105404504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510731607.1A CN105404504B (en) 2015-11-02 2015-11-02 A kind of adjustment method and device of Web component

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510731607.1A CN105404504B (en) 2015-11-02 2015-11-02 A kind of adjustment method and device of Web component

Publications (2)

Publication Number Publication Date
CN105404504A true CN105404504A (en) 2016-03-16
CN105404504B CN105404504B (en) 2018-12-25

Family

ID=55470007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510731607.1A Expired - Fee Related CN105404504B (en) 2015-11-02 2015-11-02 A kind of adjustment method and device of Web component

Country Status (1)

Country Link
CN (1) CN105404504B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239475A (en) * 2016-03-29 2017-10-10 阿里巴巴集团控股有限公司 One kind calls document method and device
WO2018149190A1 (en) * 2017-02-20 2018-08-23 平安科技(深圳)有限公司 Component debugging method, device and apparatus, and computer readable storage medium
CN110597549A (en) * 2019-09-20 2019-12-20 网易(杭州)网络有限公司 Searching method, device and equipment in code engineering and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070118888A1 (en) * 2000-01-21 2007-05-24 Scriptlogic Corporation Managing client configuration settings in a network environment
TW200923684A (en) * 2007-11-29 2009-06-01 Wistron Corp A system for common compiler service based on the open service gateway initiative framework and the method thereof
CN101901182A (en) * 2009-05-31 2010-12-01 比亚迪股份有限公司 Processing method and system of debug file data
CN102073506A (en) * 2011-02-24 2011-05-25 北京中电普华信息技术有限公司 Java 2 enterprise edition (J2EE) based method and system for processing Web application request
CN102929643A (en) * 2012-11-09 2013-02-13 北京中电普华信息技术有限公司 Method and system developing Java 2 platform enterprise edition (J2EE) application
CN103092581A (en) * 2011-10-28 2013-05-08 阿里巴巴集团控股有限公司 Method and device for setting up Web front-end local development environment
CN103677854A (en) * 2013-12-31 2014-03-26 曙光云计算技术有限公司 Design method and design system of OSGI (Open Service Gateway Initiative)-WEB framework applicable to cloud computing environment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070118888A1 (en) * 2000-01-21 2007-05-24 Scriptlogic Corporation Managing client configuration settings in a network environment
TW200923684A (en) * 2007-11-29 2009-06-01 Wistron Corp A system for common compiler service based on the open service gateway initiative framework and the method thereof
CN101901182A (en) * 2009-05-31 2010-12-01 比亚迪股份有限公司 Processing method and system of debug file data
CN102073506A (en) * 2011-02-24 2011-05-25 北京中电普华信息技术有限公司 Java 2 enterprise edition (J2EE) based method and system for processing Web application request
CN103092581A (en) * 2011-10-28 2013-05-08 阿里巴巴集团控股有限公司 Method and device for setting up Web front-end local development environment
CN102929643A (en) * 2012-11-09 2013-02-13 北京中电普华信息技术有限公司 Method and system developing Java 2 platform enterprise edition (J2EE) application
CN103677854A (en) * 2013-12-31 2014-03-26 曙光云计算技术有限公司 Design method and design system of OSGI (Open Service Gateway Initiative)-WEB framework applicable to cloud computing environment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239475A (en) * 2016-03-29 2017-10-10 阿里巴巴集团控股有限公司 One kind calls document method and device
CN107239475B (en) * 2016-03-29 2020-09-18 阿里巴巴集团控股有限公司 File calling method and device
WO2018149190A1 (en) * 2017-02-20 2018-08-23 平安科技(深圳)有限公司 Component debugging method, device and apparatus, and computer readable storage medium
CN110597549A (en) * 2019-09-20 2019-12-20 网易(杭州)网络有限公司 Searching method, device and equipment in code engineering and readable storage medium
CN110597549B (en) * 2019-09-20 2023-08-22 网易(杭州)网络有限公司 Searching method, device and equipment in code engineering and readable storage medium

Also Published As

Publication number Publication date
CN105404504B (en) 2018-12-25

Similar Documents

Publication Publication Date Title
CN106708899B (en) Automatic point burying method and device
US10412176B2 (en) Website access method, apparatus, and website system
CN106164866B (en) Efficient migration of client-side WEB state
US20150248302A1 (en) Method, apparatus, server and system for implementing web application
CN103034583B (en) A kind of method and system for the treatment of software automatic test script
US7779409B2 (en) Device-to-device software distribution
WO2017067230A1 (en) Software function expansion method and apparatus based on micro service architecture
CN105607935A (en) Application updating method and terminal and server
US9262311B1 (en) Network page test system and methods
US20170249177A1 (en) Extending user interface of a web console
CN104978194A (en) Web page front-end development method and apparatus
WO2009043037A4 (en) Network operating system
CN104317591A (en) OSGi (open service gateway initiative)-based web interface frame system and web business processing method thereof
CN105068802B (en) A kind of Web application software realization system and method for striding equipment operation
CN102999352A (en) Embedded system assembly loading method
CN105404504A (en) Debugging method and device of Web assembly
CN105653335A (en) Plug-in procedure control method and device
CN104503752A (en) Method and device for controlling webpage to call system functions in intelligent equipment
CN103440143A (en) System and method for upgrading mobile web application
US8600960B2 (en) Processing proposed changes to data
US20160147547A1 (en) Metadata-based class loading using a content repository
CN102156697A (en) Method and terminal equipment for realizing webpage application through widget
US20180059887A1 (en) Direct navigation to modal dialogs
US9811324B2 (en) Code caching system
US10095791B2 (en) Information search method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181225