CN107291563A - A kind of call method and device of back-end code plug-in unit - Google Patents

A kind of call method and device of back-end code plug-in unit Download PDF

Info

Publication number
CN107291563A
CN107291563A CN201710310137.0A CN201710310137A CN107291563A CN 107291563 A CN107291563 A CN 107291563A CN 201710310137 A CN201710310137 A CN 201710310137A CN 107291563 A CN107291563 A CN 107291563A
Authority
CN
China
Prior art keywords
plug
unit
file
add
call 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
CN201710310137.0A
Other languages
Chinese (zh)
Other versions
CN107291563B (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.)
Guangdong Wangjin Holdings Co Ltd
Original Assignee
Guangdong Wangjin Holdings 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 Guangdong Wangjin Holdings Co Ltd filed Critical Guangdong Wangjin Holdings Co Ltd
Priority to CN201710310137.0A priority Critical patent/CN107291563B/en
Publication of CN107291563A publication Critical patent/CN107291563A/en
Application granted granted Critical
Publication of CN107291563B publication Critical patent/CN107291563B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/544Remote

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention relates to a kind of call method and device of back-end code plug-in unit, wherein the call method includes judging whether plug-in unit route receives plug-in unit call request;If plug-in unit route receives plug-in unit call request, judge whether the call request is legal;If the call request is legal, loads add-on file and the add-on file is converted into package types;Plug-in unit entry method is called to obtain corresponding plug-in unit implementing result;The plug-in unit implementing result is converted into special parameter type.The present invention can realize the independence of plug-in unit, while can also enable the flexible combination application of code plug-in, reduction coupling lifts the exploitation service efficiency of plug-in unit.

Description

A kind of call method and device of back-end code plug-in unit
Technical field
The present invention relates to computer software development field, more particularly to a kind of call method and dress of back-end code plug-in unit Put.
Background technology
.NET it is across the lingware development platform based on internet, has complied with current software industry Distributed Calculation, face To component, enterprise-level application, software service and the main trend such as centered on Web.Web application and developments on existing .NET Field, if it is desired to enter " dynamic load " of line code, typically can be using popular third party's IoC frameworks, its dynamic load principle General to use the technologies such as reflection or Emit, by XML configuration file, loading realizes the dll file of target interface, such a Under pattern, for modules and function, it is desirable to first define respective interface, then carry out resume by different business dynamics multiple The example project of these interfaces is realized, to be compiled into different DLL.But different IOC Development of Framework style phases not to the utmost Together, and need additionally to understand complex third party's framework configuration, nor beneficial to the iteratively faster of version, flexibility Difference, can not especially solve the situation of the whole station packing of Web application sites acquiescence on .NET.
And rear end code plug-in technology (Ucsmy.CodePlugIn) can flexibly and efficiently increase Web rear ends ability, And risk is reduced as far as possible, and with the flexible division module of granularity as small as possible and function, while in increase, modification, deleting Web applies upper some module or function, all only influences whether involved module or function " itself ", reduces even Cut down the influence to other modules or function triggered due to version updating iteration, therefore for the plug-in unit of back-end code, Need to provide a kind of call method on back-end code plug-in unit, to realize above-mentioned functions.
The content of the invention
In view of the shortcomings of the prior art, the purpose of the present invention be intended to provide a kind of call method of back-end code plug-in unit and Device, can realize the independence of plug-in unit under conditions of based on .NET frameworks, while code plug-in can also be enabled flexible Combination application, reduction coupling, lifted plug-in unit exploitation service efficiency.
To achieve the above object, on the one hand, the present invention provides a kind of call method of back-end code plug-in unit, including following step Suddenly,
Judge whether plug-in unit route receives plug-in unit call request;
If plug-in unit route receives plug-in unit call request, judge whether the call request is legal;
If the call request is legal, loads add-on file and the add-on file is converted into package types;
Plug-in unit entry method is called to obtain corresponding plug-in unit implementing result;
The plug-in unit implementing result is converted into special parameter type.
As preferred, the loading add-on file and the step of the add-on file is converted into package types before also Including,
Judge whether called side calls authority according to the configuration data of called side;
Wherein, if the called side calls authority, perform the loading add-on file and turn the add-on file The step of being changed to package types.
As preferred, it is described the step of the plug-in unit implementing result is converted into special parameter type after also include,
Record meets the plug-in unit of preparatory condition and generates called side access log.
As preferred, it is described judge the call request it is whether legal including,
Plug-in card configuration data are obtained according to the call request;
Judge whether the plug-in card configuration data are identical with the first preset data.
As preferred, the add-on file is simultaneously converted to package types and included by the loading add-on file,
Plug-in unit numbering is obtained according to the call request;
The plug-in unit installation path determined in the plug-in unit route is numbered according to the plug-in unit;
The add-on file of correlation is positioned and loaded according to the plug-in unit installation path;
The add-on file is converted into package types.
On the other hand, the present invention also provides a kind of device, including,
Memory, for storage program instruction;
Processor, for running described program instruction, to perform following steps,
Judge whether plug-in unit route receives plug-in unit call request;
If plug-in unit route receives plug-in unit call request, judge whether the call request is legal;
If the call request is legal, loads add-on file and the add-on file is converted into package types;
Plug-in unit entry method is called to obtain corresponding plug-in unit implementing result;
The plug-in unit implementing result is converted into special parameter type.
As preferred, the processor is additionally operable to perform following steps,
Judge whether called side calls authority according to the configuration data of called side;
Wherein, if the called side calls authority, processor is used to perform the loading add-on file and by described in The step of add-on file is converted to package types.
As preferred, the processor is additionally operable to perform following steps,
Record meets the plug-in unit of preparatory condition and generates called side access log.
As preferred, judge whether the call request is legal including performing following step described in the computing device Suddenly,
Plug-in card configuration data are obtained according to the call request;
Judge whether the plug-in card configuration data are identical with the first preset data.
As preferred, add-on file is loaded described in the computing device and the add-on file is converted into plug-in unit class Type includes performing following steps,
Plug-in unit numbering is obtained according to the call request;
The plug-in unit installation path determined in the plug-in unit route is numbered according to the plug-in unit;
The add-on file of correlation is positioned and loaded according to the plug-in unit installation path;
The add-on file is converted into package types.
Beneficial effects of the present invention are as follows:
The call method and device of the present invention can realize the independence of plug-in unit under conditions of based on .NET frameworks, simultaneously The flexible combination application of code plug-in can also be enabled, reduction coupling lifts the exploitation service efficiency of plug-in unit.
In addition, the call method and device of the present invention also allow the pin function for pulling out substantial amounts of independence, work(is reduced The coupling of energy intermodule;And support fine-grained module level, class rank, or even the plug-in unit of method rank to divide, so that The Version Control flexibility ratio of plug-in unit is higher;Also support on the premise of Web application sites are not restarted, to accomplish new pin function The heat renewal of " plug and play " and old pin function.
Generally speaking the code plug-in under the call method can as independent module, function and UI makers so as to Flexible combination application is realized, so as to project, module, the quick evolution of function and iteration optimization, reduction coupling in Web applications, is carried Development efficiency is risen, expands the means of O&M and space on line, reduces maintainability risk.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of the better embodiment of the call method of back-end code plug-in unit of the invention;
Fig. 2 is the structural representation of code plug-in of the present invention;
The schematic flow sheet for the sub-step that Fig. 3 is step S102 in a kind of call method of back-end code plug-in unit of the invention;
The schematic flow sheet for the sub-step that Fig. 4 is step S103 in a kind of call method of back-end code plug-in unit of the invention;
Fig. 5 is a kind of structural representation of device of the invention.
Embodiment
Below in conjunction with accompanying drawing and embodiment, the present invention is described further:
Fig. 1 is referred to, the present invention relates to a kind of call method of back-end code plug-in unit, its better embodiment includes as follows Step,
Step S101, judges whether plug-in unit route receives plug-in unit call request.
Wherein, realize that this step needs to utilize HTTP routing policies, that is, intercept and receive the plug-in unit call request of correlation.Tool Body, as shown in Fig. 2 a complete plug-in application includes code plug-in base class (Ucsmy.PlugIn.CodeBase), should Code plug-in base class is used to provide the definition of plug-in unit base class with realizing specification, and its structure and main points are as follows:
A. one is provided for the extraneous sole inlet method called, such as CodeBase.CallResult;
B.CodeBase.CallResult does not assume that type, the shape of transmission of parameter using the parameter strategy of " open " Formula, but according to specifically used environment, the difference of scene, determined by code plug-in itself, such as, can under ASP.NET environment Parameter information (Url-Get/Form-Post/Cookie/Session etc. of web request is directly obtained by HttpRequest Deng), or by the CodeBase.RequestData (content can be xml, json, dictionary etc.) of weak type, for plug-in unit road Specific plug-in unit is transferred to by assembling, and is voluntarily converted to by plug-in unit the design parameter type of needs;
C) CodeBase.CallResult externally exposes unique return value CodeBase.ServiceResult, basis The following Action- plug-in units readme title of parameter, RunsStatus- implementing results, PromptCode- perform prompting coding, PromptMsg- performs prompt message, Remark- remark informations, DicData- self-defining data dictionaries etc..
Step S102, if plug-in unit route receives plug-in unit call request, judges whether the call request is legal.
Wherein, a plug-in application also includes plug-in unit route (Ucsmy.PlugIn.Route), and plug-in unit route is responsible for holding Row calls specific plug-in unit to realize, can using different ways of realization, (the aspx pages, HttpHandler, HttpModule etc. are Can, also can be as needed, define different http routing policies), define different plug-in unit rules or agreement.
Plug-in unit route is main to provide following functions:
A. as the extraneous unified entrance for calling certain to organize particular code pin function;
B. plug-in request is parsed, positions and loads correlative code plug-in unit;
C. plug-in unit entry method is performed, and implementing result is returned.
It is, of course, also possible to increase corresponding function in plug-in unit route as needed, such as carry out legitimacy verifies, call Square control of authority, to particular plug-in request or the parsing of return parameters, calls log recording etc..
For example, routeing RouteA routing specification example on plug-in unit, understood according to Fig. 2:
A. by RouteAHandler.aspx page adapter plug-in requests, and POST request is only accepted, must be by configuring HTTP routing policies, intercept and handle following three kinds of forms web access (in three layers of path, RouteA immobilizes, and { path1 } and { path2 } can represent " plug-in unit numbering ", but, and { path2 } needs generally as autgmentability and existed, big portion In the case of point, { path1 } has been able to meet demand):
[url-1,domain.com/RouteA/]
[url-2,domain.com/RouteA/{path1}/]
[url-3,domain.com/RouteA/{path1}/{path2}/]
B. recognizable plug-in unit placement catalogue, be about set under Web site /RouteA/ files;
C. recognizable card format, is about set to User Defined control, and Naming conventions are " plug-in unit is numbered .ascx ", using " ascx controls of dynamic load particular path, and change its type into plug-in unit base class, to call base class Defined in plug-in unit entry method ", to complete the loading of specific plug-in unit;
D. return value form is called, herein using json forms.
In addition, specifically, judge call request it is whether legal can carry out conventional " judging that plug-in unit is numbered whether to close The verification such as method ", " judging that plug-in unit associated documents whether there is ", " plug-in request parameter whether specification ", or according to actual needs, expand Exhibition increases other necessary verification means.If verification can't pass, i.e., described call request is illegal, then will now return and adjusts With the information of failure.
As preferred, as shown in figure 3, the step S102 can also specifically include following sub-step,
Step S201, plug-in card configuration data are obtained according to the call request.
Step S202, judges whether the plug-in card configuration data are identical with the first preset data.
If the plug-in card configuration data and first preset data are identicals, show to have passed through verification, i.e., it is described Call request is legal.Conversely, then showing that call request is illegal, the information of malloc failure malloc will be returned to.
Step S103, if the call request is legal, loads add-on file and the add-on file is converted into plug-in unit class Type.
Wherein, if loading or translation type failure, by throw exception, and put back to the specific abnormal information of called side.
Specifically, a plug-in application also includes the completion realized according to code plug-in base class and specific routing specification The plug-in unit of specific function.For example, the following plug-in unit implementation example based on RouteA specifications -- GetHotProducts (obtains fast-selling Commodity data) include:
A. a newly-built User Defined control such as GetHotProducts.ascx, deletes the CodeBehind of its acquiescence File GetHotProducts.ascx.cs (equivalent to original base class is removed), and state that its base class is CodeBase;
B. base class method CodeBase.CallResult is realized, hot item data are loaded in this method HotProducts, then by call CodeBase.ServiceResult.SetData (" HotProducts ", HotProducts) this data is loaded into DicData dictionaries (RouteA is possible to be completely received this data, and it is final with JSON forms completely return to called side), finally return to and call successful information;;
C. dispose under the catalogue that this code plug-in file appoints to RouteA and (mention as described above, Web stations are about scheduled on herein Under point /RouteA/ files), now plug-in unit can normally be called, and (such as constructing path by HttpWebRequest is Domain.com/RouteA/GetHotProducts Post requests.
As preferred, as shown in figure 4, the step S103 includes following sub-step,
Step S301, plug-in unit numbering is obtained according to the call request.
Step S302, the plug-in unit installation path determined in the plug-in unit route is numbered according to the plug-in unit.
Step S303, positions and loads the add-on file of correlation according to the plug-in unit installation path.
Step S304, package types are converted to by the add-on file.
Specifically, being numbered according to the plug-in unit of call request, the plug-in unit installation path being route with reference to plug-in unit, it can position and add Related add-on file is carried, and the add-on file is converted into plug-in unit type of foundation CodeBase.
Step S104, calls plug-in unit entry method to obtain corresponding plug-in unit implementing result.
Wherein, this step will perform the plug-in unit entry method (CodeBase.CallResult) for having loaded successful plug-in unit, To obtain plug-in unit implementing result ServiceResult.Certainly, before plug-in unit is performed, if there is specific demand, it can increase by actual conditions Extra step, such as " the specific parameter of assembling is into RequestData ".
Step S105, special parameter type is converted into by the plug-in unit implementing result.
Wherein it is possible to according to the plug-in unit implementing result ServiceResult of acquisition, be converted into special parameter type (JSON, XML, user-defined format text etc.), and called side is returned, terminate flow.
In addition, as it is further preferred that can also include before the step S103,
Step S103 ', judges whether called side calls authority according to the configuration data of called side.Wherein, if described adjust Authority is called with side, then performs the step 103.The configuration data of called side can self-defining according to actual needs.Sentence Whether disconnected called side, which has, is called authority to effectively improve the security performance that plug-in unit is used.
As it is further preferred that can also include after the step S105,
Step S106, record meets the plug-in unit of preparatory condition and generates called side access log.
Wherein, before implementing result is returned, if there is specific demand, step S106 can be increased by actual conditions, so that The more convenient practicality of the call method, improves the using experience degree being used for.Meanwhile, before implementing result is returned, it can also filter Or the sensitive information in inspection return value, so as to further improve the call method.
Generally speaking, call method of the invention can realize the independence of plug-in unit under conditions of based on .NET frameworks, The flexible combination application of code plug-in can also be enabled simultaneously, reduction coupling lifts the exploitation service efficiency of plug-in unit.Meanwhile, Code plug-in under the call method can realize that flexible combination should as independent module, function and UI makers With so as to project, module, the quick evolution of function and iteration optimization, reduction coupling, lifting development efficiency, expansion in Web applications The means of O&M and space on line, reduce maintainability risk.
In addition, as shown in figure 5, the present invention also provides a kind of device, described device 100 includes,
Memory 101, for storage program instruction;
Processor 102, for running described program instruction, to perform following steps,
Step S101, judges whether plug-in unit route receives plug-in unit call request.
Wherein, realize that this step needs to utilize HTTP routing policies, that is, intercept and receive the plug-in unit call request of correlation.Tool Body, as shown in Fig. 2 a complete plug-in application includes code plug-in base class (Ucsmy.PlugIn.CodeBase), should Code plug-in base class is used to provide the definition of plug-in unit base class with realizing specification, and its structure and main points are as follows:
A. one is provided for the extraneous sole inlet method called, such as CodeBase.CallResult;
B.CodeBase.CallResult does not assume that type, the shape of transmission of parameter using the parameter strategy of " open " Formula, but according to specifically used environment, the difference of scene, determined by code plug-in itself, such as, can under ASP.NET environment Parameter information (Url-Get/Form-Post/Cookie/Session etc. of web request is directly obtained by HttpRequest Deng), or by the CodeBase.RequestData (content can be xml, json, dictionary etc.) of weak type, for plug-in unit road Specific plug-in unit is transferred to by assembling, and is voluntarily converted to by plug-in unit the design parameter type of needs;
C) CodeBase.CallResult externally exposes unique return value CodeBase.ServiceResult, basis The following Action- plug-in units readme title of parameter, RunsStatus- implementing results, PromptCode- perform prompting coding, PromptMsg- performs prompt message, Remark- remark informations, DicData- self-defining data dictionaries etc..
Step S102, if plug-in unit route receives plug-in unit call request, judges whether the call request is legal.
Wherein, a plug-in application also includes plug-in unit route (Ucsmy.PlugIn.Route), and plug-in unit route is responsible for holding Row calls specific plug-in unit to realize, can using different ways of realization, (the aspx pages, HttpHandler, HttpModule etc. are Can, also can be as needed, define different http routing policies), define different plug-in unit rules or agreement.
Plug-in unit route is main to provide following functions:
A. as the extraneous unified entrance for calling certain to organize particular code pin function;
B. plug-in request is parsed, positions and loads correlative code plug-in unit;
C. plug-in unit entry method is performed, and implementing result is returned.
It is, of course, also possible to increase corresponding function in plug-in unit route as needed, such as carry out legitimacy verifies, call Square control of authority, to particular plug-in request or the parsing of return parameters, calls log recording etc..
For example, routeing RouteA routing specification example on plug-in unit, understood according to Fig. 2:
A. by RouteAHandler.aspx page adapter plug-in requests, and POST request is only accepted, must be by configuring HTTP routing policies, intercept and handle following three kinds of forms web access (in three layers of path, RouteA immobilizes, and { path1 } and { path2 } can represent " plug-in unit numbering ", but, and { path2 } needs generally as autgmentability and existed, big portion In the case of point, { path1 } has been able to meet demand):
[url-1,domain.com/RouteA/]
[url-2,domain.com/RouteA/{path1}/]
[url-3,domain.com/RouteA/{path1}/{path2}/]
B. recognizable plug-in unit placement catalogue, be about set under Web site /RouteA/ files;
C. recognizable card format, is about set to User Defined control, and Naming conventions are " plug-in unit is numbered .ascx ", using " ascx controls of dynamic load particular path, and change its type into plug-in unit base class, to call base class Defined in plug-in unit entry method ", to complete the loading of specific plug-in unit;
D. return value form is called, herein using json forms.
In addition, specifically, judge call request it is whether legal can carry out conventional " judging that plug-in unit is numbered whether to close The verification such as method ", " judging that plug-in unit associated documents whether there is ", " plug-in request parameter whether specification ", or according to actual needs, expand Exhibition increases other necessary verification means.If verification can't pass, i.e., described call request is illegal, then will now return and adjusts With the information of failure.
As preferred, as shown in figure 3, the processor 102 can also include performing for performing the step S102 Following sub-step,
Step S201, plug-in card configuration data are obtained according to the call request.
Step S202, judges whether the plug-in card configuration data are identical with the first preset data.
If the plug-in card configuration data and first preset data are identicals, show to have passed through verification, i.e., it is described Call request is legal.Conversely, then showing that call request is illegal, the information of malloc failure malloc will be returned to.
Step S103, if the call request is legal, loads add-on file and the add-on file is converted into plug-in unit class Type.
Wherein, if loading or translation type failure, by throw exception, and put back to the specific abnormal information of called side.
Specifically, a plug-in application also includes the completion realized according to code plug-in base class and specific routing specification The plug-in unit of specific function.For example, the following plug-in unit implementation example based on RouteA specifications -- GetHotProducts (obtains fast-selling Commodity data) include:
A. a newly-built User Defined control such as GetHotProducts.ascx, deletes the CodeBehind of its acquiescence File GetHotProducts.ascx.cs (equivalent to original base class is removed), and state that its base class is CodeBase;
B. base class method CodeBase.CallResult is realized, hot item data are loaded in this method HotProducts, then by call CodeBase.ServiceResult.SetData (" HotProducts ", HotProducts) this data is loaded into DicData dictionaries (RouteA is possible to be completely received this data, and it is final with JSON forms completely return to called side), finally return to and call successful information;;
C. dispose under the catalogue that this code plug-in file appoints to RouteA and (mention as described above, Web stations are about scheduled on herein Under point /RouteA/ files), now plug-in unit can normally be called, and (such as constructing path by HttpWebRequest is Domain.com/RouteA/GetHotProducts Post requests.
As preferred, it can also include as shown in figure 4, the processor 102 performs the step S103 below execution Sub-step,
Step S301, plug-in unit numbering is obtained according to the call request.
Step S302, the plug-in unit installation path determined in the plug-in unit route is numbered according to the plug-in unit.
Step S303, positions and loads the add-on file of correlation according to the plug-in unit installation path.
Step S304, package types are converted to by the add-on file.
Specifically, being numbered according to the plug-in unit of call request, the plug-in unit installation path being route with reference to plug-in unit, it can position and add Related add-on file is carried, and the add-on file is converted into plug-in unit type of foundation CodeBase.
Step S104, calls plug-in unit entry method to obtain corresponding plug-in unit implementing result.
Wherein, this step will perform the plug-in unit entry method (CodeBase.CallResult) for having loaded successful plug-in unit, To obtain plug-in unit implementing result ServiceResult.Certainly, before plug-in unit is performed, if there is specific demand, it can increase by actual conditions Extra step, such as " the specific parameter of assembling is into RequestData ".
Step S105, special parameter type is converted into by the plug-in unit implementing result.
Wherein it is possible to according to the plug-in unit implementing result ServiceResult of acquisition, be converted into special parameter type (JSON, XML, user-defined format text etc.), and called side is returned, terminate flow.
In addition, as it is further preferred that processor 101 perform the step S103 before can also carry out following step Suddenly,
Step S103 ', judges whether called side calls authority according to the configuration data of called side.Wherein, if described adjust Authority is called with side, then performs the step 103.The configuration data of called side can self-defining according to actual needs.Sentence Whether disconnected called side, which has, is called authority to effectively improve the security performance that plug-in unit is used.
As it is further preferred that can also carry out following steps after step S105 described in computing device,
Step S106, record meets the plug-in unit of preparatory condition and generates called side access log.
Wherein, before implementing result is returned, if there is specific demand, step S106 can be increased by actual conditions, so that The more convenient practicality of the call method, improves the using experience degree being used for.Meanwhile, before implementing result is returned, it can also filter Or the sensitive information in inspection return value, so as to further improve the call method.
For those skilled in the art, technical scheme that can be as described above and design, make other each It is kind corresponding to change and deform, and all these change and deformation should all belong to the protection model of the claims in the present invention Within enclosing.

Claims (10)

1. a kind of call method of back-end code plug-in unit, it is characterised in that comprise the following steps,
Judge whether plug-in unit route receives plug-in unit call request;
If plug-in unit route receives plug-in unit call request, judge whether the call request is legal;
If the call request is legal, loads add-on file and the add-on file is converted into package types;
Plug-in unit entry method is called to obtain corresponding plug-in unit implementing result;
The plug-in unit implementing result is converted into special parameter type.
2. call method as claimed in claim 1, it is characterised in that the loading add-on file simultaneously turns the add-on file Also include before the step of being changed to package types,
Judge whether called side calls authority according to the configuration data of called side;
Wherein, if the called side calls authority, perform the loading add-on file and be converted to the add-on file The step of package types.
3. call method as claimed in claim 1, it is characterised in that described that the plug-in unit implementing result is converted into specific ginseng Also include after the step of several classes of types,
Record meets the plug-in unit of preparatory condition and generates called side access log.
4. call method as claimed in claim 1, it is characterised in that it is described judge the call request it is whether legal including,
Plug-in card configuration data are obtained according to the call request;
Judge whether the plug-in card configuration data are identical with the first preset data.
5. call method as claimed in claim 1, it is characterised in that the loading add-on file simultaneously turns the add-on file Being changed to package types includes,
Plug-in unit numbering is obtained according to the call request;
The plug-in unit installation path determined in the plug-in unit route is numbered according to the plug-in unit;
The add-on file of correlation is positioned and loaded according to the plug-in unit installation path;
The add-on file is converted into package types.
6. a kind of device, it is characterised in that including,
Memory, for storage program instruction;
Processor, for running described program instruction, to perform following steps,
Judge whether plug-in unit route receives plug-in unit call request;
If plug-in unit route receives plug-in unit call request, judge whether the call request is legal;
If the call request is legal, loads add-on file and the add-on file is converted into package types;
Plug-in unit entry method is called to obtain corresponding plug-in unit implementing result;
The plug-in unit implementing result is converted into special parameter type.
7. described device as claimed in claim 6, it is characterised in that the processor is additionally operable to perform following steps,
Judge whether called side calls authority according to the configuration data of called side;
Wherein, if the called side calls authority, processor is used to performing the loading add-on file and by the plug-in unit The step of file is converted to package types.
8. device as claimed in claim 6, it is characterised in that the processor is additionally operable to perform following steps,
Record meets the plug-in unit of preparatory condition and generates called side access log.
9. device as claimed in claim 6, it is characterised in that the call request is judged described in the computing device whether It is legal including perform following steps,
Plug-in card configuration data are obtained according to the call request;
Judge whether the plug-in card configuration data are identical with the first preset data.
10. device as claimed in claim 6, it is characterised in that add-on file is loaded described in the computing device and by institute State add-on file and be converted to package types including performing following steps,
Plug-in unit numbering is obtained according to the call request;
The plug-in unit installation path determined in the plug-in unit route is numbered according to the plug-in unit;
The add-on file of correlation is positioned and loaded according to the plug-in unit installation path;
The add-on file is converted into package types.
CN201710310137.0A 2017-05-05 2017-05-05 Calling method and device of back-end code plug-in Active CN107291563B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710310137.0A CN107291563B (en) 2017-05-05 2017-05-05 Calling method and device of back-end code plug-in

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710310137.0A CN107291563B (en) 2017-05-05 2017-05-05 Calling method and device of back-end code plug-in

Publications (2)

Publication Number Publication Date
CN107291563A true CN107291563A (en) 2017-10-24
CN107291563B CN107291563B (en) 2020-10-09

Family

ID=60094433

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710310137.0A Active CN107291563B (en) 2017-05-05 2017-05-05 Calling method and device of back-end code plug-in

Country Status (1)

Country Link
CN (1) CN107291563B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101258A (en) * 2018-08-20 2018-12-28 山东浪潮通软信息科技有限公司 A kind of NuGet packet method for updating edition and device based on VSIX

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102883324A (en) * 2012-10-19 2013-01-16 广州市动景计算机科技有限公司 Security verification method, security verification device and mobile terminal for plugin call in mobile terminal
CN103297381A (en) * 2012-02-22 2013-09-11 阿里巴巴集团控股有限公司 Service access method based on plugin and system thereof
CN104866327A (en) * 2015-06-19 2015-08-26 上海斐讯数据通信技术有限公司 PHP development method and frame
CN105786562A (en) * 2016-02-04 2016-07-20 百度在线网络技术(北京)有限公司 Method and device for integrating plug-in

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297381A (en) * 2012-02-22 2013-09-11 阿里巴巴集团控股有限公司 Service access method based on plugin and system thereof
CN102883324A (en) * 2012-10-19 2013-01-16 广州市动景计算机科技有限公司 Security verification method, security verification device and mobile terminal for plugin call in mobile terminal
CN104866327A (en) * 2015-06-19 2015-08-26 上海斐讯数据通信技术有限公司 PHP development method and frame
CN105786562A (en) * 2016-02-04 2016-07-20 百度在线网络技术(北京)有限公司 Method and device for integrating plug-in

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101258A (en) * 2018-08-20 2018-12-28 山东浪潮通软信息科技有限公司 A kind of NuGet packet method for updating edition and device based on VSIX

Also Published As

Publication number Publication date
CN107291563B (en) 2020-10-09

Similar Documents

Publication Publication Date Title
CN109597661B (en) Service function configuration method and device
CN106940428B (en) Chip verification method, device and system
CN104866327B (en) A kind of PHP development approaches and framework
CN102222005A (en) Service model-oriented software running platform and running mode thereof
CN108845950A (en) Test device, the method for test and storage medium
CN110942387A (en) Method and system for establishing electric ticket business function based on micro-service
CN111913734A (en) On-line development platform based on micro-service technology system
CN103473696A (en) Method and system for collecting, analyzing and distributing internet business information
CN110262777B (en) Block chain application framework
US11526646B2 (en) Side channel aware automatic place and route
US8965746B2 (en) System and method for validating an electrical network model
CN107729514A (en) A kind of Replica placement node based on hadoop determines method and device
CN109445845A (en) Interface call method, device, computer equipment and storage medium
CN111210194A (en) Business support system and method special for enterprise tax system
CN110502530A (en) Database functions call method, system, computer equipment and storage medium
CN108845800A (en) A kind of implementation method, device, equipment and the storage medium of component extension function
CN110414257A (en) A kind of data access method and server
CN102289367B (en) Command-line shell order according to pattern generates
US11294729B2 (en) Resource provisioning for multiple invocations to an electronic design automation application
CN102541544B (en) The processing method of Tree control, Apparatus and system
CN107291563A (en) A kind of call method and device of back-end code plug-in unit
CN103501341A (en) Method and device for establishing Web service
CN111324357B (en) Method for accessing application program to wind control platform and related equipment
CN111090442B (en) Application updating method, device and storage medium
CN112561690A (en) Method, system, equipment and storage medium for testing credit card staging service interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20210922

Granted publication date: 20201009

PP01 Preservation of patent right