CN111596902B - Method, device, equipment and storage medium for building front-end and back-end development framework - Google Patents

Method, device, equipment and storage medium for building front-end and back-end development framework Download PDF

Info

Publication number
CN111596902B
CN111596902B CN202010456288.9A CN202010456288A CN111596902B CN 111596902 B CN111596902 B CN 111596902B CN 202010456288 A CN202010456288 A CN 202010456288A CN 111596902 B CN111596902 B CN 111596902B
Authority
CN
China
Prior art keywords
interface
file
data source
configuration data
development 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.)
Active
Application number
CN202010456288.9A
Other languages
Chinese (zh)
Other versions
CN111596902A (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.)
Oxford Hainan Blockchain Research Institute Co ltd
Original Assignee
Oxford Hainan Blockchain Research Institute 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 Oxford Hainan Blockchain Research Institute Co ltd filed Critical Oxford Hainan Blockchain Research Institute Co ltd
Priority to CN202010456288.9A priority Critical patent/CN111596902B/en
Publication of CN111596902A publication Critical patent/CN111596902A/en
Application granted granted Critical
Publication of CN111596902B publication Critical patent/CN111596902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method, a device and equipment for building a front-end and back-end development framework and a computer readable storage medium, wherein the method comprises the following steps: reading pre-stored configuration information corresponding to each preset field, and classifying and packaging each configuration information according to a front-end data source and a back-end data source to obtain a front-end configuration data source and a back-end configuration data source; and matching a front-end request address in an interface calling file generated according to the front-end configuration data source with a rear-end interface address in an interface routing file generated according to the rear-end configuration data source to obtain a front-end and rear-end development framework. According to the method, repeated code compiling is not needed manually, only one piece of configuration information needs to be modified under the condition of changing the requirement or the data structure, the consumption of manpower resources is reduced, the maintenance cost of a front-end development framework and a rear-end development framework is reduced, the development cost is reduced, the error rate and instability in the manual operation process can be avoided, and therefore the development efficiency, the code quality and the normalization can be improved.

Description

Method, device, equipment and storage medium for building front-end and back-end development framework
Technical Field
The invention relates to the field of internet front-end and back-end development, in particular to a method, a device and equipment for building a front-end and back-end development framework and a computer readable storage medium.
Background
Currently, with the development of node.js, more and more companies and enterprises use node.js to develop tools and automation or try to use node.js to develop in mobile applications. The method is used for system development or application development under a specific scene, such as: high concurrent apps, wechat applet development, H5 development, content distribution system CMS, application backend management system development, and the like, can be developed quickly based on node. At present, a front-end and back-end development framework building method based on a node.js mainstream framework generally needs developers to build front-end and back-end projects respectively, and the front-end developers need to repeatedly perform the work of page compiling, interface calling, route defining, joint debugging interface and the like according to interface documents. In a specific scenario, for example, in a Form data management development process, development modes are the same, each Form has a CRUD interface and an Excel export interface, a back-end interface develops and uses an ORM middleware (e.g., sequenize) to perform database operation to improve efficiency, but a front-end needs to define query condition fields according to an interface document, define list items displayed by a list, define check rules of Form fields, define dictionary data sources required to be acquired by a page, and the like. Therefore, in the prior art, a front-end page and a rear-end interface need to be manually developed to realize the construction of a front-end and rear-end development framework; in the case of a change in a requirement or data structure, a front-end developer and a back-end developer are required to respectively adjust their respective configuration information, and thus a large amount of human resources are consumed; in addition, in the manual operation process, the error rate and instability of development are increased due to manual operation errors, the development cost is increased, and the development efficiency, the code quality and the normalization are reduced.
Therefore, how to reduce the consumption of manpower resources, reduce the development cost, and improve the development efficiency and the code quality in the building process of the front-end and rear-end development frames is a technical problem to be solved by technical personnel in the field at present.
Disclosure of Invention
In view of this, the invention aims to provide a method for building a front-end and back-end development framework, which can reduce the consumption of manpower resources, reduce the development cost, and improve the development efficiency and the code quality in the building process of the front-end and back-end development frameworks; another object of the present invention is to provide a building apparatus, a device and a computer readable storage medium for a front-end and back-end development framework, all of which have the above advantages.
In order to solve the technical problem, the invention provides a method for constructing a front-end and back-end development framework, which comprises the following steps:
reading pre-stored configuration information corresponding to each preset field, and classifying and packaging the configuration information according to front and rear end data sources to obtain a front end configuration data source and a rear end configuration data source;
and matching a front-end request address in an interface calling file generated according to the front-end configuration data source with a rear-end interface address in an interface routing file generated according to the rear-end configuration data source to obtain a front-end and rear-end development framework.
Preferably, the process of matching a front-end request address in an interface call file generated according to the front-end configuration data source with a back-end interface address in an interface routing file generated according to the back-end configuration data source to obtain a front-end and back-end development framework specifically includes:
generating a front-end page file and the interface calling file according to the front-end configuration data source;
generating the interface routing file according to the back-end configuration data source;
and matching a front-end request address in the interface calling file with a rear-end interface address in the interface routing file according to the directory and the file name of the front-end page file to obtain the front-end and rear-end development framework.
Preferably, the process of generating the interface routing file according to the back-end configuration data source specifically includes:
performing ORM mapping on the rear-end data source to obtain a Model file;
traversing the Model file to generate a Controller file and a Service file;
and generating the interface routing file according to the directory of the Controller file.
Preferably, after the matching is performed on the front-end request address in the interface call file generated according to the front-end configuration data source and the back-end interface address in the interface route file generated according to the back-end configuration data source to obtain the front-end and back-end development framework, the method further includes:
and carrying out interface test on the front-end and back-end development frames.
Preferably, after the interface testing is performed on the front-end and back-end development framework, the method further comprises:
and recording the test result and the test state of the interface test to a log.
Preferably, the interface test comprises adding an interface, inquiring an interface, modifying an interface, deleting an interface, exporting an Excel interface and deleting interfaces in batches.
Preferably, after the interface test is performed on the front-end and back-end fusion framework according to the matching between the front-end request address and the back-end routing address, the method further includes:
and when the interface test fails, sending out corresponding prompt information.
In order to solve the above technical problem, the present invention further provides a device for building a front-end and back-end development framework, comprising:
the device comprises a setting module, a front-end configuration data source and a back-end configuration data source, wherein the setting module is used for reading pre-stored configuration information corresponding to each preset field and classifying and packaging the configuration information according to the front-end and back-end data sources to obtain the front-end configuration data source and the back-end configuration data source;
and the matching module is used for matching the interface calling file generated according to the front-end configuration data source with the interface routing file generated according to the back-end configuration data source to obtain a front-end and back-end development framework.
In order to solve the above technical problem, the present invention further provides a front-end and back-end development framework building apparatus, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of any one of the front-end and back-end development framework building methods when executing the computer program.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps of any one of the methods for building a front-end and back-end development framework.
The invention provides a method for constructing a front-end and rear-end development framework, which comprises the following steps: reading pre-stored configuration information corresponding to each preset field, and classifying and packaging each configuration information according to a front-end data source and a back-end data source to obtain a front-end configuration data source and a back-end configuration data source; and then matching a front-end request address in an interface calling file generated according to the front-end configuration data source with a rear-end interface address in an interface routing file generated according to the rear-end configuration data source to obtain a front-end and rear-end development framework. The method sets the front-end page and the rear-end interface by utilizing the pre-stored configuration information corresponding to the preset field, and sets the matching relation of the front-end page and the rear-end interface, thereby realizing the construction of a front-end and rear-end development framework, avoiding manual repeated code compiling, and reducing the consumption of manpower resources; and a mapping relation between the front end and the back end is formed according to the same preset field, and only one piece of configuration information needs to be modified under the condition of changing the requirement or the data structure, so that the consumption of manpower resources can be further reduced, the maintenance cost of a front-end development framework and a back-end development framework is reduced, and the development cost is reduced.
In order to solve the technical problems, the invention also provides a device, equipment and a computer readable storage medium for constructing the front-end and rear-end development frames, which have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for building a front-end and back-end development framework according to an embodiment of the present invention;
fig. 2 is a flowchart of another method for building a front-end and back-end development framework according to an embodiment of the present invention;
fig. 3 is a structural diagram of a building device of a front-end and back-end development frame according to an embodiment of the present invention;
fig. 4 is a structural diagram of a building device of a front-end and back-end development framework according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The core of the embodiment of the invention is to provide a method for constructing a front-end and rear-end development frame, which can reduce the consumption of manpower resources, reduce the development cost and improve the development efficiency and the code quality in the construction process of the front-end and rear-end development frames; the other core of the invention is to provide a building device, equipment and a computer readable storage medium of the front-end and back-end development framework, which have the beneficial effects.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flowchart of a method for building a front-end and back-end development framework according to an embodiment of the present invention. As shown in fig. 1, a method for building a front-end and back-end development framework includes:
s10: and reading pre-stored configuration information corresponding to each preset field, and classifying and packaging each configuration information according to the front-end data source and the back-end data source to obtain the front-end configuration data source and the back-end configuration data source.
Specifically, in this embodiment, a database needs to be set according to actual requirements, preset fields in the database are fields required in the process of building the front-end and back-end development frameworks, and configuration information is added to each preset field in one comment column during the design of the database table. Then, the configuration information of the database table can be obtained by reading a database table structure configuration data function getConfigInfo (), and then the configuration information is classified and encapsulated according to front and back end data sources to form a front end configuration data source and a back end configuration data source. It should be noted that the type of the configuration information may include a list field, a field type, a form verification rule, a query condition, a style definition, a dictionary table, and the like, which is not limited in this embodiment. The front-end data source structure may include a page data source (PageModel), a query module data source (SearchModel), a page button data source (BtnToolModel), a dictionary data source (DictModel), a list data source (TableModel), and other extensible items (other); configuration information may include information on whether to display, column attributes, field tags, sort attributes, data source escaping, etc.
It should be noted that, in the actual operation, after the configuration information pre-stored in the database table is read, the configuration information may be further subjected to addition/deletion/modification operations, so that the configuration information corresponding to the preset field may be adjusted more conveniently.
S20: and matching a front-end request address in an interface calling file generated according to the front-end configuration data source with a rear-end interface address in an interface routing file generated according to the rear-end configuration data source to obtain a front-end and rear-end development framework.
Specifically, after a front-end configuration data source and a back-end configuration data source are respectively generated according to configuration information, an interface calling file is generated according to the front-end configuration data source, an interface routing file is generated according to the back-end configuration data source, then a front-end request address in the interface calling file is matched with a back-end interface address in the interface routing file, and the mapping relation between the front-end request address and the back-end interface address is set, so that the back-end interface can respond by using a corresponding interface when a front-end page is operated subsequently, and the front-end development framework and the back-end development framework are built. It should be noted that, a front-end and back-end development framework is automatically generated through unified configuration information, and according to the database design, a CRUD (add Create, read Retrieve, update and Delete) interface and an Excel export interface of a form are automatically generated.
The method for constructing the front-end and rear-end development framework provided by the embodiment of the invention comprises the following steps: reading pre-stored configuration information corresponding to each preset field, and classifying and packaging each configuration information according to a front-end data source and a back-end data source to obtain a front-end configuration data source and a back-end configuration data source; and then matching a front-end request address in an interface calling file generated according to the front-end configuration data source with a rear-end interface address in an interface routing file generated according to the rear-end configuration data source to obtain a front-end and rear-end development framework. The method sets the front-end page and the rear-end interface by utilizing the pre-stored configuration information corresponding to the preset field, and sets the matching relation of the front-end page and the rear-end interface, thereby realizing the construction of a front-end and rear-end development framework, avoiding manual repeated code compiling, and reducing the consumption of manpower resources; and a mapping relation between the front end and the back end is formed according to the same preset field, and only one piece of configuration information needs to be modified under the condition of changing the requirement or the data structure, so that the consumption of manpower resources can be further reduced, the maintenance cost of a front-end development framework and a back-end development framework is reduced, and the development cost is reduced.
On the basis of the foregoing embodiment, this embodiment further describes and optimizes the technical solution, and specifically, in this embodiment, a process of obtaining a front-end and back-end development framework by matching a front-end request address in an interface call file generated according to a front-end configuration data source and a back-end interface address in an interface routing file generated according to a back-end configuration data source specifically includes:
generating a front-end page file and an interface calling file according to a front-end configuration data source;
generating an interface routing file according to the back-end configuration data source;
and matching a front-end request address in the interface calling file with a rear-end interface address in the interface routing file according to the directory and the file name of the front-end page file to obtain a front-end and rear-end development framework.
Specifically, in this embodiment, for the front-end module, the front-end configuration data source is processed and converted into a JSON format file, where the JSON format file includes a list component name, a field set and type participating in a query condition, a query control type and attribute, a list display field and a corresponding field dereference, a field sort, an operation column button, a field check rule of a Form call interface, an export button, a batch operation button, a page dictionary table data source, and the like; and then, automatically generating page codes according to the front-end configuration data source after format conversion to obtain a front-end page file, and outputting the generated front-end page file to a specified project directory. In addition, an interface calling file is generated according to the table name field of the front-end configuration data source after format conversion. Js is taken as an example, the front-end page file covers a < template > template module, a < script > script module and a < style > style module; the components in the < template > template module cover an inquiry module, a list module, a function button module, a paging component, a Form dialog box module and the like; the < script > script module comprises data sources, variables, functions, components, hook functions and the like required by the < template >; and the < style > style module is the custom style code required by the current component.
Then, after generating an interface routing file according to a back-end configuration data source, automatically matching a front-end request address in an interface calling file and a back-end interface address in the interface routing file according to a directory and a file name of the front-end page file output by a front-end page, namely setting a mapping relation between the front-end page and the back-end interface, thereby obtaining a front-end and back-end development framework.
As a preferred embodiment, the process of generating an interface routing file according to a backend configuration data source specifically includes:
performing ORM mapping on a rear-end data source to obtain a Model file;
traversing the Model file to generate a Controller file and a Service file;
and generating an interface routing file according to the directory of the Controller file.
Specifically, for a back-end module, first performing ORM mapping by configuring a data source, automatically generating a corresponding Model file, and outputting the Model file to a specified directory; traversing according to the generated Model file, automatically generating a corresponding Controller file and a Service file in batch, and outputting the files to a specified directory without covering the existing Controller file and Service file; and generating a corresponding interface routing file according to the directory of the Controller file, and dynamically generating an interface address and dynamically associating the interface address with the Controller according to a rear-end configuration data source in the interface routing file.
It can be understood that according to the method of the embodiment, when the data structure is changed, the existing custom part can be maintained not to be re-developed by being covered by a new file, and the stability and the expandability of the front-end and back-end development framework are also improved. The Controller file and the Service file contain a universal CRUD interface and an Excel export interface, and database operation is realized through the sequenize middleware, so that the execution safety of SQL is improved.
It should be noted that the interface routing file is added, and does not cover the existing configuration; and the interface calling file (such as an API interface calling file) is a new file generated, and an API request address URL is automatically generated according to the table name field of the front-end configuration data source, so that the API interface request compiling of a CRUD interface and an Excel export interface is not required to be manually carried out. By the method, the user can automatically generate the front-end and back-end development frames, automatically render the forms and generate the data interfaces through the configuration information designed by the user in a user-defined mode.
In order to make the technical solutions in the present application more clearly understood by those skilled in the art, the following describes the technical solutions in the embodiments of the present application in detail with reference to practical application scenarios. With reference to the flowchart of another method for building a front-end and back-end development framework provided in the embodiment of the present invention shown in fig. 2, in this embodiment, the front end and the back end are preferably controlled to simultaneously and concurrently perform the construction of the front-end configuration data source and the back-end data source and the building of the front-end and back-end development frameworks, and the specific steps are as follows:
s101: setting a database comprising preset fields and configuration information corresponding to the preset fields;
s102: acquiring configuration information in a database table by reading a database table structure configuration data function getConfigInfo ();
s103: constructing a front-end configuration data source;
s104: generating a front-end page file;
s105: generating an interface calling file;
s106: constructing a back-end configuration data source;
s107: obtaining a Model file through ORM mapping;
s108: traversing the Model file to generate a Controller file and a Service file;
s109: generating an interface routing file according to the Controller file;
s110: and matching the front-end request address in the interface calling file with the rear-end interface address in the interface routing file to obtain a front-end and rear-end development framework.
Wherein, S103: constructing a front-end configuration data source and S106: constructing a back-end configuration data source; namely, the operations of respectively constructing the front-end configuration data source and the back-end data source can be synchronously carried out; s104 to S105 and S107 to S109 may be performed in synchronization.
Therefore, according to the method of the embodiment, the construction time of the front-end and rear-end development frames can be saved, the construction efficiency of the front-end and rear-end development frames can be improved, and the front-end and rear-end development frames can be modified synchronously under the condition that demands or data structure changes exist, so that the construction efficiency of the front-end and rear-end development frames can be further improved.
On the basis of the foregoing embodiment, this embodiment further describes and optimizes the technical solution, and specifically, after matching a front-end request address in an interface call file generated according to a front-end configuration data source with a back-end interface address in an interface routing file generated according to a back-end configuration data source to obtain a front-end and back-end development framework, the embodiment further includes:
and carrying out interface test on the front-end development framework and the back-end development framework.
Specifically, in this embodiment, after the front-end and back-end development frameworks are built, interface testing is performed on the front-end and back-end development frameworks according to the matching condition of the front-end request address and the back-end interface address. It should be noted that, in actual operation, a test case and a test script may be preset, and the test case is called in the running process of the test script to implement the process of performing interface test on the front-end and back-end development frameworks.
As a preferred embodiment, in this embodiment, the interface test includes adding an interface, querying an interface, modifying an interface, deleting an interface, exporting an Excel interface, and deleting interfaces in batches.
It should be noted that the interface generated automatically covers CRUD and Excel export interfaces, so that when the interface is tested, a plurality of interfaces need to be tested. In general, since the number of initial records of a database table is generally 0, the steps of the interface test can be performed in the following order:
1. executing a batch new interface, and inserting a plurality of records (generally inserting more than 10 records);
2. executing a query interface, and carrying out paging query with a query condition;
3. executing a modification interface to complete the modification of a single record;
4. executing a single deletion interface to complete deletion of a single record;
5. executing an Excel export interface to finish export and download of an Excel file;
6. and executing a batch deleting interface and deleting a plurality of records.
As a preferred embodiment, after performing the interface test on the front-end and back-end development framework, the method further includes:
and recording the test result and the test state of the interface test to a log.
Specifically, in this embodiment, after the interface test of the front-end and back-end development frames is implemented, the test result and the test state of the interface test are further recorded in the log. When the test result is not passed, the corresponding test state, that is, the address URL (Uniform Resource Locator), the interface parameter, the SQL (Structured Query Language) statement and other detailed information called by the current interface can be further obtained, and the test states are recorded to the log, so that the subsequent analysis can be performed according to the log, and the interface can be further adjusted and optimized.
As a preferred embodiment, after performing interface test on the front-end and back-end fusion framework according to matching between the front-end request address and the back-end routing address, the method further includes:
and when the interface test fails, sending out corresponding prompt information.
Specifically, in this embodiment, when the front-end request address and the back-end routing address are matched, the front-end and back-end fusion frames are subjected to an interface test, and it is determined that the interface test corresponding to the current test case does not pass, the prompting device is further triggered to send out the corresponding prompting information. It should be noted that the prompting device may specifically be a buzzer and/or an indicator light and/or a display, and the prompting device triggers the buzzer/the indicator light/the display to send out corresponding prompting information, such as a buzzer sound/a flashing light/displayed characters or images, so as to intuitively prompt the user that an abnormal condition exists in the current interface test, so that the user can adjust and optimize the interface in time, and the use experience of the user can be further improved.
Therefore, the interface test is automatically carried out, the development quality can be effectively and reasonably verified, the problem can be rapidly positioned and solved, and the development quality is ensured.
The above detailed description is given for the embodiment of the method for building a front-end and back-end development frame provided by the present invention, and the present invention also provides a device, an apparatus, and a computer-readable storage medium for building a front-end and back-end development frame corresponding to the method.
Fig. 3 is a structural diagram of a building apparatus of a front-end and rear-end development frame according to an embodiment of the present invention, and as shown in fig. 3, the building apparatus of the front-end and rear-end development frame includes:
the setting module 31 is configured to read pre-stored configuration information corresponding to each preset field, and perform classified encapsulation on each configuration information according to the front-end data source and the back-end data source to obtain a front-end configuration data source and a back-end configuration data source;
the matching module 32 is configured to match a front-end request address in an interface call file generated according to the front-end configuration data source with a back-end interface address in an interface routing file generated according to the back-end configuration data source, so as to obtain a front-end and back-end development framework.
The device for building the front-end and rear-end development frames provided by the embodiment of the invention has the beneficial effects of the method for building the front-end and rear-end development frames.
As a preferred embodiment, the matching module specifically includes:
the first generation submodule is used for generating a front-end page file and an interface calling file according to a front-end configuration data source;
the second generation submodule is used for generating an interface routing file according to the back-end configuration data source;
and the matching submodule is used for matching the front end request address in the interface routing file with the rear end interface address in the interface calling file according to the directory and the file name of the front end page file to obtain a front end and rear end development framework.
As a preferred embodiment, the second generation submodule specifically includes:
the mapping unit is used for carrying out ORM mapping on the rear-end data source to obtain a Model file;
the first generating unit is used for traversing the Model file and generating a Controller file and a Service file;
and the second generating unit is used for generating an interface routing file according to the directory where the Controller file is located.
As a preferred embodiment, a building apparatus of a front-end and rear-end development frame further includes:
and the test module is used for carrying out interface test on the front-end development framework and the rear-end development framework.
As a preferred embodiment, a building apparatus of a front-end and rear-end development frame further includes:
and the recording module is used for recording the test result and the test state of the interface test to the log after the interface test is performed on the front-end development framework and the back-end development framework.
As a preferred embodiment, a building apparatus of a front-end and rear-end development frame further includes:
and the prompting module is used for sending out corresponding prompting information when the interface test fails after the interface test is carried out on the front-end and back-end fusion frames.
Fig. 4 is a structural diagram of a construction apparatus of a front-end and rear-end development frame according to an embodiment of the present invention, and as shown in fig. 4, the construction apparatus of the front-end and rear-end development frame includes:
a memory 41 for storing a computer program;
and a processor 42, configured to implement the steps of the method for building the front-end and back-end development framework when executing the computer program.
The construction equipment of the front-end and rear-end development frame provided by the embodiment of the invention has the beneficial effects of the construction method of the front-end and rear-end development frame.
In order to solve the technical problem, the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for building the front-end and back-end development framework are implemented.
The computer-readable storage medium provided by the embodiment of the invention has the beneficial effects of the construction method of the front-end and back-end development framework.
The method, the device, the equipment and the computer readable storage medium for constructing the front-end and back-end development framework provided by the invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are set forth only to help understand the method and its core ideas of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

Claims (8)

1. A method for constructing a front-end and back-end development framework is characterized by comprising the following steps:
reading pre-stored configuration information corresponding to each preset field, and classifying and packaging the configuration information according to front and rear end data sources to obtain a front end configuration data source and a rear end configuration data source;
matching a front-end request address in an interface calling file generated according to the front-end configuration data source with a rear-end interface address in an interface routing file generated according to the rear-end configuration data source to obtain a front-end and rear-end development framework;
generating a front-end page file and the interface calling file according to the front-end configuration data source; specifically, a front-end configuration data source is processed and converted into a JSON format file, wherein the JSON format file comprises a list component name, field sets and types participating in query conditions, query control types and attributes, list display field and corresponding field derotation, field sequencing, operation column buttons, field verification rules of a Form calling interface, export buttons, batch operation buttons and a page dictionary table data source; automatically generating page codes according to the front-end configuration data source after format conversion to obtain a front-end page file, and outputting the generated front-end page file to a specified project directory; generating an interface calling file according to the table name field of the front-end configuration data source after format conversion;
generating the interface routing file according to the back-end configuration data source; specifically, ORM mapping is carried out through a configuration data source, and a corresponding Model file is automatically generated and output to a specified directory; traversing according to the generated Model file, automatically generating a corresponding Controller file and a corresponding Service file in batch, and outputting the files to a specified directory without covering the existing Controller file and Service file; generating a corresponding interface routing file according to the directory of the Controller file, wherein the interface routing file dynamically generates an interface address and dynamically associates the Controller according to a rear-end configuration data source;
and matching a front-end request address in the interface calling file with a rear-end interface address in the interface routing file according to the directory and the file name of the front-end page file to obtain the front-end and rear-end development framework.
2. The method according to claim 1, wherein after the matching is performed on the front-end request address in the interface call file generated according to the front-end configuration data source and the back-end interface address in the interface route file generated according to the back-end configuration data source to obtain a front-end and back-end development framework, the method further comprises:
and carrying out interface test on the front-end and back-end development frames.
3. The method of claim 2, further comprising, after the interface testing the front-end development framework:
and recording the test result and the test state of the interface test to a log.
4. The method of claim 2, wherein the interface test comprises adding an interface, querying an interface, modifying an interface, deleting an interface, exporting an Excel interface and deleting an interface in batch.
5. The method of claim 3, wherein after the interface test of the front-end and back-end converged framework according to the matching of the front-end request address and the back-end routing address, further comprising:
and when the interface test fails, sending out corresponding prompt information.
6. A device of buildding of front and back end development frame which characterized in that includes:
the device comprises a setting module, a front-end configuration data source and a back-end configuration data source, wherein the setting module is used for reading pre-stored configuration information corresponding to each preset field and classifying and packaging the configuration information according to the front-end and back-end data sources to obtain the front-end configuration data source and the back-end configuration data source;
the matching module is used for matching a front-end request address in an interface calling file generated according to the front-end configuration data source with a rear-end interface address in an interface routing file generated according to the rear-end configuration data source to obtain a front-end and rear-end development framework;
generating a front-end page file and the interface calling file according to the front-end configuration data source; specifically, a front-end configuration data source is processed and converted into a JSON format file, wherein the JSON format file comprises a list component name, field sets and types participating in query conditions, query control types and attributes, list display field and corresponding field derotation, field sequencing, operation column buttons, field verification rules of a Form calling interface, export buttons, batch operation buttons and a page dictionary table data source; automatically generating page codes according to the front-end configuration data source after format conversion to obtain a front-end page file, and outputting the generated front-end page file to a specified project directory; generating an interface calling file according to the table name field of the front-end configuration data source after format conversion;
generating the interface routing file according to the back-end configuration data source; specifically, ORM mapping is carried out through a configuration data source, and a corresponding Model file is automatically generated and output to a specified directory; traversing according to the generated Model file, automatically generating a corresponding Controller file and a Service file in batch, and outputting the files to a specified directory without covering the existing Controller file and Service file; generating a corresponding interface routing file according to the directory of the Controller file, and dynamically generating an interface address and dynamically associating the interface address with the Controller according to a back-end configuration data source in the interface routing file;
and matching a front-end request address in the interface calling file with a rear-end interface address in the interface routing file according to the directory and the file name of the front-end page file to obtain the front-end and rear-end development framework.
7. A set-up equipment of front and back end development frame which characterized in that includes:
a memory for storing a computer program;
a processor for implementing the steps of the method of building a front-end and back-end development framework according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, implements the steps of the method of building a front-end and back-end development framework according to any one of claims 1 to 5.
CN202010456288.9A 2020-05-26 2020-05-26 Method, device, equipment and storage medium for building front-end and back-end development framework Active CN111596902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010456288.9A CN111596902B (en) 2020-05-26 2020-05-26 Method, device, equipment and storage medium for building front-end and back-end development framework

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010456288.9A CN111596902B (en) 2020-05-26 2020-05-26 Method, device, equipment and storage medium for building front-end and back-end development framework

Publications (2)

Publication Number Publication Date
CN111596902A CN111596902A (en) 2020-08-28
CN111596902B true CN111596902B (en) 2023-03-28

Family

ID=72190638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010456288.9A Active CN111596902B (en) 2020-05-26 2020-05-26 Method, device, equipment and storage medium for building front-end and back-end development framework

Country Status (1)

Country Link
CN (1) CN111596902B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559180B (en) * 2020-12-16 2024-03-26 微医云(杭州)控股有限公司 Resource processing method and device, electronic equipment and storage medium
CN112671574B (en) * 2020-12-18 2024-04-16 深圳赛安特技术服务有限公司 Front-end and back-end joint debugging method and device, proxy equipment and storage medium
CN112631604B (en) * 2020-12-30 2022-04-26 武汉达梦数据技术有限公司 Front-end frame implementation method and device
CN113709187B (en) * 2021-10-25 2022-02-15 深圳市信润富联数字科技有限公司 Multi-server data request method, device, equipment and storage medium
CN114285831B (en) * 2021-12-23 2024-03-08 中汽创智科技有限公司 Data transmission method and device for automobile open architecture

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108572823A (en) * 2018-04-23 2018-09-25 武汉斗鱼网络科技有限公司 Front and back end development management method and system based on interface engine
CN109582909A (en) * 2018-12-19 2019-04-05 拉扎斯网络科技(上海)有限公司 Webpage automatic generation method, device, electronic equipment and storage medium
CN110826004A (en) * 2019-11-05 2020-02-21 杭州安恒信息技术股份有限公司 Front-end request data processing method and related device
CN110989983A (en) * 2019-11-28 2020-04-10 深圳航天智慧城市系统技术研究院有限公司 Zero-coding application software rapid construction system
CN111083054A (en) * 2019-11-15 2020-04-28 浙江大搜车软件技术有限公司 Route configuration processing method and device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7881619B2 (en) * 1999-10-28 2011-02-01 Lightwaves Systems, Inc. System and method of using variable pulses for symbology
US9122614B1 (en) * 2011-12-22 2015-09-01 Netapp, Inc. Modular block-allocator for data storage systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108572823A (en) * 2018-04-23 2018-09-25 武汉斗鱼网络科技有限公司 Front and back end development management method and system based on interface engine
CN109582909A (en) * 2018-12-19 2019-04-05 拉扎斯网络科技(上海)有限公司 Webpage automatic generation method, device, electronic equipment and storage medium
CN110826004A (en) * 2019-11-05 2020-02-21 杭州安恒信息技术股份有限公司 Front-end request data processing method and related device
CN111083054A (en) * 2019-11-15 2020-04-28 浙江大搜车软件技术有限公司 Route configuration processing method and device, computer equipment and storage medium
CN110989983A (en) * 2019-11-28 2020-04-10 深圳航天智慧城市系统技术研究院有限公司 Zero-coding application software rapid construction system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Trevor 等.Omnimapper: A modular multimodal mapping framework.《2014 IEEE international conference on robotics and automation (ICRA)》.2014,1983-1990. *
喻莹莹 等.前后端分离的终端自适应动态表单设计.《计算机系统应用》.2018,第27卷(第04期),70-75. *

Also Published As

Publication number Publication date
CN111596902A (en) 2020-08-28

Similar Documents

Publication Publication Date Title
CN111596902B (en) Method, device, equipment and storage medium for building front-end and back-end development framework
CN110955416A (en) Interface document generation method, device, equipment and computer storage medium
CN111581083B (en) Interface testing method and device, electronic equipment and storage medium
CN110427188B (en) Configuration method, device, equipment and storage medium of single-test assertion program
CN113722020B (en) Interface calling method, device and computer readable storage medium
CN107562459B (en) Management system, interface generating/displaying/operating method, medium, and terminal
CN111506579B (en) Method, program and equipment for generating intelligent contract code
CN110674083A (en) Workflow migration method, device, equipment and computer readable storage medium
CN111475390A (en) Log collection system deployment method, device, equipment and storage medium
CN110968317A (en) Method and system for automatically generating vue page component through UCI/USI configuration file
CN111427784B (en) Data acquisition method, device, equipment and storage medium
CN111026670A (en) Test case generation method, test case generation device, and storage medium
CN116737127A (en) Low code development method, device, equipment and storage medium
Malik et al. Using UML models and formal verification in model-based testing
CN114371845A (en) Form generation method and device
CN114064601B (en) Storage process conversion method, device, equipment and storage medium
CN111488144A (en) Data processing method and equipment
CN111190587A (en) Method and system for automatically generating engineering front-end code based on JDBC
CN114036178A (en) Service interface generation method, device, computer and readable storage medium
CN115904382A (en) Code development method, system, client, server, device and storage medium
CN112667202A (en) Software design method and device combining MDA (model-driven architecture) and BPMN (Business Process management)
CN113032709B (en) Information model setting method, device, equipment and storage medium
CN113504912B (en) Real-time task processing method and device, storage medium and electronic device
CN112799638B (en) Non-invasive rapid development method, platform, terminal and storage medium
CN116521686B (en) Dynamic data table processing method, device, computer equipment and storage medium

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