CN110471649A - A kind of development platform and method for writing WEB service end program - Google Patents

A kind of development platform and method for writing WEB service end program Download PDF

Info

Publication number
CN110471649A
CN110471649A CN201910626750.2A CN201910626750A CN110471649A CN 110471649 A CN110471649 A CN 110471649A CN 201910626750 A CN201910626750 A CN 201910626750A CN 110471649 A CN110471649 A CN 110471649A
Authority
CN
China
Prior art keywords
instruction
web service
service end
program
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910626750.2A
Other languages
Chinese (zh)
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.)
Guangzhou Guide Information Technology Co Ltd
Original Assignee
Guangzhou Guide 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 Guangzhou Guide Information Technology Co Ltd filed Critical Guangzhou Guide Information Technology Co Ltd
Priority to CN201910626750.2A priority Critical patent/CN110471649A/en
Publication of CN110471649A publication Critical patent/CN110471649A/en
Pending legal-status Critical Current

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a kind of development platform and method for writing WEB service end program, including computer client, WEB service end and program instruction set, computer client browser accesses WEB service end platform by http request and explains the program instruction set for executing user and writing by it, realizes the purpose of operating database data;Solves the technical threshold that software developer needs to be proficient in the development languages such as C# or JAVA, the development approach of WEB service end program can be write by providing a kind of sql like language that need to only grasp database and few instruction set, technical threshold is greatly reduced, exploitation cost of labor is saved.

Description

A kind of development platform and method for writing WEB service end program
Technical field
The present invention relates to service terminal software platform technology fields, more specifically refer to that one kind writes WEB service end program Development platform and method.
Background technique
Program is developed at WEB service end, is mainly opened at present using technological development such as ASP.NET, JSP/Servlet/J2EE Originator needs to be proficient in Java or C# development language, database SQL, and relevant frame api interface specification installs the technical ability such as configuration, It needs to handle well the affairs of database in development process, needs to handle transaction rollback etc. when program error, to guarantee business number According to consistency, need after the completion of programming to be compiled, deployment configuration, the complicated operation such as debugging, when business demand changes When, it need to be again to source code compiling, packing, deployment etc., operating process is cumbersome.
The prior art has the following in the main problem of WEB service end exploitation program:
1, need to be proficient in development language (Java or C# etc.), frame API, database SQL sentence, business model (table structure), It is required that Develop ability is high;
2, the program code and SQL statement write mix, and source code readability is very poor, are not easy to modify and safeguard;
3, when program debugging, the mistake and SQL statement mistake of program code are simultaneously deposited, and debugging difficulty is larger, also needs after amendment It recompilates, debugged again after packing;
4, each developer is relatively difficult to guarantee writing the programs such as Java or C#, code quality, will cause system stability Difference;
5, each developer manages respective db transaction processing, because procedural problem newly developed is relatively difficult to guarantee affairs Atomicity (need to could save the integrality of data after completely testing).
Existing for current WEB service end exploitation program needs Develop ability high, and readable program code difference and maintenance are tired Difficulty, system stability and data be completely difficult to guarantee the problems such as, the present invention, which provides, a kind of need to only grasp database SQL language and pole Few instruction set can write the software development methodology of WEB service end program.
Summary of the invention
Technical problem to be solved by the invention is to provide a kind of development platform and method for writing WEB service end program, The technical threshold that software developer needs to be proficient in the development languages such as C# or JAVA is solved, database need to be grasped by providing a kind of Sql like language and few instruction set can write the innovative software development approach of backstage WEB instruction repertorie file.
In order to solve the above technical problem, the present invention provides a kind of development platform and method for writing WEB service end program, Including the end computer PC, WEB service end and instruction repertorie file, the WEB service end, institute are called by http in the end the computer PC Instruction repertorie file is loaded when stating the starting of WEB service end;
The development platform and method for writing WEB service end program, the starting step at WEB service end are as follows:
S01. the WEB service end starting;
S02. the WEB service end loads instruction repertorie file, indexes precompile by function name;
S03. database connection pool is created;
S04. client request is waited;
S05. the corresponding described instruction collection of function name of the client request is executed;
S06. after executing described instruction, client is returned;
S07. S04 step is returned to, then waits client request process flow, is re-executed;
S08. termination signal is received, the WEB service end is exited.
Further scheme is that the client request calls the instruction set for executing specified function, and method operating procedure is as follows:
1) client http post request includes function name, parameter name and value;
2) it after WEB service end receives user's request, opens database and connects and open affairs;
3) instruction set preloaded is read by function name;
4) instruction is obtained from instruction set;
5) if it is completion instruction is terminated, then db transaction is submitted, terminates and returns the result to client;
6) it executes instruction;
7) if instruction execution returns to mistake, db transaction rollback terminates and error result is back to client;
8) after instruction execution success, continue to read next instruction, turn 5 steps.
Further scheme is that function is defined in described instruction program file, and each function is made of multiple instruction, The function is supplied to client remote and calls (RPC), to realize complicated business logic processing
Further scheme is that main program instruction is as follows in the instruction repertorie file:
1) LockCheck is to lock designated recorder, and judge, passes through if eligible, otherwise returns to mistake Information;
2) QueryCheck is the data record that detection is returned by SQL statement inquiry, then returns to mistake if any record;
3) QueryForLoop is using the record set that SQL statement returns as parameter, and circulation executes specified SQL language Sentence;
4) Execute is to execute multiple SQL statements;
5) QueryResult is to return the result collection;
6) Call calls subprocess;
Above instructions circulation, judgement, branch execute
The basic format of described instruction by instruction name, instruction separator=, argumnent separator [*], SQL statement and parameter value It can be write with multirow, and guarantee the readability of the SQL statement, instruction long form is as follows:
Instruction name=[*] SQL statement 1
It can be write with multirow, the .. suitable for writing SQL statement ...
[*] parameter 2
[*] parameter 3
[*] parameter 4
Further scheme is that WEB service end platform feature is as follows:
1) load of instruction repertorie file and precompile;
2) explanation instructed executes;
3) multi-databases access standardization program (supporting ORACLE, SQLSERVER, MYSQL etc. at present);
4) database connection pool and db transaction processing routine;
5) client http request and data packet return to processing routine.
Compared with the prior art, the invention has the advantages that: the present invention solve software developer need to be proficient in C# or The technical threshold of the development languages such as JAVA provides a kind of sql like language that need to only grasp database and few instruction set The innovative software development approach for writing backstage WEB instruction repertorie file, mainly there is the advantages of the following aspects:
1, database SQL sentence, business model, simple several instructions, it is desirable that Develop ability is lower;
2, readable very friendly by simply instructing and the SQL statement of natural multirow;
3, the mistake debugging of SQL need to be only absorbed in, relatively easy much text file is loaded directly into, without compiling;
4, WEB service end platform code of the invention is write by System Architect and is transported in multiple application platform maturations Row, system stability are high;
5, program instruction of the invention has been subjected to the complete test of numerous application systems, and the processing of stringent affairs controls, Ensure the complete consistent of data;
There is the present invention, need to only be familiar with SQL statement and simple instruction, so that it may write WEB service end program, significantly Technical threshold is reduced, exploitation cost of labor is saved.
Detailed description of the invention
Fig. 1 is the WEB service end operation principle schematic diagram that the present invention is embodied;
Fig. 2 is the client request processing flow schematic diagram that the present invention is embodied.
Specific embodiment
The present invention is described in further detail below in conjunction with the accompanying drawings.
As depicted in figs. 1 and 2, specific embodiments of the present invention, a kind of development platform that writing WEB service end program and side Method, including computer client, WEB service end and instruction repertorie file, computer client by http call WEB service end and its It explains and executes the program instruction set that user writes;
The development platform and method of WEB service end program is write, WEB service end starting step is as follows:
S01. the WEB service end starting;
S02.WEB server-side loads instruction repertorie file, indexes precompile by function name;
S03. database connection pool is created;
S04. client request is waited;
S05. the corresponding described instruction collection of function name of client request is executed;
S06. after executing instruction, client is returned;
S07. S04 step is returned to, then waits client request process flow, is re-executed;
S08. termination signal is received, the WEB service end is exited.
Further, client request calls the instruction set for executing specified function, and method operating procedure is as follows:
1) computer client http post request includes function name, parameter name and value;
2) it after WEB service end receives user's request, opens database and connects and open affairs;
3) instruction set preloaded is read by function name;
4) instruction is obtained from instruction set;
5) if it is completion instruction is terminated, then db transaction is submitted, terminates and returns the result to client;
6) it explains and executes instruction;
7) if instruction execution returns to mistake, db transaction rollback terminates and error result is back to computer visitor Family end;
8) after instruction execution success, continue to read next instruction, turn 5 steps.
Further, function is defined in described instruction program file, each function is made of a plurality of instruction, function It is supplied to computer client remote and calls (RPC), to realize complicated business logic processing.
The instruction set of instruction repertorie file mainly include RPC.HSPrice_Submit, BEGIN, LockCheck, QueryCheck,QueryForLoop,Execute,QueryResult,Call,END;
RPC.HSPrice_Submit is function name;
BEGIN is beginning label;
LockCheck is to lock designated recorder, and judge, passes through if eligible, otherwise returns to error message;
QueryCheck is the data record that detection is returned by SQL statement inquiry, then returns to mistake if any record;
QueryForLoop is using the record set that SQL statement returns as parameter, and circulation executes specified SQL statement;
Execute is to execute multiple SQL statements;
QueryResult is to return the result collection;
Call calls subprocess.
Further, WEB service end platform software function is as follows:
1) load of backstage instruction repertorie file and precompile;
2) instruction, which is explained, executes program;
3) multi-databases access standardization program;
4) database connection pool and db transaction processing routine;
5) client http request and data packet return to processing routine.
Further, the main working process method of specific implementation of the invention is as follows:
The present invention is when practical application is implemented, the main instruction repertorie text write including server-side platform software and user Part:
1. server-side platform software includes executing file OWServer.exe and configuration file OWServer.ini;
Setting master catalogue, WEB service port numbers, the instruction repertorie filename that need to be loaded are needed in configuration file, database connects Connect parameter etc.;
OWServer.exe need to only be started when user's use and execute file;
2. user writes instruction repertorie file
Instruction repertorie file format is a text file, is loaded when being started by server-side platform software, what user write The pattern of instruction repertorie file is as follows:
3. client call
Server address and port with Http request POST method calling platform software
Such as: http: // 120.1.1.1:9008/owdata
Request data format is as follows:
Method:HS_Submit // function name
Service:CRM // database connection name _
Params:ID=100023 // parameter name and value
The present invention also provides the calling function of browser JS:
function RPC(method,params,content,callback,errorback,service, Request_url), returned data is the JSON format of standard.
4. instruction set operating specification of the invention is as follows:
1. executing sql
Execute=[*] sql language name (or $ instruction)
[*] parameter
[*]
2. inquiry sql simultaneously follows also every execution
QueryForLoop=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
[*] sql executes language name (or $ instruction)
QueryForLoop=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
[*] SELECT statement
[*] UPDATE statement
[*] INSERT sentence
It inquires and saves for each field name into parameter 3. executing
QueryAsParams=[*] sql language name
[*] parameter
[*] filter condition;
4, the result of inquiry is returned
QueryAddResult=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
QueryResult=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
5. executing inquiry can deposit into global parameter
QueryAs=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
[*] variable name
6. lock reord malfunctions when condition is unsuccessful
LockCheck=table name, where, filter, " error message format "
7. executing inquiry, error logging is checked
QueryCheck=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
[*] error message format %F_CODE%F_NAME
8. checking and executing
CheckExecute=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
[*] UPDATE statement (being executed in the presence of record)
[*] INSERT sentence (in the absence of record)
9. saving data change, the data change that client uploads is saved
Save=
10. causing abnormal
Raise=[*] error_format
11. parameter is arranged
Params=[*] NAME=%F_Name, ID=%F_ID
12. obtaining as a result, if being carried out a sql when result is empty
CheckResult=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
[*] field name
[*] sql executes language name (or $ instruction)
13. calling subprocess
Call=[*] Name
[*] parameter
The condition that [*] is executed
14. condition judges
IF=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
ELSEIF=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
ELSE=
ENDIF=
15. exiting
Quit=[*] sql
[*]
[*]
[*] Field//return value field
16. circulation
WhileBegin=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
{ instruction ... of execution }
WhileEnd=
Break=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
Continue=[*] sql language name (or $ instruction)
[*] parameter
[*] filter condition
17. show log shows all parameter and value when parameter is empty
Log=[*] test%F_NAME:F_CODE
18. $ is instructed
The present invention solves the technical threshold that software developer needs to be proficient in the development languages such as C# or JAVA, provides a kind of Sql like language and few instruction set that database need to be grasped can write the innovative software development approach of WEB service end program, Mainly there is the advantages of the following aspects:
1, database SQL sentence, business model, simple several instructions, it is desirable that Develop ability is lower need to be only familiar with;
2, readable very friendly by simply instructing and the SQL statement of natural multirow;
3, the mistake debugging of SQL need to be only absorbed in, relatively easy much instruction repertorie text file is loaded directly into, and is not necessarily to Compiling;
4, WEB service end platform code of the invention is write by System Architect and is transported in multiple application platform maturations Row, system stability are high;
5, program instruction of the invention has been subjected to the complete test of numerous application systems, and stringent db transaction handles control System, it is ensured that data it is complete;
There is the present invention, need to only be familiar with SQL statement and simple instruction, so that it may write serve end program, drop significantly Low technical threshold, saves exploitation cost of labor.
The foregoing is merely this patent preferred embodiments, not limit this patent range, all using specification and attached Equivalent structure or equivalent flow shift made by figure content is directly or indirectly used in other relevant technical fields, belongs to The scope of this patent.

Claims (6)

1. a kind of development platform and method for writing WEB service end program, it is characterised in that: including computer client, WEB service End and instruction repertorie file, the computer client calls the WEB service end by http, when the WEB service end starts Load instruction repertorie file;
The WEB service end starting step is as follows:
S01. the WEB service end starting;
S02. the WEB service end loads instruction repertorie file, indexes precompile by function name;
S03. database connection pool is created;
S04. the request of the end computer PC is waited;
S05. the corresponding described instruction collection of function name of the client request is executed;
S06. after executing described instruction, the end computer PC is returned to;
S07. S04 step is returned to, then waits client request process flow, is re-executed;
S08. termination signal is received, the WEB service end is exited.
2. writing the development platform and method of WEB service end program as described in claim 1, it is characterised in that: the computer Client request calls the instruction set for executing specified function, and method operating procedure is as follows:
1) computer client includes function name, parameter name and value by http post request;
2) it after WEB service end receives user's request, opens database and connects and open affairs;
3) instruction set preloaded is read by function name;
4) instruction is obtained from instruction set;
5) if it is completion instruction is terminated, then db transaction is submitted, terminates and returns the result to client;
6) it explains and executes instruction;
7) if instruction execution returns to mistake, db transaction rollback terminates and error result is back to computer client;
8) after instruction execution success, continue to read next instruction, turn 5 steps.
3. writing the development platform and method of WEB service end program as described in claim 1, it is characterised in that: described instruction Program file defines function, and each function is made of multiple instruction, and the function is supplied to client remote calling (RPC) 。
4. writing the development platform and method of WEB service end program as described in claim 1, it is characterised in that: described instruction The major instruction that the instruction set of program file includes is as follows:
1) LockCheck is to lock designated recorder, and judge, passes through if eligible, otherwise returns to error message;
2) QueryCheck is the data record that detection is returned by SQL statement inquiry, then returns to mistake if any record;
3) QueryForLoop is using the record set that SQL statement returns as parameter, and circulation executes specified SQL statement;
4) Execute is to execute multiple SQL statements;
5) QueryResult is to return the result collection;
6) Call calls subprocess;
Above instructions circulation, judgement, branch execute.
5. writing the development platform and method of WEB service end program as described in claim 1, it is characterised in that: described instruction Basic format by instruction name, instruction separator=, argumnent separator [*], SQL statement and parameter value can be write with multirow, and Guarantee the readability of the SQL statement.
6. writing the development platform and method of WEB service end program as described in claim 1, it is characterised in that: the WEB clothes End platform feature of being engaged in is as follows:
1) load of instruction repertorie file and precompile;
2) instruction, which is explained, executes program;
3) multi-databases access standardization program
4) database connection pool and db transaction processing routine;
5) client http request and data packet return to processing routine.
CN201910626750.2A 2019-07-11 2019-07-11 A kind of development platform and method for writing WEB service end program Pending CN110471649A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910626750.2A CN110471649A (en) 2019-07-11 2019-07-11 A kind of development platform and method for writing WEB service end program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910626750.2A CN110471649A (en) 2019-07-11 2019-07-11 A kind of development platform and method for writing WEB service end program

Publications (1)

Publication Number Publication Date
CN110471649A true CN110471649A (en) 2019-11-19

Family

ID=68508067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910626750.2A Pending CN110471649A (en) 2019-07-11 2019-07-11 A kind of development platform and method for writing WEB service end program

Country Status (1)

Country Link
CN (1) CN110471649A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817570A (en) * 2021-02-07 2021-05-18 上海星融汽车科技有限公司 Method and system for simulating data through MOCK

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044432A (en) * 2001-07-31 2003-02-14 Faruma Minami Osaka:Kk Program development system
CN105302575A (en) * 2015-11-19 2016-02-03 中国移动通信集团广东有限公司汕头分公司 Foundational development framework
CN105824616A (en) * 2016-03-07 2016-08-03 林友哲 Development method and frame for equipment control system program
CN105956481A (en) * 2015-09-17 2016-09-21 中国银联股份有限公司 Data processing method and device
CN106227545A (en) * 2016-07-28 2016-12-14 武汉源启科技股份有限公司 The method for designing of development platform and device
WO2017027868A1 (en) * 2015-08-13 2017-02-16 PositiveEdge Solutions LLC Configurable development platform integrating heterogeneous persistence systems
CN107391111A (en) * 2017-06-22 2017-11-24 刘武丰 Artificial intelligence co-development framework and implementation method
CN109446064A (en) * 2018-09-18 2019-03-08 珠海金山网络游戏科技有限公司 A kind of interactive testing method based on browser

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044432A (en) * 2001-07-31 2003-02-14 Faruma Minami Osaka:Kk Program development system
WO2017027868A1 (en) * 2015-08-13 2017-02-16 PositiveEdge Solutions LLC Configurable development platform integrating heterogeneous persistence systems
CN105956481A (en) * 2015-09-17 2016-09-21 中国银联股份有限公司 Data processing method and device
CN105302575A (en) * 2015-11-19 2016-02-03 中国移动通信集团广东有限公司汕头分公司 Foundational development framework
CN105824616A (en) * 2016-03-07 2016-08-03 林友哲 Development method and frame for equipment control system program
CN106227545A (en) * 2016-07-28 2016-12-14 武汉源启科技股份有限公司 The method for designing of development platform and device
CN107391111A (en) * 2017-06-22 2017-11-24 刘武丰 Artificial intelligence co-development framework and implementation method
CN109446064A (en) * 2018-09-18 2019-03-08 珠海金山网络游戏科技有限公司 A kind of interactive testing method based on browser

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
夏帮贵: "基于 Android 平台的图书馆服务系统设计与实现", 《应用实践》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817570A (en) * 2021-02-07 2021-05-18 上海星融汽车科技有限公司 Method and system for simulating data through MOCK

Similar Documents

Publication Publication Date Title
EP1805622B1 (en) Method and system for simplifying the debugging of a program comprising user-written code and non user-written code
CN101782864B (en) Method for improving communication service stability of Web server
US20100146396A1 (en) Systems and methods for web service function, definition, implementation, and/or execution
Ying et al. Refactoring legacy AJAX applications to improve the efficiency of the data exchange component
JP2001222436A (en) Method and system for supporting automation management of resource and recording medium
CN109635024A (en) A kind of data migration method and system
Ribeiro et al. Ecoandroid: An android studio plugin for developing energy-efficient java mobile applications
US20200104107A1 (en) Systems and methods for deploying software products to environments
CN108763056A (en) A kind of automatic test bullet frame processing method and terminal
Kaliszyk Web interfaces for proof assistants
US20220300262A1 (en) Method for constructing, running and implementing cross-platform application, terminal, server and system
CN110471649A (en) A kind of development platform and method for writing WEB service end program
JP4627636B2 (en) Mechanism for making asynchronous components an application framework agnostic
CN103248511A (en) Analyses method, device and system for single-point service performance
CN117215661A (en) Event processing method, device and storage medium
CN113961451A (en) Automatic test system for software development tasks of working platform
Sharma et al. Reactive-Optimized Sentence Detection In Kubernetes Using OpenNLP And Native GraalVM Image With Framework Metric Comparison
CN112000310A (en) Electric power automation operation and maintenance system
Gammelgaard Microservices in. NET
CN104731697A (en) Running control method, control system and sound monitor of test case
CN109669871A (en) A method of realizing Oracle Form automatic test
Bai Developing Java Web Services to Access Databases
Mitchell et al. SQL Server Integration Services Design Patterns
Toman Web application for Data Import from XLSX into a Relational Database
Tate From Java to Ruby

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191119