Intelligent auxiliary tool for standardized programming and working method thereof
Technical Field
The invention relates to the technical field of software systems for auxiliary programming, in particular to an intelligent auxiliary tool for standardized programming and a working method thereof.
Background
Since the 90 s of the last century, the rapid development of the IT industry, especially the rapid development of the Internet and the mobile Internet in the last decade, has driven the increasing innovation of the IT technology; programming languages such as C, C + +, Java, Python and the like, programming frameworks such as Spring, Spring boot, Spring cloud and the like, open source codes GitHub, Gitee and the like, and intelligent programming products such as OutSystems, Powerapps, AppMaker, Tencent LowCode, Ali Yituo and the like; however, the rapid development of IT technology does not solve the constant disadvantages of IT industry: standardized programming problems.
Programmers in the IT industry still follow an inherent growth trajectory: receiving programmed theoretical learning in a campus, strengthening learning through a training institution, entering an enterprise for groping, and trying in projects; the novice programmer differs from the ancestors only in that the ancestors learn C + +, while he learns Python; the coding habit of each programmer is derived from respective learning approaches and code segments acquired by a search engine; novice programmers almost repeatedly step in holes for mistakes made by their predecessors; even with the ever irregular programming style of predecessors, novice programmers are almost reappearing to another modality.
The industry has tried many ways to solve this problem, including and not limited to the following:
1. and (3) encoding specification: the method comprises the following steps of (1) establishing a detailed coding specification, requiring a programmer to follow, wherein the specification can be restricted in a limited range on one hand, and the specification is different in comprehension and execution capacity and poor in effect on the other hand;
2. a management system: a strict management system is established by matching with the mode 1, but the effect of the method completely depends on an executor, and the effect is poor;
3. and (3) framework separation: the architecture is decoupled, functions are packaged into components, the component implementation and the component calling are split into different teams for doing, however, when the number of the components is increased, the management cost is extremely high, the application effects are different, and the effects are not ideal;
4. low code development platform: by developing platform mask coding details, programmers are less and less written with code, but the method only enables less and less programmers to write programs.
In summary, the standardized programming problem has not been solved, which brings about many effects:
(1) the programmer repeatedly makes mistakes, and the project cost is high;
(2) the programming style is various, and the maintenance cost is high;
(3) the programmer is disjointed in learning and use, the learning difficulty is high, the growth is slow, and a huge gap exists between school enterprises.
Disclosure of Invention
The present invention is directed to solving the above-mentioned problems of the prior art, and therefore, an object of the present invention is to provide an intelligent assistant tool and a working method thereof, which enable a programmer to quickly learn the standardized programming mode of ancestors, reduce the programming cost, integrate learning and use, and quickly and greatly improve the efficiency of standardized programming.
The technical scheme for solving the technical problems is as follows: the utility model provides an intelligent appurtenance of standardized programming, includes basic technical architecture module, subassembly library module, intelligent programming assistant module and application course module, the subassembly of each framework is found based on basic technical architecture module to subassembly library module, intelligent programming assistant module is user interaction window, and the user passes through intelligent programming assistant obtains standardized code, application course module includes multiple application study course.
Preferably, the intelligent programming assistant module comprises a project management module, a base table mapping module, an interface API design and management module, a page visualization designer and an online preview module.
Preferably, the project management module includes project information setting and business function developed according to project management, the project information setting includes project basic information and data source setting, the project basic information includes project name, project english name, project Icon, project type, project description and project label, the data source setting includes data source type, host name/IP, user name, password, database port and database of setting project, connection test is performed after filling, and configuration information is stored after the connection test is passed; in the later development, the user can directly connect with the configured project database through a client connection tool, and reads data information to rapidly configure the required business function.
Preferably, the base table mapping module is a database capable of mapping the programmer's specification, and the user realizes a connection channel between an online programming assistant tool and a programmer's local database through a client.
Preferably, the interface API design and management module is a module capable of configuring an interface path and name, an interface description, an interface request type, an interface action, a request parameter, a response parameter, and a data model, when the request parameter and the response parameter are configured, fields of a library table are quickly selected as parameters through a library table mapping module, an interface code is automatically generated according to the information, main interface protocol information is generated, a programmer copies the information into an interface protocol configuration to quickly complete a configuration description of an interface protocol, for a data table operation interface which cannot be realized by a single table interface, SQL statements are directly modified in a generated XML file to complete processing of complex logic, and a publishing tool is provided to quickly publish locally, the programmer can initiate a test through a postman tool, and an entry for interface query is also provided, the programmer can inquire according to the directory structure of the interface or the required interface according to the specified page, and can check the detailed information of the interface by checking the details of the interface, including the name, the request address, the service logic, the request parameter and the return parameter of the interface.
Preferably, the page visualization designer comprises a page management module, a component library, a self-defined component, a page template module, a page designer module and a preview and code generation module, wherein the page management module is a tree management page directory and can rapidly create a PC page, create a sub-page and modify and delete a page, the component library comprises a basic component, a chart component library and a self-defined component, the basic component integrates a third-party framework, such as the common component usage of Element-ui and uViewi, the chart component library integrates various common charts and can rapidly design various items of statistical analysis and map navigation, the self-defined component abstracts and summarizes some common functions according to the characteristics of common services and encapsulates the common functions into a component mode for other pages to use, the page template automatically stores a page designed by a user as a template for the designer, other pages can be introduced and used quickly, the page designer is designed for a drag-and-drop component, and the preview and code generation is a module which can be clicked and operated by a user at any time to preview a real effect.
Preferably, the online preview module comprises an online construction and preview module, a code generation and download module, an interface document generation and download module and a database document generation and download module, after the configuration of the online construction and preview module project is completed, the online construction function of the project can directly generate the running service of the project, a programmer can directly preview the configured function effect online, the code generation and download module automatically generates source codes without any encapsulation according to the service rule configured by the user and provides the source codes for the user, the interface document generation and download module supports the interface document of the project generated by one key and can download and view the interface document, and the database document generation and download module supports the database document of the project generated by one key and can download and view the database document.
Preferably, the basic technology architecture module comprises a front-end and back-end separation architecture of mainstream in the industry, wherein a VUE + HTML5 framework is adopted for a front-end WEB, an uni-APP framework is adopted for a front-end APP, and a spring cloud micro-service framework of J2EE is adopted for a back-end.
Preferably, the component library module is applied to the front end and comprises a basic component, a chart component and a custom component, the basic component integrates common component usage of a third-party framework such as Element-ui and uView, the chart component library integrates various common charts and can rapidly design various items of statistical analysis and map navigation, and the custom component summarizes and refines some common functions according to the characteristics of common services and packages the common functions into a component for other pages to use.
Preferably, the application course needs to fully consider the ability level and the learning effect of a user, the application course firstly needs to go from shallow to deep, guide a novice to quickly go up, understand and master basic development tools and operation principles, and therefore, the application course needs to be explained in aspects of environment installation, engineering operation, naming specifications, programming common skills, example explanation and the like; secondly, considering that the technical knowledge points are numerous, programmers are often confused about learning the knowledge points but do not know how to use, so that the application courses need to be capable of segmenting the technical knowledge points, recombining the technical knowledge points from the application perspective, displaying the technical knowledge points in a topological mode, deepening the technical knowledge points step by step, and carrying out example explanation in seamless combination with project source codes, and the programmers can search and learn as required and learn while learning.
The working method of the standardized programming intelligent auxiliary tool is also provided, and comprises the following steps:
(1) a programmer acquires project requirements and performs requirement analysis and library table design;
(2) the programmer creates projects through the project management module function and establishes base table connection;
(3) a programmer establishes base table mapping according to business requirements;
(4) defining an interface and generating an interface code through a tool;
(5) designing a page required by a service through a page visualization designer, and automatically generating a source code;
(6) previewing the function effect through an online previewing module, and downloading a source code into a local project;
(7) the programmer grasps the operation principle of the generated source code through the application course module;
(8) and the programmer performs necessary modification and adjustment on the source code according to the requirements of the service.
The beneficial effect who adopts above-mentioned scheme is: the invention absorbs the advantages of a low-code platform, greatly reduces the capability requirement of developers and greatly improves the efficiency; and the source code in the standard format is provided for the developer, so that the time cost and the money cost of a development program are reduced, the development platform is a good teacher's friend who grows and progresses quickly, the developer can generate the source code quickly by the aid of the platform, can learn the standardized programming mode of the elder generation quickly by the platform, and the development platform is expected to be widely popularized and used in the market.
Drawings
FIG. 1 is a schematic diagram of an intelligent aid for standardized programming according to the present invention;
FIG. 2 is a schematic diagram of an intelligent programming assistant module according to the present invention;
FIG. 3 is a flowchart illustrating the operation of a standardized programming intelligent aid of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1 and fig. 2, an intelligent aid tool for standardized programming includes an infrastructure module, a component library module, an intelligent programming assistant module, and an application course module, where the component library module constructs a component library of each architecture based on the infrastructure module, the intelligent programming assistant module is a user interaction window, and a user obtains a standardized code through the intelligent programming assistant, and the application course module includes multiple application learning courses.
The intelligent programming assistant module comprises a project management module, a base table mapping module, an interface API design and management module, a page visualization designer and an online preview module.
The project management module comprises project information setting and business functions developed according to project management, wherein the project information setting comprises project basic information and data source setting, the project basic information comprises a project name, a project English name, a project Icon, a project type, a project description and a project label, the data source setting comprises a data source type, a host name/IP, a user name, a password, a database port and a database of a set project, connection testing is carried out after filling, and configuration information is stored after the connection testing is passed; in the later development, the user can directly connect with the configured project database through a client connection tool, and reads data information to rapidly configure the required business function.
Wherein, the base table mapping module is a database which can be assigned by a mapping programmer, a user realizes a connection channel between an online programming assistant tool and a local database of the programmer through a client, the interface API design and management module is a module which can configure an interface path and name, interface description, an interface request type, an interface action, a request parameter, a response parameter and a data model, when the request parameter and the response parameter are configured, fields of a base table are quickly selected as parameters through the base table mapping module, codes of an interface are automatically generated according to the information, main interface protocol information is generated, the programmer copies the information into interface protocol configuration, configuration description of an interface protocol can be quickly completed, SQL statements can be directly modified in a generated XML file for a data table operation interface which can not be realized by a single-table interface, therefore, the processing of complex logic is completed, a publishing tool is also provided, the publishing tool can be published quickly in the local, a programmer can initiate a test through a postman tool, an interface query entry is also provided, the programmer can query according to a directory structure of the interface and can also query a required interface according to a specified page, and the interface detailed information including the name, the request address, the business logic, the request parameter and the return parameter of the interface can be viewed by viewing the interface details.
The page visualization designer comprises a page management module, a component library module, a self-defined component module, a page template module, a page designer module and a preview and code generation module, wherein the page management module is a tree management page directory and can rapidly create a PC page, create a sub-page and modify and delete a page, the component library module comprises a basic component, a chart component library and a self-defined component, the basic component integrates a third-party framework, such as the common component usage of Element-ui and uViewi, such as an input box, a text field, a single selection, a multiple selection, a drop-down box, a drop-down tree and the like, the chart component library integrates various common charts, can rapidly design various statistical analysis and map navigation items, such as various common charts of integration broken line graphs, column graphs, bar graphs, pie graphs, ring graphs, topographic maps, high-grade maps, Baidu maps and the like, and the self-defined component module can rapidly design various common charts, summarizing and abstracting some common functions, packaging the functions into components for other pages to use, providing a calling method for a custom component, providing all source codes of the components, automatically storing the user-designed pages as templates for a designer, and quickly introducing and using other pages, so that the modular, modular and reusable programming ideas of developers are fully met, the page designer is designed for a dragging type component, supports copying, pasting and cutting to any position, has a powerful shortcut key processing center, and sets each common operation as a shortcut key to greatly improve the efficiency of designers; the canvas, the attribute setting panel, the event panel and the style design panel can be dragged, and the designer supports full screen, clearing, canceling, redoing and the like; the method has the advantages that the method supports life cycle, project resource management and class style (less/css), a user drags a component to enter a designer, an attribute setting panel appears on the right side, component attributes can be set conveniently and rapidly, the state of the component can be changed in real time, a style editor comprises simple attributes and high-level attributes, common styles can be set by clicking quickly, meanwhile, manual style rewriting is supported, previewing and code generating are modules which can be operated by clicking at any time by the user to preview real effects, the designer can directly render the design of the user into a real project, and the obtained result is obtained without waiting; the method can automatically generate simplified and efficient source codes and provide the source codes for a user to download.
The online preview module comprises an online construction and preview module, a code generation and download module, an interface document generation and download module and a database document generation and download module, after the configuration of the online construction and preview module project is completed, the operation service of the project can be directly generated through the project online construction function, a programmer can directly preview the configured function effect online, the code generation and download module automatically generates source codes without any package according to the service rule configured by a user, the code generation is based on a basic technical framework module, and a technical framework of main flow in the industry is extracted through the basic technical framework module, such as a J2EE micro service framework based on SSM and a front-end page framework based on vue + elementui. The basic technology framework module not only provides various technical systems, but also comprises related basic functions, is an executable source code project without service functions, is provided for users to use, supports the interface document of the one-key generated project, supports doc/pdf and can be downloaded and viewed, and supports the database document of the one-key generated project, supports doc/pdf and can be downloaded and viewed.
The basic technology architecture module comprises a front-end and back-end separation architecture of main flow in the industry, a VUE + HTML5 framework is adopted for front-end WEB, an uni-APP framework is adopted for front-end APP, and a J2EE SpringCloud micro-service framework is adopted for back-end.
The module library module is used for front-end application and comprises a basic module, a chart module and a custom module, the basic module integrates common component usage of a third-party framework such as Element-ui and uView, the chart module library integrates various common charts, various statistical analysis and map navigation projects can be rapidly designed, and the custom module summarizes and refines some common functions according to the characteristics of common services and packages the common functions into modules for other pages to use.
The application course needs to fully consider the capability level and the learning effect of a user, firstly, the application course needs to go from shallow to deep, guide a novice to quickly go to the home, understand and master basic development tools and operation principles, and therefore, the application course needs to be explained in aspects of environment installation, engineering operation, naming specifications, programming common skills, example explanation and the like; secondly, considering that the technical knowledge points are numerous, programmers are often confused about learning the knowledge points but do not know how to use, so that the application courses need to be capable of segmenting the technical knowledge points, recombining the technical knowledge points from the application perspective, displaying the technical knowledge points in a topological mode, deepening the technical knowledge points step by step, and carrying out example explanation in seamless combination with project source codes, and the programmers can search and learn as required and learn while learning.
As shown in fig. 3, there is also provided a working method of the standardized programming intelligent auxiliary tool, which comprises the following steps:
(1) a programmer acquires project requirements and performs requirement analysis and library table design;
(2) the programmer creates projects through the project management module function and establishes base table connection;
(3) a programmer establishes base table mapping according to business requirements;
(4) defining an interface and generating an interface code through a tool;
(5) designing a page required by a service through a page visualization designer, and automatically generating a source code;
(6) previewing the function effect through an online previewing module, and downloading a source code into a local project;
(7) the programmer grasps the operation principle of the generated source code through the application course module;
(8) and the programmer performs necessary modification and adjustment on the source code according to the requirements of the service.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.