CN107329748A - API development managements method and system and server and computer-readable recording medium - Google Patents

API development managements method and system and server and computer-readable recording medium Download PDF

Info

Publication number
CN107329748A
CN107329748A CN201710491010.3A CN201710491010A CN107329748A CN 107329748 A CN107329748 A CN 107329748A CN 201710491010 A CN201710491010 A CN 201710491010A CN 107329748 A CN107329748 A CN 107329748A
Authority
CN
China
Prior art keywords
api
frameworks
app
thinkphp
framework
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
CN201710491010.3A
Other languages
Chinese (zh)
Other versions
CN107329748B (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.)
Fujian Cnfol Information Technology Co Ltd
Original Assignee
Fujian Cnfol Information 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 Fujian Cnfol Information Technology Co Ltd filed Critical Fujian Cnfol Information Technology Co Ltd
Priority to CN201710491010.3A priority Critical patent/CN107329748B/en
Publication of CN107329748A publication Critical patent/CN107329748A/en
Application granted granted Critical
Publication of CN107329748B publication Critical patent/CN107329748B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms

Landscapes

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

Abstract

The embodiments of the invention provide a kind of API development managements method and system and server and computer-readable recording medium.Wherein, the API development managements method can include:Obtain APP demand datas and HyperText Preprocessor THINKPHP frameworks and APP back-stage management frameworks;Based on APP demand datas, using HyperText Preprocessor THINKPHP frameworks, API framework is built;API framework is integrated with APP back-stage management frameworks, and calls by API framework APP back-stage management framework to carry out API development management.The embodiment of the present invention is by the way that THINKPHP frameworks are combined with the Dominant Facies of APP back-stage management frameworks, carry out API development management, solve the technical problem how saved the API development times and reduce API maintenance costs, it can first realize that API additions and deletions change and look into operation, gradual perfection pacifies the functions such as loading, unloading, configuration again, so as to carry out API exploitations and while optimize API management, but also the actual conditions that can be developed according to API are targetedly developed.

Description

API development managements method and system and server and computer-readable recording medium
Technical field
The present invention relates to Internet technical field, more particularly to a kind of API development managements method and system and service Device and computer-readable recording medium.
Background technology
With the development of internet, the application based on internet is (for example:Blog, social network sites etc.) increasingly popularize.This Wide participation platform and interaction space is brought for user.Thus, the theory using user as core promotes APP The development of (Application, application program).
With APP popularization, in order to strengthen the relevance of content between each website, increasing networking products trend Opening.Opening causes increasing website to call its resources open to developer.This Opening is with API (Application Programming Interface, application programming interface) is used as core carrier.For example:Insurance, gold Melt, traffic, smart home, Internet of Things etc. are required for API support.It can be seen that, APP API is just penetrating into each of people's life Aspect, it has also become the foundation stone of economic development.
However, API application still suffers from many problems, such as:Security, performance boost and stability, version pipe Reason, collaborative development, Certificate Authority etc..Solve above-mentioned many problems and be unable to do without effective API management.API management includes information Detection, data analysis, security protection etc..API effective management and API exploitation are closely coupled.API exploitation is related to API design is converted into the process of document specification and the document specification is converted into the process of code again.In the two mistakes Cheng Zhonghui is related to the continuous modification of development.Moreover, it is necessary to which API is written as into different languages after product or service are reached the standard grade The SDK (Software Development Kit, SDK) of speech.Exist in SDK and be much used for describing the interior of API Hold.As API develops being continually changing for demand, a large amount of description API work can be related to, asking for overlapping development thus occurs Topic.The problem of above-mentioned API managerial confusions, overlapping development, API development efficiency is have impact on, and also add maintenance cost.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of API development managements method, to solve how to save during API exploitations Between and reduce the technical problems of API maintenance costs.Concrete technical scheme is as follows:
To achieve these goals, according to an aspect of the invention, there is provided following technical scheme:
A kind of application APP DLL API development management methods, methods described includes:
Obtain APP demand datas;
Based on the APP demand datas, using HyperText Preprocessor THINKPHP frameworks, API framework is built;
The API framework is integrated with APP back-stage management frameworks, and called by the API framework after the APP Platform Governance framework carries out the development management of the API.
Further, based on the APP demand datas, using HyperText Preprocessor THINKPHP frameworks, to build API Framework, is specifically included:
Based on the APP demand datas, using the THINKPHP frameworks, base data table is built;
Based on HyperText Preprocessor THINKPHP frameworks, the management module of the base data table is built;
Based on the THINKPHP frameworks, add API page table lists and call authority for its setting;
Under the config directory and module config directory of the THINKPHP frameworks, by adding extension subdirectory, extension The configuration interface of the API;
The code automatically generated based on standard API is added into the THINKPHP frameworks;
Based on the base data table and its management module, API table list and its call authority, the configuration interface and base The code automatically generated in standard API, according to the specification of the HINKPHP frameworks, builds the API framework.
Further, the THINKPHP frameworks include application controller and behavior controller;Based on hypertext pretreatment Device THINKPHP frameworks, build the management module of the base data table, specifically include:
Based on the APP demand datas and using the behavior controller, build for being carried out to the base data table The processing unit of API service logics control;
Scheduling relation is set up between the application controller and the processing unit;
Based on the scheduling relation, the processing unit and the application controller are integrated, the management is formed Module.
Further, the THINKPHP frameworks include model and application controller and template engine;The model includes Automatic fills unit;Based on the THINKPHP frameworks, the step of adding API page table lists specifically includes:
The content of API page table lists is defined according to the APP demand datas;
The content is subjected to form filling using the automatic fills unit;
Result after filling is committed to by sheet disposal address by the application controller;
Using the template engine from the sheet disposal address, the result after filling is rendered, the API is formed Page table list.
Further, the THINKPHP frameworks include entry file;By the API framework and APP back-stage management frameworks Integrated, and call the APP back-stage management framework to carry out the development management of the API by the API framework, specifically wrapped Include:
In the entry file, the entrance of the APP back-stage management framework is configured, to realize the API framework and institute State the integration of APP back-stage management frameworks;
By APP back-stage management framework described in the entry call, the development management of the API is carried out.
To achieve these goals, according to another aspect of the present invention, following technical scheme is additionally provided:
A kind of application programming interface API development management systems, wherein, the API connects for the programming of application APP Mouthful;The system includes:
Acquiring unit, for obtaining APP demand datas;
Construction unit, for based on the APP demand datas, using HyperText Preprocessor THINKPHP frameworks, builds API framework;
Administrative unit, for the API framework to be integrated with APP back-stage management frameworks, and is adjusted by the API framework The development management of the API is carried out with the APP back-stage management framework.
Further, the construction unit is specifically included:
First builds subelement, for based on the APP demand datas, using the THINKPHP frameworks, builds basis Tables of data;
Second builds subelement, for based on HyperText Preprocessor THINKPHP frameworks, building the base data table Management module;
First adding device, for based on the THINKPHP frameworks, adding API page table lists and calling power for its setting Limit;
Expanding element, under the config directory and module config directory of the THINKPHP frameworks, being expanded by adding Subdirectory is opened up, the configuration interface of the API is extended;
Second adding device, for adding the code automatically generated based on standard API into the THINKPHP frameworks;
3rd builds subelement, for based on the base data table and its management module, API table list and its calling power Limit, configuration interface and the code automatically generated based on standard API, according to the specification of the HINKPHP frameworks, are built The API framework.
Further, the THINKPHP frameworks include application controller and behavior controller;Described second builds son list Member specifically for:
Based on the APP demand datas and using the behavior controller, build for being carried out to the base data table The processing unit of API service logics control;
Scheduling relation is set up between the application controller and the processing unit;
The processing unit and the application controller are integrated, the management module is formed.
Further, the THINKPHP frameworks include model and application controller and template engine;The model includes Automatic fills unit;First adding device is specifically included:
Definition unit, the content for defining API page table lists according to the APP demand datas;
Fills unit, for the content to be carried out into form filling using the automatic fills unit;
Unit is submitted, for the result after filling to be committed into sheet disposal address by the application controller;
Rendering unit, for triggering the template engine from the sheet disposal address, wash with watercolours is carried out to the result after filling Dye, forms the API page table lists.
Further, the THINKPHP frameworks include entry file;The administrative unit is specifically included:
Dispensing unit, in the entry file, the entrance of the APP back-stage management framework being configured, to realize State the integration of API framework and the APP back-stage management framework;
Subelement is managed, for by APP back-stage management framework described in the entry call, carrying out the exploitation of the API Management.
To achieve these goals, according to a further aspect of the invention, following technical scheme is additionally provided:
A kind of server, it includes processor, communication interface, memory and communication bus, wherein, the processor, institute State communication interface and the memory and mutual communication is completed by the communication bus;
The memory, for depositing computer program;
The processor, for performing during the program deposited on the memory, realizes above-mentioned API development managements method Method and step described in technical scheme.
To achieve these goals, according to a further aspect of the invention, following technical scheme is additionally provided:
A kind of computer-readable recording medium, the computer-readable recording medium internal memory contains computer program, described The method and step described in above-mentioned API development managements method and technology scheme is realized when computer program is executed by processor.
The embodiment of the present invention provides a kind of API development managements method and system and server and computer-readable storage medium Matter.Wherein, the API development managements method can include:Obtain APP demand datas and HyperText Preprocessor THINKPHP frameworks And APP back-stage management frameworks;Based on APP demand datas, using HyperText Preprocessor THINKPHP frameworks, to build API Framework;API framework is integrated with APP back-stage management frameworks, and calls APP back-stage management framework to carry out by API framework API development management.Due to THINKPHP frameworks have the development structure pattern of object-oriented, MVC pattern (model, view and Director mode), single inlet mode and abundant function, simple access URL while also having (unified resource positioned Symbol) operating method the characteristics of, so, the embodiment of the present invention be easy to build API framework, so as to save the API development times;Again Because APP back-stage management framework can independently carry out backstage exploitation, it can also be developed using primary html language, and And the templates such as registration, login, statistical graph, list, the page, form are also integrated with, so, compared with prior art, this Inventive embodiments call APP back-stage management framework progress API development management by THINKPHP frameworks, so as to save The API development times simultaneously reduce API maintenance costs, can first realize that API additions and deletions change and look into operation, then gradual perfection peace loading, unloading Carry, the function such as configuration, while optimize API management, but also can be opened so as to carry out API exploitations according to API The actual conditions of hair are targetedly developed.
Certainly, implementing any product or method of the present invention must be not necessarily required to while reaching all the above excellent Point.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of the API development management methods according to the embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the structure API framework according to the embodiment of the present invention;
Fig. 3 is the schematic flow sheet of the management module of the structure base data table according to the embodiment of the present invention;
Fig. 4 is the schematic flow sheet of the addition API page table lists according to the embodiment of the present invention;
Fig. 5 is the structural representation of the application programming interface API development management systems according to the embodiment of the present invention;
Fig. 6 is the structural representation of the construction unit according to the embodiment of the present invention;
Fig. 7 is the structural representation of the first adding device according to the embodiment of the present invention;
Fig. 8 is the structural representation of the server according to the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
Term explanation
API (Application Programming Interface, application programming interface) is that some are pre-defined Function, be able to access routine for being based on software and/or hardware for APP (application program) and developer.Can be with by API Realize the communication between program, data sharing between program etc..
When framework refers to exploitation APP, the framework relevant with response processing with request processing.
Framework refers to the organizational form for the various resources that the various technologies being related in APP exploitations are possessed, for example:Text Part, database, HTTP (HTTP) requests etc..
Said frame can be achieved by computing device.The computing device can include:It is various to be used to transmit information Physical unit and/or logical block, the requirement that they can be restricted according to one group of given design parameter or performance, by hardware Part is (for example:Processor, programmable logic controller (PLC)), the instruction of the executable computer program that can be performed by various hardware componenies (for example:Firmware, software) or their any combination be achieved.Above-mentioned computing device can include but is not limited to personal meter Calculation machine is (for example:Desktop computer, laptop computer, notebook computer), smart mobile phone, personal digital assistant (PDA), Media player or any other suitable communicator.
Said frame can be run and be achieved by Web-browser.Wherein, Web-browser can be by such as IE, Firefox (red fox), Opera (Ou Peng) or arbitrarily suitable, desktop computer version or mobile version Web-browser It is achieved.The Web-browser can with the computer programming language required by supporting frame, standard, world wide web protocols and/ Or technology.These computer programming languages, standard, world wide web protocols and/or technology include but is not limited to HTML (hypertext markups Language), XML (extensible markup language), AjaX (Ajax), Flash (animation), CSS (CSS) or other Appropriate programming language, script or the language based on VM (virtual machine).Web-browser can provide user interface Basis, and can include:For such as JS (a kind of WWW programmed scripts language), VB (visualization initiator's general symbol(s)s Instruction code language) and/or other scripting programming languages language interpreter.Wherein, interpretive program real-time interpretation is based on clear Look at script, byte code collection or the language of device.
Application environment
The embodiment of the present invention can apply to based on B/S (browser/server), C/S (client/server) structure In environment, and management is developed based on http protocol.
API development and implementation environment
An APP catalogue is created under www (WWW) catalogue, an entry file is then created under the APP catalogues (for example:index.php).The content of the entry file can include:ThinkPHP frameworks path, APP project names and path, Loading frame entry file is (for example:Require (THINK_PATH. "/ThinkPHP.php ")) and APP instantiations, for example, Instantiation is realized in the following way:App::run().
By aforesaid operations, using the above-mentioned entry file of browser access, ThinkPHP frameworks can be automatically in APP catalogues Lower generation project directory.API exploitations can be carried out under the project directory.
In API practical application exploitation, the problem of often duplicating exploitation, and when API is a lot, there is also The problem of managerial confusion, thus, these problems add API development time and maintenance cost.
In consideration of it, in order to solve the technical problem how saved the API development times and reduce API maintenance costs, the present invention Embodiment provides a kind of API development managements method.As shown in figure 1, this method can be by step S100 to step S120 come real It is existing.Wherein:
S100:Obtain APP demand datas.
Wherein, APP demand datas can arbitrarily pass through the relevant data of HTTP request with user.
S110:Based on APP demand datas, using HyperText Preprocessor THINKPHP frameworks, API framework is built.
Wherein, HyperText Preprocessor THINKPHP frameworks be based on MVC (model-view-controller, model- View-Controller) and object-oriented PHP (hypertext pretreatment language) Development Framework.THINKPHP frameworks can include Whole application bibliographic structure and entry file, and conducted interviews based on module and the mode operated, and use single entry file To perform application.Wherein, controller and its operation are all accessed and performed by URL (URL) parameter.Enter The access of mouth file is by URL parameter is come analytic uniform and scheduling.The APP demand data related to user's HTTP request is by entering Mouth file generated application example.The entry file can be accessed by browser.
Here, constituted using by multiple modules.Each module can have independently of one another configuration file, public documents and Class library files.
Specifically, in some optional embodiments, as shown in Fig. 2 this step can include:
S111:Based on APP demand datas, using THINKPHP frameworks, base data table is built.
Wherein, base data table can include:Addition, modification and the deletion of base data table information, and using ejection Formula forms display base data table information, selection input is carried out for user.THINKPHP frameworks be built-in with database access layer and Connector.In API development process, base data table and database can be connected by database access layer and connector Get up.There are mapping relations with model (Model) in base data table.User's request is responded by controller calling model.
S112:Based on HyperText Preprocessor THINKPHP frameworks, the management module of base data table is built.
Wherein, management module can be used for providing the user a variety of views.User can be allowed right in Pop-up forms Base data table such as is added, changed at the operation.For other data can be built by Pop-up forms.
In some optional embodiments, THINKPHP frameworks can include application controller and behavior controller;Such as Fig. 3 Shown, step S112 can specifically include:
S1121:Based on APP demand datas and behavior controller is utilized, built for carrying out API business to base data table The processing unit of logic control.
S1122:Scheduling relation is set up between application controller and processing unit.
S1123:Based on the scheduling relation, processing unit and application controller are integrated, management module is formed.
By this step, after route analysis is carried out to user's request, it is possible to be forwarded to user's request corresponding Application controller, then, application controller are dispatched corresponding processing unit and handled.
S113:Based on THINKPHP frameworks, add API page table lists and call authority for its setting.
It can be added data to by API page table lists in tables of data.Wherein, the tables of data can be by basis Tables of data tables of data new obtained from modifying.
In the specific implementation, authority writing controller will can be called, so as to create drm controller and by the authority control Device processed inherits controller foundation class, is realized with this and calls limitation to API page table lists.
In some optional embodiments, THINKPHP frameworks can include model and application controller and template engine; The model can include automatic fills unit;As shown in figure 4, based on the THINKPHP frameworks, adding the step of API page table lists Suddenly it can specifically include:
S1131:The content of API page table lists is defined according to APP demand datas.
S1132:The content is subjected to form filling using automatic fills unit.
As an example, this step can be added data by list using the automatic fill area attribute of model class (Model) Into tables of data.Wherein, automatic fill area attribute defines filling field, fill conditions and fill rule.
S1133:Result after filling is committed to by sheet disposal address by application controller.
S1134:Using template engine from sheet disposal address, the result after filling is rendered, API page tables are formed It is single.
Wherein, API page table lists can include but is not limited to text rectangle style, textview field, textview field pattern, text box chi Very little, combobox, file transmitting assembly, form layout.
S114:Under the config directory and module config directory of THINKPHP frameworks, by adding extension subdirectory, extension API configuration interface.
Wherein, the catalogue of ThinkPHP frameworks includes:System directory, using catalogue and deployment catalogue.Wherein, system directory Common inlet file, Common catalogues, system language file, system base class library directory, system mould including ThinkPHP frameworks Plate catalogue, framework mode extension catalogue and third party's class library directory.Include item entry file, project public documents using catalogue Catalogue when catalogue, project configuration catalogue, project language pack catalogue, item class library directory, project templet catalogue and project operation.Portion Affixing one's name to catalogue includes ThinkPHP system directories, Home project directories and Admin back-stage management project directories.
Specifically, the configuration interface that can will be realized the module of difference in functionality be extended, so that by expanding API configuration interface is opened up, the module of difference in functionality can be called.So, configure interface by extending API, it is possible to achieve online Unified configuration management.
S115:The code automatically generated based on standard API is added into THINKPHP frameworks.
Wherein, standard API includes pre-defined function.Standard API can be that API developer is customized.
In specific implementation process, this step can utilize and automate Code Generator (for example:Snips code buildings Instrument, swagger-codegen Code Generators, go-swagger Code Generators) it is fixed in advance in standard API to call The function of justice, automatically generates self-defined API html document and supports the code of the API, so as to reduce API developer Repeat.
S116:Based on base data table and its management module, API table list and its authority, configuration is called interface and to be based on The code that standard API is automatically generated, according to the specification of HINKPHP frameworks, builds API framework.
MVC pattern of this step based on HINKPHP frameworks is by base data table and its management module, API table list and its tune The code organization automatically generated with authority, configuration interface and based on standard API, and called by controller.Due to adopting With the specification of unified HINKPHP frameworks, it is achieved thereby that API standard access.So, exploitation API is put into code through beating Wrap after biography, it is possible to achieve one button installation, unloading.
S120:API framework is integrated with APP back-stage management frameworks, and calls by API framework APP back-stage management Framework carries out API development management.
Wherein, APP back-stage management framework can connect database with API framework, and can be weighed by setting Limit to be managed operation.For example:, using mysql_connect () function, it can pass through in HINKPHP frameworks PhpMyAdmin back-stage management framework connects HINKPHP frameworks and MySQL database, and can be in account authority Various management operations are carried out in allowing.The direct interaction of user and database can be realized by APP back-stage management framework.
By the way that API framework is integrated with APP back-stage management frameworks, API developer no longer oneself can write MVC The document of pattern, so as to save the development time.
In some optional embodiments, THINKPHP frameworks can include entry file;Then step S120 specifically can be with Including:
S121:In entry file, configure APP back-stage management frameworks entrance, with realize the API framework with it is described The integration of APP back-stage management frameworks.
For example, can in THINKPHP frameworks inlet porting file, as the entrance of APP back-stage management frameworks, for THINKPHP frameworks call APP back-stage management frameworks.The entry file can be arranged on the common inlet text of ThinkPHP frameworks In part, it can also be set independently of the common inlet file of the ThinkPHP frameworks.
S122:By entry call APP back-stage management frameworks, API development management is carried out.
Wherein, APP back-stage management framework can be with integrated multiple conventional plug-in units, for customization backstage template.The backstage Template can include the backstage template pages such as registration, login, statistical graph, list, form.
With a preferred embodiment, the present invention is described in detail below.
The application programming interface API development managements method that this preferred embodiment is provided can include:
S201:Create database and tables of data.
S202:Name APP projects and the entry file for creating the APP projects.
S203:The APP projects are configured.
S204:Create controller class.
Wherein, this step can create the controller that behaviour and data query operation are write comprising data, and this step can lead to In the following manner is crossed to create controller;Wherein, data write-in behaviour includes:Instantiate model class;Create data object;By the data Object write into Databasce;It is redirected to operation pages;Data query operation includes:Instantiate model class;Inquire about data;To template Variable assignments;Template is exported.
S205:Create model class.
Wherein, model class defines various data manipulations, so that controller is called.
S206:Drawing template establishment file.
Wherein, template file is used to transmit user's request data to controller.
S207:Obtain APP demand datas.
S208:Based on APP demand datas, using THINKPHP frameworks, base data table is built.
S209:Based on APP demand datas and behavior controller is utilized, built for carrying out API business to base data table The processing unit of logic control.
S210:Scheduling relation is set up between application controller and processing unit.
S211:Processing unit and application controller are integrated, management module is formed.
S212:The content of API page table lists is defined according to APP demand datas.
S213:Content is subjected to form filling using automatic fills unit.
S214:Result after filling is committed to by sheet disposal address by application controller.
S215:Using template engine from sheet disposal address, the result after filling is rendered, API page tables are formed It is single.
S216:It is that authority is called in the setting of API page table lists based on THINKPHP frameworks.
S217:Under the config directory and module config directory of THINKPHP frameworks, by adding extension subdirectory, extension API configuration interface.
S218:The code automatically generated based on standard API is added into THINKPHP frameworks.
S219:Based on base data table and its management module, API table list and its authority, configuration is called interface and to be based on The code that standard API is automatically generated, according to the specification of HINKPHP frameworks, builds API framework.
S220:In entry file, the entrance of APP back-stage management frameworks is configured, to realize that API framework is managed with APP backstages Manage the integration of framework.
S221:By entry call APP back-stage management frameworks, API development management is carried out.
Explanation about this preferred embodiment may be referred to the related description of previous embodiment, will not be repeated here.
In above-mentioned each technical scheme, because THINKPHP frameworks have development structure pattern, the MVC pattern of object-oriented (model, view and director mode), single inlet mode and abundant function, while also having the simple URL that accesses (to unite One URLs) operating method the characteristics of, so, the embodiment of the present invention be easy to build API framework, so as to save API Development time;Again because APP back-stage management framework can independently carry out backstage exploitation, primary html language can also be used Develop, but also be integrated with the templates such as registration, login, statistical graph, list, the page, form, so, the present invention Embodiment calls APP back-stage management framework to carry out API development management by THINKPHP frameworks, so as to save API exploitations Time simultaneously reduces API maintenance costs, can first realize that API additions and deletions change and look into operation, then the loading, unloading of gradual perfection peace, configuration Etc. function, so as to carry out API exploitations and while optimize API management, but also the reality that can be developed according to API Situation is targetedly developed.
It should be noted that steps flow chart shown in above method embodiment is merely illustrative, unless otherwise indicated, on State steps flow chart and not necessarily performed with above-mentioned shown order, can also be according to actual conditions, with different from order illustrated herein Perform, for example, the step of the step of building base data table is with extension API configuration interfaces can be performed parallel.For another example, set The step of API page table list authorities, can hold after the step of setting up the scheduling relation between application controller and processing unit OK, the execution sequence of other steps by that analogy, will not be repeated here.In addition, according to specific implementation environment, in the above method On the basis of embodiment, additional step can also be added, some steps can also be removed.
In order to solve the technical problem how saved the API development times and reduce API maintenance costs, it is based on and the above method Embodiment identical technical concept, the embodiment of the present invention also provides a kind of application programming interface API development management systems, its In, API is the DLL of application APP.The system can perform above method embodiment.As shown in figure 5, the system can With including:Acquiring unit 51, construction unit 52 and administrative unit 53.Wherein, acquiring unit 51 is used to obtain APP demand datas. Construction unit 52 is used to be based on APP demand datas, using HyperText Preprocessor THINKPHP frameworks, builds API framework.Management Unit 53 is used to be integrated API framework with APP back-stage management frameworks, and calls by API framework APP back-stage management frameworks Carry out API development management.
In some optional embodiments, construction unit can specifically include:First, which builds subelement 61, second, builds son Unit 62, the first adding device 63, expanding element 64, the second adding device 65 and the 3rd build subelement 66.Wherein, the first structure Build subelement 61 be used for be based on APP demand datas, utilize THINKPHP frameworks, structure base data table.Second builds subelement 62 are used to be based on HyperText Preprocessor THINKPHP frameworks, build the management module of base data table.First adding device 63 For based on THINKPHP frameworks, adding API page table lists and calling authority for its setting.Expanding element 64 is used for Under the config directory and module config directory of THINKPHP frameworks, by adding extension subdirectory, API configuration interface is extended. Second adding device 65 is used to add the code automatically generated based on standard API into THINKPHP frameworks.3rd builds son list Member 66 is used to be based on base data table and its management module, API table list and its calls authority, configures interface and based on standard The code that API is automatically generated, according to the specification of HINKPHP frameworks, builds API framework.
In some optional embodiments, on the basis of above-described embodiment, THINKPHP frameworks include application controller And behavior controller;Second structure subelement specifically can be used for:Based on APP demand datas and behavior controller is utilized, built Processing unit for carrying out API service logic controls to base data table;And built between application controller and processing unit Vertical scheduling relation;Then, processing unit and application controller are integrated, forms management module.
In some optional embodiments, THINKPHP frameworks include model and application controller and template engine;Model Including automatic fills unit;As shown in fig. 7, the first adding device can specifically include:Definition unit 71, fills unit 72, carry Presentate member 73 and rendering unit 74.Wherein, definition unit 71 is used for the content that API page table lists are defined according to APP demand datas. Fills unit 72 is used to content is carried out into form filling using automatic fills unit.Unit 73 is submitted to be used to pass through application controller Result after filling is committed to sheet disposal address.Rendering unit 74 is used to trigger template engine from sheet disposal address, right Result after filling is rendered, and forms API page table lists.
In some optional embodiments, on the basis of embodiment illustrated in fig. 5, THINKPHP frameworks include entrance text Part;Administrative unit can specifically include dispensing unit and management subelement.Wherein, dispensing unit is used in entry file, matches somebody with somebody The entrance of APP back-stage management frameworks is put, to realize the integration of API framework and APP back-stage management frameworks.Management subelement is used to lead to Entry call APP back-stage management frameworks are crossed, API development management is carried out.
The division for needing exist for unit in explanation, said system embodiment is exemplary only, specific real During existing, there can also be other dividing mode, for example, acquiring unit and construction unit can be integrated in into a unit Interior, other units by that analogy, will not be repeated here.
Said system embodiment is by taking each above-mentioned technical scheme, using THINKPHP frameworks, and integrates APP backstages Governance framework, realizes in the way of configuration to carry out the purpose of API exploitations, solves and how to save the API development times and subtract The technical problem of few API maintenance costs, can first realize that API additions and deletions change and look into operation, then the loading, unloading of gradual perfection peace, configuration Etc. function, so as to carry out API exploitations and while optimizing API management.Further, it is also possible to the reality developed according to API Border situation is targetedly developed.
Based on above method embodiment identical technical concept, the embodiment of the present invention also provides a kind of server.Such as Fig. 8 institutes Show, the server can include processor 81, communication interface 82, memory 83 and communication bus 84, wherein, it is processor 81, logical Letter interface 82 and memory 83 complete mutual communication by communication bus 84.Memory 83 is used to deposit computer program. When processor 81 is used to perform the program deposited on memory 83, the method and step of above method embodiment is realized.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or EISA (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, controlling bus etc..For just Only represented in expression, figure with a thick line, it is not intended that only one bus or a type of bus.
The communication that above-mentioned communication interface is used between above-mentioned electronic equipment and other equipment.
Above-mentioned memory can include random access memory (Random Access Memory, RAM), can also include Nonvolatile memory (Non-Volatile Memory, NVM), for example, at least one magnetic disk storage.Optionally, memory It can also be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is application specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other PLDs, discrete Door or transistor logic, discrete hardware components.
Based on above method embodiment identical technical concept, the embodiment of the present invention also provides a kind of computer-readable storage Medium.The computer-readable recording medium internal memory contains computer program, is realized when computer program is executed by processor above-mentioned The method and step of embodiment of the method.
Above computer readable storage medium storing program for executing includes but is not limited to random access memory (RAM), dynamic randon access and deposited Reservoir (DRAM), static RAM (SRAM), read-only storage (ROM), programmable read only memory (PROM), can Erasable programmable read only memory (EPROM), EEPROM (EEPROM), flash memory are (for example, NOR-type Flash memory or NAND-type flash memory), Content Addressable Memory (CAM), polymer memory (for example, ferroelectric polymer memory), Phase transition storage, ovonic memory, silicon-oxide-nitride silicon-silica-silicon (Silicon-Oxide- Nitride-Oxide-Silicon, SONOS) memory, magnetic card or light-card, also or other any suitable types calculating Machine readable storage medium storing program for executing.
Herein, term " in some optional embodiments " refers to that the technical characteristic described in the embodiment can be wrapped Include at least one embodiment.Therefore, the meaning of " in some optional embodiments " herein not necessarily refers both to same Individual embodiment.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposited between operating In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Also there is other identical element in process, method, article or equipment including key element.
Each embodiment in this specification is described by the way of related, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.It is real especially for system Apply for example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
Presently preferred embodiments of the present invention is these are only, is not intended to limit the scope of the present invention.It is all in this hair Any modification, equivalent substitution and improvements made within bright spirit and principle etc., are all contained in protection scope of the present invention.

Claims (12)

1. a kind of application APP DLL API development management methods, it is characterised in that methods described includes:
Obtain APP demand datas;
Based on the APP demand datas, using HyperText Preprocessor THINKPHP frameworks, API framework is built;
The API framework is integrated with APP back-stage management frameworks, and calls the APP backstages to manage by the API framework Manage the development management that framework carries out the API.
2. it is according to the method described in claim 1, it is characterised in that described based on the APP demand datas, pre- using hypertext Processor THINKPHP frameworks, build API framework, specifically include:
Based on the APP demand datas, using the THINKPHP frameworks, base data table is built;
Based on HyperText Preprocessor THINKPHP frameworks, the management module of the base data table is built;
Based on the THINKPHP frameworks, add API page table lists and call authority for its setting;
Under the config directory and module config directory of the THINKPHP frameworks, by adding extension subdirectory, extension is described API configuration interface;
The code automatically generated based on standard API is added into the THINKPHP frameworks;
Based on the base data table and its management module, API table list and its call authority, configuration interface and it is described based on mark The code that quasi- API is automatically generated, according to the specification of the HINKPHP frameworks, builds the API framework.
3. method according to claim 2, it is characterised in that the THINKPHP frameworks include application controller and behavior Controller;
It is described to be based on HyperText Preprocessor THINKPHP frameworks, the management module of the base data table is built, is specifically included:
Based on the APP demand datas and using the behavior controller, build for carrying out API industry to the base data table The processing unit of business logic control;
Scheduling relation is set up between the application controller and the processing unit;
Based on the scheduling relation, the processing unit and the application controller are integrated, the management module is formed.
4. method according to claim 2, it is characterised in that the THINKPHP frameworks include model and application controller And template engine;The model includes automatic fills unit;
It is described to be based on the THINKPHP frameworks, API page table lists are added, are specifically included:
The content of API page table lists is defined according to the APP demand datas;
The content is subjected to form filling using the automatic fills unit;
Result after filling is committed to by sheet disposal address by the application controller;
Using the template engine from the sheet disposal address, the result after filling is rendered, the API pages are formed List.
5. according to the method described in claim 1, it is characterised in that the THINKPHP frameworks include entry file;
It is described to be integrated the API framework with APP back-stage management frameworks, and called by the API framework after the APP Platform Governance framework carries out the development management of the API, specifically includes:
In the entry file, the entrance of the APP back-stage management framework is configured, to realize the API framework and the APP The integration of back-stage management framework;
By APP back-stage management framework described in the entry call, the development management of the API is carried out.
6. a kind of application programming interface API development management systems, wherein, the API connects for the programming of application APP Mouthful;Characterized in that, the system includes:
Acquiring unit, for obtaining APP demand datas;
Construction unit, for based on the APP demand datas, using HyperText Preprocessor THINKPHP frameworks, builds API frames Frame;
Administrative unit, for the API framework to be integrated with APP back-stage management frameworks, and calls institute by the API framework State the development management that APP back-stage management framework carries out the API.
7. system according to claim 6, it is characterised in that the construction unit is specifically included:
First builds subelement, for based on the APP demand datas, using the THINKPHP frameworks, builds basic data Table;
Second builds subelement, for based on HyperText Preprocessor THINKPHP frameworks, building the pipe of the base data table Manage module;
First adding device, for based on the THINKPHP frameworks, adding API page table lists and calling authority for its setting;
Expanding element, under the config directory and module config directory of the THINKPHP frameworks, by adding extension Catalogue, to extend the configuration interface of the API;
Second adding device, for adding the code automatically generated based on standard API into the THINKPHP frameworks;
3rd builds subelement, for based on the base data table and its management module, API table list and its calling authority, matching somebody with somebody Interface and the code automatically generated based on standard API are put, according to the specification of the HINKPHP frameworks, to build State API framework.
8. system according to claim 7, it is characterised in that the THINKPHP frameworks include application controller and behavior Controller;
It is described second build subelement specifically for:
Based on the APP demand datas and using the behavior controller, build for carrying out API industry to the base data table The processing unit of business logic control;
Scheduling relation is set up between the application controller and the processing unit;
The processing unit and the application controller are integrated, the management module is formed.
9. system according to claim 7, it is characterised in that the THINKPHP frameworks include model and application controller And template engine;The model includes automatic fills unit;
First adding device is specifically included:
Definition unit, the content for defining API page table lists according to the APP demand datas;
Fills unit, for the content to be carried out into form filling using the automatic fills unit;
Unit is submitted, for the result after filling to be committed into sheet disposal address by the application controller;
Rendering unit, for triggering the template engine from the sheet disposal address, is rendered, shape to the result after filling Into the API page table lists.
10. system according to claim 6, it is characterised in that the THINKPHP frameworks include entry file;
The administrative unit is specifically included:
Dispensing unit, in the entry file, the entrance of the APP back-stage management framework being configured, to realize the API The integration of framework and the APP back-stage management framework;
Subelement is managed, for by APP back-stage management framework described in the entry call, carrying out the development management of the API.
11. a kind of server, it is characterised in that including processor, communication interface, memory and communication bus, wherein, the place Manage device, the communication interface and the memory and mutual communication is completed by the communication bus;
The memory, for depositing computer program;
The processor, for performing during the program deposited on the memory, is realized any described in claim 1-5 Method and step.
12. a kind of computer-readable recording medium, it is characterised in that the computer-readable recording medium internal memory contains computer Program, the computer program realizes any described method and step in claim 1-5 when being executed by processor.
CN201710491010.3A 2017-06-23 2017-06-23 API development management method and system, server and computer-readable storage medium Active CN107329748B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710491010.3A CN107329748B (en) 2017-06-23 2017-06-23 API development management method and system, server and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710491010.3A CN107329748B (en) 2017-06-23 2017-06-23 API development management method and system, server and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN107329748A true CN107329748A (en) 2017-11-07
CN107329748B CN107329748B (en) 2021-01-22

Family

ID=60194586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710491010.3A Active CN107329748B (en) 2017-06-23 2017-06-23 API development management method and system, server and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN107329748B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255730A (en) * 2018-01-23 2018-07-06 平安普惠企业管理有限公司 Software interface test approach, test equipment, storage medium and device
CN110442331A (en) * 2019-08-11 2019-11-12 西藏宁算科技集团有限公司 It is a kind of to automate the method and system for building code skeleton
CN111125642A (en) * 2018-10-31 2020-05-08 北京数聚鑫云信息技术有限公司 Method and device for managing API, storage medium and computer equipment
CN111324342A (en) * 2020-02-10 2020-06-23 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating interface layer code
CN111399825A (en) * 2020-03-17 2020-07-10 四川研宝科技有限公司 API (application programming interface) development management method and system based on API document
CN112016256A (en) * 2020-08-25 2020-12-01 北京百瑞互联技术有限公司 Integrated circuit development platform, method, storage medium and equipment
CN113312003A (en) * 2021-06-15 2021-08-27 浪潮云信息技术股份公司 Go language-based physical bare computer disk storage management method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501341A (en) * 2013-09-30 2014-01-08 乐视致新电子科技(天津)有限公司 Method and device for establishing Web service
CN103955361A (en) * 2014-03-28 2014-07-30 世纪禾光科技发展(北京)有限公司 Modular development and publishing system for automatic compiling and establishing of web front-end codes
CN104636139A (en) * 2015-01-26 2015-05-20 北京邮电大学 Visualized cross-platform mobile application development and generation system
CN104866327A (en) * 2015-06-19 2015-08-26 上海斐讯数据通信技术有限公司 PHP development method and frame
CN105677302A (en) * 2014-11-17 2016-06-15 阿里巴巴集团控股有限公司 Application program modularization developing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501341A (en) * 2013-09-30 2014-01-08 乐视致新电子科技(天津)有限公司 Method and device for establishing Web service
CN103955361A (en) * 2014-03-28 2014-07-30 世纪禾光科技发展(北京)有限公司 Modular development and publishing system for automatic compiling and establishing of web front-end codes
CN105677302A (en) * 2014-11-17 2016-06-15 阿里巴巴集团控股有限公司 Application program modularization developing method and device
CN104636139A (en) * 2015-01-26 2015-05-20 北京邮电大学 Visualized cross-platform mobile application development and generation system
CN104866327A (en) * 2015-06-19 2015-08-26 上海斐讯数据通信技术有限公司 PHP development method and frame

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王秀萍,季金奎: "基于ThinkPHP框架的代码生成器设计与实现", 《福建电脑》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255730A (en) * 2018-01-23 2018-07-06 平安普惠企业管理有限公司 Software interface test approach, test equipment, storage medium and device
CN108255730B (en) * 2018-01-23 2021-04-02 平安普惠企业管理有限公司 Software interface testing method, testing equipment, storage medium and device
CN111125642A (en) * 2018-10-31 2020-05-08 北京数聚鑫云信息技术有限公司 Method and device for managing API, storage medium and computer equipment
CN111125642B (en) * 2018-10-31 2022-06-03 北京数聚鑫云信息技术有限公司 Method and device for managing API, storage medium and computer equipment
CN110442331A (en) * 2019-08-11 2019-11-12 西藏宁算科技集团有限公司 It is a kind of to automate the method and system for building code skeleton
CN110442331B (en) * 2019-08-11 2023-12-26 西藏宁算科技集团有限公司 Method and system for automatically building code frame
CN111324342A (en) * 2020-02-10 2020-06-23 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating interface layer code
CN111324342B (en) * 2020-02-10 2023-04-07 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for generating interface layer code
CN111399825A (en) * 2020-03-17 2020-07-10 四川研宝科技有限公司 API (application programming interface) development management method and system based on API document
CN112016256A (en) * 2020-08-25 2020-12-01 北京百瑞互联技术有限公司 Integrated circuit development platform, method, storage medium and equipment
CN112016256B (en) * 2020-08-25 2024-05-03 北京百瑞互联技术股份有限公司 Integrated circuit development platform, method, storage medium and equipment
CN113312003A (en) * 2021-06-15 2021-08-27 浪潮云信息技术股份公司 Go language-based physical bare computer disk storage management method

Also Published As

Publication number Publication date
CN107329748B (en) 2021-01-22

Similar Documents

Publication Publication Date Title
CN107329748A (en) API development managements method and system and server and computer-readable recording medium
US10929116B2 (en) Generation of dynamic software models using input mapping with feature definitions
US11537272B2 (en) Content management system extensions
US10216554B2 (en) API notebook tool
CN105765527B (en) The method and apparatus of software development kit (SDK) for customization
CN105849691B (en) The method and apparatus generated for code virtualization and remote process call
CN101373431B (en) Enhanced widget composition platform
US20120246515A1 (en) Scalable testing tool for graphical user interfaces object oriented system and method
CN101909082B (en) Model-driven grid portal configuration system and method
WO2016011409A1 (en) Expressive generic model technology
CN105204863B (en) Unlawful data auditing system
CN110162464A (en) Mcok test method and system, electronic equipment and readable storage medium storing program for executing
CN110309099A (en) Interface managerial method, device, equipment and computer readable storage medium
CN109086342A (en) The method of mass production and O&M website form, medium and terminal
CN101902492A (en) Web Service server, website constructing method and information exchange method
TW201725542A (en) Form management system and method
US11775261B2 (en) Dynamic process model palette
CN115543428A (en) Simulated data generation method and device based on strategy template
Zheng et al. Preparation
US10506025B2 (en) Modifying document metadata with integrated cloud services
Warén Cross-platform mobile software development with React Native
Trivedi User interface implementation of environmental data integration system with React
Jakupov Development of a web-based application for automated energy management system
Arora DIY Accounting Portal for Talenom Customers
Do Expense Tracking Application

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