[go: up one dir, main page]

CN111078205A - A modular programming method, device, storage medium and electronic device - Google Patents

A modular programming method, device, storage medium and electronic device Download PDF

Info

Publication number
CN111078205A
CN111078205A CN201911158099.7A CN201911158099A CN111078205A CN 111078205 A CN111078205 A CN 111078205A CN 201911158099 A CN201911158099 A CN 201911158099A CN 111078205 A CN111078205 A CN 111078205A
Authority
CN
China
Prior art keywords
database table
program
database
field data
program module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911158099.7A
Other languages
Chinese (zh)
Other versions
CN111078205B (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.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian 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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN201911158099.7A priority Critical patent/CN111078205B/en
Publication of CN111078205A publication Critical patent/CN111078205A/en
Application granted granted Critical
Publication of CN111078205B publication Critical patent/CN111078205B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

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

Abstract

本发明公开了一种模块化编程方法、装置、存储介质及电子设备,其中方法包括:获取数据库表和业务需求;创建预设程序模块,在所述预设程序模块中,确定与所述业务需求相对应的基础程序;根据所述数据库表中的字段数据更新所述各程序模块中的所述基础程序,生成目标程序。基于上述技术方案,目标程序的开发人员只需求完成数据库表的设计,即可基于数据库表一键生成目标程序,减少开发者的代码编写,提高了基础程序的复用以及开发效率。

Figure 201911158099

The invention discloses a modular programming method, device, storage medium and electronic equipment, wherein the method includes: acquiring a database table and business requirements; creating a preset program module, in which the preset program module is determined and the business The basic program corresponding to the demand; the basic program in each program module is updated according to the field data in the database table, and the target program is generated. Based on the above technical solutions, the target program developer only needs to complete the design of the database table, and then the target program can be generated based on the database table with one click, which reduces the code writing of the developer and improves the reuse and development efficiency of the basic program.

Figure 201911158099

Description

Modular programming method and device, storage medium and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a modular programming method, a modular programming device, a storage medium and electronic equipment.
Background
With the continuous development of computer technology, JAVA technology becomes an important technology for project development. For conventional Java project development, background codes are designed by using a layered architecture, and a plurality of open-source frameworks need to be integrated due to the fact that the project is designed by using a layered structure; common background frames are integrated based on SpringBoot + Spring + SpringMVC + Mybatis, the Spring provides a container to realize management and dependence injection of Javabean, the SpringMVC provides a Web request interface, and the MyBatis provides operation on a database.
However, in the development process of the Java project, the code needs to be written manually by a developer, which causes a large workload and low development efficiency.
Disclosure of Invention
The invention provides an invention name, and aims to realize a modular programming method, a device, a storage medium and electronic equipment.
In a first aspect, an embodiment of the present invention provides a modular programming method, including:
acquiring a database table and service requirements;
creating a preset program module, and determining a basic program corresponding to the service requirement in the preset program module;
and updating the basic program in each program module according to the field data in the database table to generate a target program.
In a second aspect, an embodiment of the present invention further provides a modular programming apparatus, including:
the database table acquisition module is used for acquiring a database table and service requirements;
a preset program module creating module for creating a preset program module in which a basic program corresponding to the service demand is determined;
and the target program generation module is used for updating the basic program in each program module according to the field data in the database table to generate a target program.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement a modular programming method according to any embodiment of the present invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, where the computer-executable instructions, when executed by a computer processor, implement a modular programming method as provided in any of the embodiments of the present invention.
According to the technical scheme, the database table containing the field data and the service requirement of the target program are obtained, the preset program module in the electronic equipment is called, the basic program corresponding to the service requirement in the preset program module is determined, and the target program capable of meeting the service requirement is generated by adding the field data in the database table to the corresponding position of the basic program in each preset program module. Based on the technical scheme, developers of the target program only need to complete the design of the database table, and the target program can be generated based on the database table by one key, so that code writing of developers is reduced, and multiplexing and development efficiency of basic programs are improved.
Drawings
Fig. 1 is a schematic flowchart of a modular programming method according to an embodiment of the present invention;
FIG. 2 is a diagram of a database table according to an embodiment of the present invention;
FIG. 3 is a diagram of a created default program module according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a modular programming apparatus according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flowchart of a modular programming method according to an embodiment of the present invention, where the present embodiment is applicable to a case of implementing fast programming, and the method may be executed by a modular programming apparatus according to an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner, and the method specifically includes the following steps:
and S110, acquiring a database table and a service requirement.
S120, creating a preset program module, and determining a basic program corresponding to the service requirement in the preset program module.
And S130, updating the basic program in each program module according to the field data in the database table to generate a target program.
In this embodiment, modular programming is performed in a Spring boot + Spring mvc + Mybatis framework. The target program automatically generated based on the modular programming method is suitable for creating a table with specific functions for storing data in a database.
The database table is a table set according to business requirements, and includes data fields required for generating an object program, for example, refer to fig. 2, and fig. 2 is a schematic diagram of a database table provided in an embodiment of the present invention. As can be seen from fig. 2, the database table includes fields "user CID", "name", "age", and "creation time", and description information of each field.
The database table may be stored locally, may be input externally, or may be generated based on parameters input externally. Optionally, the obtaining a database table includes: acquiring creation parameters of a database table, and creating the database table in the database according to the creation parameters of the database table, wherein the creation parameters of the database table comprise a database table name and field contents in the database. In this embodiment, after the creation parameter of the database table is obtained, according to the database table creation instruction, the database table creation statement is called, the creation statement is executed, and the database table is created. Specifically, a first table creation statement corresponding to the database table name is called and executed, and an initial database table is created in the database; and calling and executing a second table creation statement corresponding to the field content, adding field data corresponding to the field content in the initial database table, and generating a database table.
Illustratively, the SQL statement (Structured Query Language) that creates a database table may be:
create table TB_USERINFO
(
user_cid VARCHAR2(100),
name VARCHAR2(100),
age VARCHAR2(100),
create_time DATE
);
--Add comments to the columns
comment on column TB_USERINFO.user_cid
is 'user CID';
comment on column TB_USERINFO.name
is 'name';
comment on column TB_USERINFO.age
is 'age';
comment on column TB_USERINFO.create_time
is 'creation time';
executing the above create statement can result in a database table as shown in fig. 2. Wherein the name of the database table is TB _ USERNINFO. Where the name of a database table includes a prefix and a table name, and is separated by an underline, if the table name includes multiple words, the words are separated by an underline, for example, the name in fig. 2 is USERINFO.
In this embodiment, the service requirement is a function of a table created in the database, and may be, for example, an addition function, a deletion function, a modification function, a search function, and the like. In some embodiments, business requirements may include, but are not limited to, page turning, paging queries, data checking, view details, add/modify page turning, data saving, data updating, data deletion, data export, and the like.
After the database table and the service requirement are obtained, a target program generating instruction is received, and a preset program module is created according to the target program generating instruction. The target program generation instruction may be input by an operator through a key, a virtual control, a touch gesture, or voice. Optionally, the preset program module includes: the system comprises a data block access object DAO layer, an interface service action layer, a database entity bean layer, a configuration file config layer and a service logic service layer, wherein the preset program modules are configured with at least one basic program, and a dependency relationship is set among the preset program modules. The DAO layer is an object-oriented database interface and is arranged between the business logic layer and the database resources. The database entity bean layer is used for storing entity classes, the configuration file config layer is used for storing mapping files of mybatis, operation functions based on addition, deletion, modification, checking and the like are defined in the mapping files of the mybatis, and for example, see table 1, where table 1 is the operation function defined in the mapping files of the mybatis. The service layer of the service logic comprises service processing logic, and the interface service action layer is used for providing a data interface with the outside.
Figure BDA0002285347040000061
The method comprises the steps of creating preset program modules according to target program generation instructions, and generating names of the preset program modules, wherein the names of the preset program modules are determined according to table names of a database table. Illustratively, the table name of the database table in fig. 2 is USERINFO, and the name of the DAO layer of the data block access object and the name of the bean layer of the database entity may be the same as the table name of the database table, for example, USERINFO; the naming mode of the configuration file config layer is as follows: xml, the database type _ JavaBean class name _ mapper, which may be, for example: xml, wherein the name of the JavaBean class is the name of a bean layer of the database entity; the naming mode of the Service layer of the Service logic is class name + Service, wherein the class name is the same as the table name of the database table, and can be illustratively UserInfoservice; the interface service Action layer is named by JavaBean class name + Action, which can be UserInfoaction as an example. In this embodiment, names of the preset program modules are generated according to the table name of the database table, so that the mapping relationship between the preset program modules is reduced. Illustratively, referring to fig. 3, fig. 3 is a schematic diagram of a created preset program module according to an embodiment of the present invention.
Optionally, the attribute names in the database entity bean layer and the field names of the database table are kept the same, and the fields in the database entity bean layer and the fields of the database table are kept the same, so as to reduce the configuration of field mapping in the mapping file of mybatis.
In this embodiment, each preset program module is configured with at least one basic program, and the basic program adapted to the current service can be determined according to the current service requirement. Optionally, the interface service action layer and the configuration file config layer respectively include a plurality of basic programs, where each basic program corresponds to an operation action of a different database, that is, a service requirement, and the interface service action layer may illustratively include but is not limited to a page turning program, a paging query program, a data verification program, a detail viewing program, a newly added/modified page turning program, a data saving program, a data updating program, a data deleting program, and a data exporting program. Taking the page turning program as an example, the following steps can be taken:
@RequestMapping(“/{pageName}”)
Public String index(@PathVeriable(“pageName”)String pageName,UserInfobean)
and determining to call in a basic program stored in the electronic equipment according to the service requirement input from the outside, and generating a preset program module.
In this embodiment, the generated target program is a JAVA program, and accordingly, a field in the database table needs to be converted into a JAVA attribute field. Optionally, after the database table is obtained, the field data in the database table is read, and the field data in the database table is converted into JAVA attribute field data based on the mapping relationship between the table field and the JAVA attribute field. The field data may be read from the database table by calling a data reading statement and executing the data reading statement, and the data reading statement may be, for example:
SELECT*FROM(SELECT COLUMN_NAME,COMMENTS FROM USER_COL_COMMENTS CWHERE C.TABLE_NAME='TB_USERINFO')T1 LEFT JOIN USER_TAB_COLUMNS T ONT.COLUMN_NAME=T1.COLUMN_NAME WHERE T.TABLE_NAME='TB_USERINFO'
the tables user _ tab _ columns and user _ column _ references are database-specific tables for storing fields and field attributes of the database tables.
The electronic device stores a mapping relationship between a table field and a JAVA attribute field, which may be, for example:
Figure BDA0002285347040000081
Figure BDA0002285347040000091
it should be noted that the mapping relationship between the table field and the JAVA attribute field is only an example, and the mapping relationship between the table field and the JAVA attribute field may be edited, such as added, deleted, modified, and the like according to the service requirement.
Optionally, converting field data in the database table into JAVA attribute field data based on a mapping relationship between the table field and the JAVA attribute field, including: determining a conversion statement in a mapping relation between the table field and a JAVA attribute field according to the field attribute of the field data in the database table; and executing the conversion statement, and converting the field data in the database table into JAVA attribute field data. Correspondingly, updating the basic program in each program module according to the field data in the database table includes: and adding the JAVA attribute field data to the basic program in each program module.
Taking a service layer of a service logic as an example, the target program of the service layer generated by adding JAVA attribute field data may be:
Figure BDA0002285347040000092
on the basis of the above embodiment, the preset program module further includes a Web layer, where the Web layer is configured to render the database table on the display interface, establish an association relationship between each preset program module and the Web layer when each preset program module is created, and render the table corresponding to the target program created in the database on the display interface, so as to implement interaction with an operator.
According to the technical scheme of the embodiment, the preset program module in the electronic equipment is called by acquiring the database table containing the field data and the business requirements of the target program, the basic program corresponding to the business requirements in the preset program module is determined, and the target program capable of meeting the business requirements is generated by adding the field data in the database table to the corresponding position of the basic program in each preset program module. Based on the technical scheme, developers of the target program only need to complete the design of the database table, and the target program can be generated based on the database table by one key, so that code writing of developers is reduced, and multiplexing and development efficiency of basic programs are improved.
Example two
Fig. 4 is a schematic structural diagram of a modular programming apparatus according to a second embodiment of the present invention, where the apparatus includes:
a database table obtaining module 210, configured to obtain a database table and service requirements;
a preset program module creating module 220 configured to create a preset program module in which a basic program corresponding to the service requirement is determined;
and the target program generating module 230 is configured to update the basic program in each program module according to the field data in the database table, so as to generate a target program.
Optionally, the database table obtaining module 210 includes:
the creating parameter acquiring unit is used for acquiring creating parameters of the database table;
and the database table creating unit is used for creating a database table in a database according to the creating parameters of the database table, wherein the creating parameters of the database table comprise the name of the database table and the field content in the database.
Optionally, the database table creating unit is configured to:
calling and executing a first table creation statement corresponding to the database table name, and creating an initial database table in a database;
and calling and executing a second table creation statement corresponding to the field content, adding field data corresponding to the field content in the initial database table, and generating a database table.
Alternatively to this, the first and second parts may,
before the updating the basic program in each program module according to the field data in the database table, the method further includes:
the field data reading module is used for reading field data in the database table;
the field conversion module is used for converting the field data in the database table into JAVA attribute field data based on the mapping relation between the table field and the JAVA attribute field;
accordingly, the object generation module 230 is configured to: and adding the JAVA attribute field data to the basic program in each program module.
Optionally, the field conversion module is configured to:
determining a conversion statement in a mapping relation between the table field and a JAVA attribute field according to the field attribute of the field data in the database table;
and executing the conversion statement, and converting the field data in the database table into JAVA attribute field data.
Optionally, the preset program module includes: the system comprises a data block access object DAO layer, an interface service action layer, a database entity bean layer, a configuration file config layer and a service logic service layer, wherein the preset program modules are configured with at least one basic program, and a dependency relationship is set among the preset program modules.
Optionally, the preset program module further includes a Web layer, and the Web layer is configured to render the database table on a display interface.
The modular programming device provided by the embodiment of the invention can execute the modular programming method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the modular programming method.
EXAMPLE III
Fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 5 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 5, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 44 having a set of program modules 46 may be stored, for example, in memory 28, such program modules 46 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 46 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with electronic device 12, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement a modular programming method provided by an embodiment of the present invention, the method including:
acquiring a database table and service requirements;
creating a preset program module, and determining a basic program corresponding to the service requirement in the preset program module;
and updating the basic program in each program module according to the field data in the database table to generate a target program.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement a modular programming method provided by an embodiment of the present invention.
Of course, those skilled in the art will appreciate that the processor may also implement the solution of a modular programming method provided in any of the embodiments of the present invention.
Example four
The fourth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a modular programming method provided in the fourth embodiment of the present invention, where the method includes:
acquiring a database table and service requirements;
creating a preset program module, and determining a basic program corresponding to the service requirement in the preset program module;
and updating the basic program in each program module according to the field data in the database table to generate a target program.
Of course, the computer program stored on the computer-readable storage medium provided by the embodiments of the present invention is not limited to the above method operations, and may also perform related operations in a modular programming method provided by any embodiments of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device.
A computer readable signal medium may include a video clip, feature encoding of a second video, feature encoding of respective video clips, etc., having computer readable program code embodied therein. Such forms of the broadcast video clip, feature encoding of the second video, feature encoding of each video clip, and the like. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It should be noted that, in the embodiment of the video processing apparatus, the modules included in the embodiment are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1.一种模块化编程方法,其特征在于,包括:1. a modular programming method, is characterized in that, comprises: 获取数据库表和业务需求;Get database tables and business requirements; 创建预设程序模块,在所述预设程序模块中,确定与所述业务需求相对应的基础程序;Create a preset program module, and in the preset program module, determine the basic program corresponding to the business requirement; 根据所述数据库表中的字段数据更新所述各程序模块中的所述基础程序,生成目标程序。The basic program in each program module is updated according to the field data in the database table to generate a target program. 2.根据权利要求1所述的方法,其特征在于,所述获取数据库表,包括:2. The method according to claim 1, wherein the acquiring a database table comprises: 获取数据库表的创建参数,根据所述数据库表的创建参数在数据库中创建数据库表,其中,所述数据库表的创建参数包括数据库表名称和数据库中的字段内容。The creation parameters of the database table are acquired, and the database table is created in the database according to the creation parameters of the database table, wherein the creation parameters of the database table include the name of the database table and the field content in the database. 3.根据权利要求2所述的方法,其特征在于,根据所述数据库表的创建参数在数据库中创建数据库表,包括:3. The method according to claim 2, wherein creating a database table in the database according to the creation parameter of the database table, comprising: 调用并执行所述数据库表名称对应的第一创建表语句,在数据库中创建初始数据库表;calling and executing the first creation table statement corresponding to the database table name, and creating an initial database table in the database; 调用并执行所述字段内容对应的第二创建表语句,在所述初始数据库表中添加与所述字段内容对应的字段数据,生成数据库表。The second table creation statement corresponding to the field content is called and executed, and the field data corresponding to the field content is added to the initial database table to generate a database table. 4.根据权利要求1所述的方法,其特征在于,在所述根据所述数据库表中的字段数据更新所述各程序模块中的所述基础程序之前,还包括:4. The method according to claim 1, characterized in that, before updating the basic program in each program module according to the field data in the database table, the method further comprises: 读取所述数据库表中的字段数据;Read field data in the database table; 基于表字段与JAVA属性字段的映射关系,将所述数据库表中的字段数据转换为JAVA属性字段数据;Based on the mapping relationship between table fields and JAVA attribute fields, the field data in the database table is converted into JAVA attribute field data; 相应的,根据所述数据库表中的字段数据更新所述各程序模块中的所述基础程序,包括:Correspondingly, updating the basic program in each program module according to the field data in the database table, including: 将所述JAVA属性字段数据添加至所述各程序模块中的基础程序中。The JAVA attribute field data is added to the basic program in each program module. 5.根据权利要求4所述的方法,其特征在于,基于表字段与JAVA属性字段的映射关系,将所述数据库表中的字段数据转换为JAVA属性字段数据,包括:5. The method according to claim 4, wherein, based on the mapping relationship between table fields and JAVA attribute fields, converting the field data in the database table into JAVA attribute field data, comprising: 根据所述数据库表中的字段数据的字段属性,在所述表字段与JAVA属性字段的映射关系确定转换语句;According to the field attribute of the field data in the database table, determine the conversion statement in the mapping relationship between the table field and the JAVA attribute field; 执行所述转换语句,将所述数据库表中的字段数据转换为JAVA属性字段数据。Execute the conversion statement to convert the field data in the database table into JAVA attribute field data. 6.根据权利要求1-5任一所述的方法,其特征在于,所述预设程序模块包括:数据块访问对象DAO层、接口服务action层、数据库实体bean层、配置文件config层和业务逻辑service层,其中,所述预设程序模块配置有至少一种基础程序,各所述预设程序模块间设置有依赖关系。6. The method according to any one of claims 1-5, wherein the preset program module comprises: a data block access object DAO layer, an interface service action layer, a database entity bean layer, a configuration file config layer and a business The logical service layer, wherein the preset program modules are configured with at least one basic program, and a dependency relationship is set between the preset program modules. 7.根据权利要求6所述的方法,其特征在于,所述预设程序模块还包括Web层,所述Web层用于将所述数据库表在显示界面进行渲染。7 . The method according to claim 6 , wherein the preset program module further comprises a web layer, and the web layer is used for rendering the database table on the display interface. 8 . 8.一种模块化编程装置,其特征在于,包括:8. A modular programming device, comprising: 数据库表获取模块,用于获取数据库表和业务需求;Database table acquisition module for acquiring database tables and business requirements; 预设程序模块创建模块,用于创建预设程序模块,在所述预设程序模块中,确定与所述业务需求相对应的基础程序;a preset program module creation module for creating a preset program module, and in the preset program module, a basic program corresponding to the business requirement is determined; 目标程序生成模块,用于根据所述数据库表中的字段数据更新所述各程序模块中的所述基础程序,生成目标程序。The target program generation module is used for updating the basic program in each program module according to the field data in the database table to generate the target program. 9.一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1-7中任一项所述的一种模块化编程方法。9. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that, when the processor executes the computer program, as in claims 1-7 A modular programming method as described in any one. 10.一种包含计算机可执行指令的存储介质,其特征在于,所述计算机可执行指令在由计算机处理器执行时实现如权利要求1-7中任一项所述的一种模块化编程方法。10. A storage medium comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, implement a modular programming method according to any one of claims 1-7 .
CN201911158099.7A 2019-11-22 2019-11-22 A modular programming method, device, storage medium and electronic equipment Active CN111078205B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911158099.7A CN111078205B (en) 2019-11-22 2019-11-22 A modular programming method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911158099.7A CN111078205B (en) 2019-11-22 2019-11-22 A modular programming method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111078205A true CN111078205A (en) 2020-04-28
CN111078205B CN111078205B (en) 2024-01-26

Family

ID=70311356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911158099.7A Active CN111078205B (en) 2019-11-22 2019-11-22 A modular programming method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111078205B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015429A (en) * 2020-08-21 2020-12-01 杭州指令集智能科技有限公司 Code generation method, device and equipment
CN112114794A (en) * 2020-09-27 2020-12-22 江西宜月鑫网络科技有限公司 Automatic generation method and device of website application program and computer storage medium
CN112612456A (en) * 2020-12-25 2021-04-06 深圳市引力创新科技有限公司 Multi-program systematic management framework and management method
CN112817580A (en) * 2021-01-27 2021-05-18 北京奇艺世纪科技有限公司 Data processing method and device, electronic equipment and storage medium
CN113760242A (en) * 2021-03-09 2021-12-07 北京京东振世信息技术有限公司 Data processing method, device, server and medium
CN114327613A (en) * 2021-12-27 2022-04-12 浙江中控技术股份有限公司 Method, device and equipment for generating function block diagram program and storage medium
CN114816433A (en) * 2022-06-01 2022-07-29 携程旅游网络技术(上海)有限公司 Encoding method, system, device and medium in project based on asynchronous programming
CN115454410A (en) * 2022-08-31 2022-12-09 浪潮通用软件有限公司 Method and device for combining basic models

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677323A (en) * 2015-12-31 2016-06-15 合肥大多数信息科技有限公司 Method for automatically generating database operation layer codes
CN108399130A (en) * 2018-02-28 2018-08-14 平安科技(深圳)有限公司 Method, device and equipment for automatically generating test case and readable storage medium
CN109408043A (en) * 2018-10-19 2019-03-01 中国银行股份有限公司 A kind of program creating method and device
CN109471619A (en) * 2018-11-20 2019-03-15 北京千丁互联科技有限公司 Mybatis code generating method, device and terminal
CN110008232A (en) * 2019-04-11 2019-07-12 北京启迪区块链科技发展有限公司 Generation method, device, server and the medium of structured query sentence
CN110069246A (en) * 2019-03-28 2019-07-30 北京众智益成科技有限公司 The plateform system and its application that a kind of Java Web application is quickly developed
US20190243624A1 (en) * 2018-02-07 2019-08-08 Omron Corporation Method, apparatus and program for generating application program
CN110297838A (en) * 2019-07-04 2019-10-01 珠海金山网络游戏科技有限公司 A kind of landform material edit methods, calculate equipment and storage medium at device
CN114564621A (en) * 2022-03-03 2022-05-31 广联达科技股份有限公司 A method, apparatus, device and readable storage medium for associating data

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677323A (en) * 2015-12-31 2016-06-15 合肥大多数信息科技有限公司 Method for automatically generating database operation layer codes
US20190243624A1 (en) * 2018-02-07 2019-08-08 Omron Corporation Method, apparatus and program for generating application program
CN108399130A (en) * 2018-02-28 2018-08-14 平安科技(深圳)有限公司 Method, device and equipment for automatically generating test case and readable storage medium
CN109408043A (en) * 2018-10-19 2019-03-01 中国银行股份有限公司 A kind of program creating method and device
CN109471619A (en) * 2018-11-20 2019-03-15 北京千丁互联科技有限公司 Mybatis code generating method, device and terminal
CN110069246A (en) * 2019-03-28 2019-07-30 北京众智益成科技有限公司 The plateform system and its application that a kind of Java Web application is quickly developed
CN110008232A (en) * 2019-04-11 2019-07-12 北京启迪区块链科技发展有限公司 Generation method, device, server and the medium of structured query sentence
CN110297838A (en) * 2019-07-04 2019-10-01 珠海金山网络游戏科技有限公司 A kind of landform material edit methods, calculate equipment and storage medium at device
CN114564621A (en) * 2022-03-03 2022-05-31 广联达科技股份有限公司 A method, apparatus, device and readable storage medium for associating data

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
ALIVE_TREE: "一键用数据库脚本生成数据库表", pages 1, Retrieved from the Internet <URL:https://blog.csdn.net/Alive_tree/article/details/86579218> *
HD MOORE: "Six Ways to automate metasploit", pages 1, Retrieved from the Internet <URL:https://www.rapid7.com/blog/post/2011/12/08/six-ways-to-automate-metasploit/> *
JAVASHUO: "基于数据库的代码自动生成工具,生成JavaBean、生成数据库文档、生成先后端代码等(v6.6.6版)", pages 1 *
WUZHANGWEISS: "自动生成代码工具类", pages 1 *
夏云龙: "基于模板的代码自动生成系统的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 6, pages 138 - 224 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015429A (en) * 2020-08-21 2020-12-01 杭州指令集智能科技有限公司 Code generation method, device and equipment
CN112015429B (en) * 2020-08-21 2023-08-04 杭州指令集智能科技有限公司 Code generation method, device and equipment
CN112114794A (en) * 2020-09-27 2020-12-22 江西宜月鑫网络科技有限公司 Automatic generation method and device of website application program and computer storage medium
CN112114794B (en) * 2020-09-27 2021-11-09 深圳天玑数据有限公司 Automatic generation method and device of website application program and computer storage medium
CN112612456A (en) * 2020-12-25 2021-04-06 深圳市引力创新科技有限公司 Multi-program systematic management framework and management method
CN112817580A (en) * 2021-01-27 2021-05-18 北京奇艺世纪科技有限公司 Data processing method and device, electronic equipment and storage medium
CN112817580B (en) * 2021-01-27 2023-09-01 北京奇艺世纪科技有限公司 Data processing method and device, electronic equipment and storage medium
CN113760242A (en) * 2021-03-09 2021-12-07 北京京东振世信息技术有限公司 Data processing method, device, server and medium
CN113760242B (en) * 2021-03-09 2024-08-16 北京京东振世信息技术有限公司 Data processing method, device, server and medium
CN114327613A (en) * 2021-12-27 2022-04-12 浙江中控技术股份有限公司 Method, device and equipment for generating function block diagram program and storage medium
CN114816433A (en) * 2022-06-01 2022-07-29 携程旅游网络技术(上海)有限公司 Encoding method, system, device and medium in project based on asynchronous programming
CN115454410A (en) * 2022-08-31 2022-12-09 浪潮通用软件有限公司 Method and device for combining basic models

Also Published As

Publication number Publication date
CN111078205B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
CN111078205B (en) A modular programming method, device, storage medium and electronic equipment
US10324909B2 (en) Omega names: name generation and derivation utilizing nested three or more attributes
CN107402992B (en) Distributed NewSQL database system and full-text retrieval establishing method
US9146955B2 (en) In-memory, columnar database multidimensional analytical view integration
US8751437B2 (en) Single persistence implementation of business objects
US9208212B2 (en) Field extensibility in a multi-tenant environment with columnar database support
WO2021179722A1 (en) Sql statement parsing method and system, and computer device and storage medium
TWI412945B (en) Retrieving and persisting objects from/to relational databases
CA3089289C (en) System and methods for loading objects from hash chains
US9483508B1 (en) Omega names: name generation and derivation
CN103942281A (en) Method and device for operating object persistently stored
CN113761040A (en) Database and application program bidirectional mapping method, device, medium and program product
CN115617797A (en) A method for dynamically expanding business metadata fields, electronic equipment, and storage medium
US20140114916A1 (en) Code generation and implementation method, system, and storage medium for delivering bidirectional data aggregation and updates
CN118628031A (en) A data management system and method for a low-code platform
CN113448995A (en) Database operation method, device and system, electronic equipment and storage medium
CN119847534B (en) Modelica model compilation method, device, equipment and storage medium
US8818955B2 (en) Reducing storage costs associated with backing up a database
CN116302219A (en) A data flow batch processing method, device, equipment and medium
CN116069755A (en) mapper file processing method and related equipment
CN115794858A (en) Query statement processing method, device, equipment and storage medium
CN113687881A (en) Metadata calling method and device, electronic equipment and storage medium
CN113609318B (en) A graph data processing method, device, electronic device and storage medium
CN118467503A (en) Database object migration method, apparatus, device, medium and program product
CN119782329A (en) A view processing method, storage medium and device

Legal Events

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

Effective date of registration: 20251217

Granted publication date: 20240126

PP01 Preservation of patent right