CN111078205B - Modularized programming method and device, storage medium and electronic equipment - Google Patents

Modularized programming method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111078205B
CN111078205B CN201911158099.7A CN201911158099A CN111078205B CN 111078205 B CN111078205 B CN 111078205B CN 201911158099 A CN201911158099 A CN 201911158099A CN 111078205 B CN111078205 B CN 111078205B
Authority
CN
China
Prior art keywords
database table
database
field data
preset program
field
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
CN201911158099.7A
Other languages
Chinese (zh)
Other versions
CN111078205A (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

Classifications

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

Landscapes

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

Abstract

The invention discloses a modularized programming method, a modularized programming device, a storage medium and electronic equipment, wherein the modularized programming method comprises the following steps: 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 field data in the database table to generate a target program. Based on the technical scheme, the developer of the target program can generate the target program based on one key of the database table only by completing the design of the database table, so that the code writing of the developer is reduced, and the multiplexing and development efficiency of the basic program are improved.

Description

Modularized 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 modularized programming method, a modularized programming device, a modularized programming storage medium and an electronic device.
Background
With the continuous development of computer technology, JAVA technology is an important technology for project development. For conventional Java project development, the background code uses a layered architecture design, and a plurality of open source frames are required to be integrated because the project adopts a layered structure design; the common background framework is based on SpringBoot, spring MVC and MyBatis integration, spring provides a container, management and dependency injection of Javabeans are realized, spring MVC provides a request interface of Web, and MyBatis provides operation on a database.
However, in the development process of the Java project, the code needs to be written and realized manually by a developer, so that the workload is large and the development efficiency is low.
Disclosure of Invention
The invention provides an invention name for realizing a modularized programming method, a modularized programming 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 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;
the preset program module creation module is used for creating a preset program module, and a basic program corresponding to the service requirement is determined in the preset program module;
and the target program generating 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, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, where the processor implements a modular programming method as provided in any embodiment of the present invention when the processor executes the computer program.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, implement a modular programming method as provided by any of the embodiments of the present invention.
According to the technical scheme, the business requirements of the database table containing the field data and the target program are acquired, the preset program modules in the electronic equipment are called, basic programs corresponding to the business requirements in the preset program modules are 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 positions of the basic programs in the preset program modules. Based on the technical scheme, the developer of the target program can generate the target program based on one key of the database table only by completing the design of the database table, so that the code writing of the developer is reduced, and the multiplexing and development efficiency of the basic program are improved.
Drawings
FIG. 1 is a flow chart of a modular programming method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a database table according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a created preset program module provided by an embodiment of the present invention;
FIG. 4 is a schematic 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 invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flow chart of a modular programming method according to an embodiment of the present invention, where the embodiment is applicable to a case of implementing fast programming, the method may be implemented by a modular programming apparatus according to an embodiment of the present invention, and the apparatus may be implemented in a software and/or hardware manner, and the method specifically includes the following steps:
s110, acquiring a database table and service requirements.
S120, creating a preset program module, and determining a basic program corresponding to the service requirement in the preset program module.
S130, updating the basic program in each program module according to field data in the database table to generate a target program.
In this embodiment, the modular programming is performed under the SpringBoot+spring+SpringMVC+Mybatis framework. The object program automatically generated based on the modularized programming method is suitable for creating a table with specific functions and used for storing data in a database.
The database table is a table set according to service requirements, and includes data fields required for generating a target program, and referring to fig. 2, fig. 2 is an exemplary schematic diagram of a database table according to 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 the database table includes: and acquiring creation parameters of a database table, and creating the database table in a database according to the creation parameters of the database table, wherein the creation parameters of the database table comprise database table names and field contents in the database. In this embodiment, after the creation parameters of the database table are obtained, the database table creation statement is called according to the database table creation instruction, the creation statement is executed, and the database table is created. Specifically, a first creating table statement corresponding to the database table name is called and executed, and an initial database table is created in a database; and calling and executing a second creation table statement corresponding to the field content, and adding field data corresponding to the field content into the initial database table to generate a database table.
Illustratively, the SQL statement (Structured Query Language, structured query statement) that creates the 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 creation statement described above, a database table as shown in fig. 2 can be obtained. The name of the database table is TB_USERINFO. Where the database table names include prefixes and table names and are separated by an underline, if the table names include multiple words, the words are separated by an underline, e.g., the table name in fig. 2 is USERINFO.
In this embodiment, the service requirement is a function of a table created in the database, for example, the functions of adding, deleting, changing, checking, and the like. In some embodiments, the business requirements may include, but are not limited to, page shuffling, paging queries, data verification, viewing details, adding/modifying pages for shuffling, data saving, data updating, data deletion, data exporting, and the like.
After the database table and the business requirement are acquired, receiving a target program generation instruction, and creating a preset program module according to the target program generation instruction. The target program generation instruction may be input by an operator through a manner of buttons, virtual controls, touch gestures or voices, and the like. 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 business logic service layer, wherein at least one basic program is configured in the preset program modules, and a dependency relationship is arranged among the preset program modules. The data block access object DAO layer is an object-oriented database interface and is arranged between the service logic layer and the database resource. The database entity bean layer is used for storing entity classes, the configuration file config layer is used for storing mapping files of mybatis, the mapping files of mybatis define basic operation functions of adding, deleting, modifying, searching and the like, and for example, see table 1, table 1 is the operation functions defined in the mapping files of mybatis. The business logic service layer comprises business processing logic, and the interface service action layer is used for providing a data interface with the outside.
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: database type_javabean class name_mapper. Xml, which may be exemplary: oracle_userinfo_mapper. Xml where the JavaBean class name is the name of the database entity bean layer; the naming mode of the Service layer is class name+service, wherein the class name is the same as the table name of the database table, and can be exemplified by userlinfoservice; the naming mode of the interface service Action layer is java bean class name+action, which may be UserInfoAction, for example. In this embodiment, names of the preset program modules are generated according to table names of the database tables, so that mapping relations among the preset program modules are reduced. 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 name in the database entity bean layer and the field name of the database table are kept the same, and the field in the database entity bean layer and the field 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 can determine a basic program adapted to a current service according to a 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 exemplary interface service action layers may include, but are not limited to, a page transferring program, a paging query program, a data checking program, a view detail program, an add/modify transferring page program, a data saving program, a data updating program, a data deleting program, and a data exporting program. Taking page transfer procedure as an example, it may be:
@RequestMapping(“/{pageName}”)
Public String index(@PathVeriable(“pageName”)String pageName,UserInfo bean)
and determining to call in a basic program stored in the electronic equipment according to the externally input service requirement, and generating a preset program module.
In this embodiment, the generated target program is a JAVA program, and accordingly, the fields in the database table need to be converted into JAVA attribute fields. Optionally, after the database table is obtained, reading field data in the database table, and converting the field data in the database table into JAVA attribute field data based on a mapping relation between a table field and a JAVA attribute field. Wherein, the data reading statement is executed by calling the data reading statement, and the data reading statement can be exemplified by:
SELECT*FROM(SELECT COLUMN_NAME,COMMENTS FROM USER_COL_COMMENTS C WHERE C.TABLE_NAME='TB_USERINFO')T1 LEFT JOIN USER_TAB_COLUMNS T ON T.COLUMN_NAME=T1.COLUMN_NAME WHERE T.TABLE_NAME='TB_USERINFO'
wherein the tables user_tab_columns, user_col_packets are database-specific tables for storing fields of database tables and field attributes.
The mapping relation between the table field and the JAVA attribute field is stored in the electronic device, and may be exemplified by:
it should be noted that, the mapping relationship between the table field and the JAVA attribute field is merely an example, and the mapping relationship between the table field and the JAVA attribute field may be edited by adding, deleting, modifying, etc. according to the service requirement.
Optionally, converting field data in the database table into JAVA attribute field data based on a mapping relationship between a table field and a JAVA attribute field includes: determining a conversion statement according to the field attribute of the field data in the database table and the mapping relation between the table field and the JAVA attribute field; and executing the conversion statement, and converting 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 comprises the following steps: the JAVA attribute field data is added to the basic program in each program module.
Taking a service layer as an example, a target program of the service layer generated by adding JAVA attribute field data may be:
on the basis of the embodiment, the preset program modules further comprise a Web layer, wherein the Web layer is used for rendering the database table on the display interface, and when each preset program module is created, the association relation between each preset program module and the Web layer is established, and the table corresponding to the target program created in the database is rendered on the display interface, so that interaction with operators is realized.
According to the technical scheme of the embodiment, the business requirements of the database table containing the field data and the target program are obtained, the preset program modules in the electronic equipment are called, basic programs corresponding to the business requirements in the preset program modules are 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 positions of the basic programs in the preset program modules. Based on the technical scheme, the developer of the target program can generate the target program based on one key of the database table only by completing the design of the database table, so that the code writing of the developer is reduced, and the multiplexing and development efficiency of the basic program 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, the apparatus comprising:
a database table acquisition module 210, configured to acquire a database table and a service requirement;
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 a target program generating module 230, configured to update the basic program in each program module according to field data in the database table, and generate a target program.
Optionally, the database table obtaining module 210 includes:
a creation parameter acquisition unit configured to acquire creation parameters of a 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 creation table statement corresponding to the database table name, and creating an initial database table in a database;
and calling and executing a second creation table statement corresponding to the field content, and adding field data corresponding to the field content into the initial database table to generate a database table.
Alternatively to this, the method may comprise,
before said updating said basic program in said program modules according to field data in said database table, further comprising:
the field data reading module is used for reading the field data in the database table;
the field conversion module is used for converting 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 basic programs in the program modules.
Optionally, the field conversion module is configured to:
determining a conversion statement according to the field attribute of the field data in the database table and the mapping relation between the table field and the JAVA attribute field;
and executing the conversion statement, and converting 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 business logic service layer, wherein at least one basic program is configured in the preset program modules, and a dependency relationship is arranged among the preset program modules.
Optionally, the preset program module further includes a Web layer, where the Web layer is configured to render the database table on a display interface.
The modularized programming device provided by the embodiment of the invention can execute the modularized programming method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the modularized 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 merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 5, the electronic device 12 is in the form of a general purpose computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include 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 can 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 or write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard disk drive"). Although not shown in fig. 5, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set of program modules configured to carry out the functions of embodiments of the invention.
Programs/utilities 44 having a set of program modules 46 may be stored in, for example, 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 or some combination of which may include an implementation of a network environment. Program modules 46 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing a modular programming method provided by an embodiment of the present invention, the method comprising:
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 field data in the database table to generate a target program.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing a modular programming method provided by embodiments of the present invention.
Of course, those skilled in the art will appreciate that the processor may implement the technical solution of a modular programming method provided by any embodiment of the present invention.
Example IV
A fourth embodiment of the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a modular programming method as provided by the embodiments of the present invention, the method comprising:
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 field data in the database table to generate a target program.
Of course, the computer readable storage medium provided by the embodiments of the present invention, on which the computer program stored, is not limited to the above method operations, but may also perform the related operations in a modular programming method provided by any of the embodiments of the present invention.
The computer storage media of embodiments of the invention may take the form of 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. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any 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 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.
The computer readable signal medium may include a video clip, a feature code of a second video, a feature code of each video clip, etc., in which the computer readable program code is embodied. Such propagated video segments, feature encoding of the second video, feature encoding of each video segment, 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 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 ++ and 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected 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, each module included is only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding function can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. 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, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (6)

1. A modular programming method, comprising:
acquiring a database table and service requirements, wherein the service requirements are functions of a table created in the database;
creating a preset program module, wherein a basic program corresponding to the service requirement is determined in the preset program module, and the name of the preset program module is determined according to the table name of a database table;
updating the basic program in each preset program module according to field data in the database table to generate a target program;
wherein before the updating of the basic program in each preset program module according to the field data in the database table, the method further comprises:
reading field data in the database table;
converting field data in the database table into JAVA attribute field data based on the mapping relation between the table fields and the JAVA attribute fields;
correspondingly, updating the basic program in each preset program module according to the field data in the database table comprises the following steps:
adding the JAVA attribute field data to basic programs in the preset program modules;
the preset program module includes: a database entity bean layer, wherein the attribute names in the database entity bean layer are kept the same as the field names of the database table;
wherein the obtaining the database table includes:
acquiring creation parameters of a database table, and creating the database table in a database according to the creation parameters of the database table, wherein the creation parameters of the database table comprise database table names and field contents in the database;
wherein creating a database table in a database according to the creation parameters of the database table comprises:
calling and executing a first creation table statement corresponding to the database table name, and creating an initial database table in a database;
calling and executing a second creation table statement corresponding to the field content, adding field data corresponding to the field content into the initial database table, and generating a database table;
the preset program module further includes: the system comprises a data block access object DAO layer, an interface service action layer, a configuration file config layer and a business logic service layer, wherein at least one basic program is configured in the preset program modules, and a dependency relationship is arranged among the preset program modules.
2. The method of claim 1, wherein converting field data in the database table to JAVA attribute field data based on a mapping relationship of table fields and JAVA attribute fields, comprises:
determining a conversion statement according to the field attribute of the field data in the database table and the mapping relation between the table field and the JAVA attribute field;
and executing the conversion statement, and converting field data in the database table into JAVA attribute field data.
3. The method of claim 1, wherein the pre-set program module further comprises a Web layer for rendering the database table on a display interface.
4. A modular programming apparatus, comprising:
the database table acquisition module is used for acquiring a database table and service requirements, wherein the service requirements are functions of a table created in the database;
the system comprises a preset program module creation module, a database table and a service requirement management module, wherein the preset program module creation module is used for creating a preset program module, a basic program corresponding to the service requirement is determined in the preset program module, and the name of the preset program module is determined according to the table name of the database table;
the target program generating module is used for updating the basic program in each preset program module according to field data in the database table to generate a target program;
wherein before the updating of the basic program in each preset program module according to the field data in the database table, the method further comprises:
the field data reading module is used for reading the field data in the database table;
the field conversion module is used for converting 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;
correspondingly, the object program generation module is used for: adding the JAVA attribute field data to basic programs in the preset program modules;
the preset program module includes: a database entity bean layer, wherein the attribute names in the database entity bean layer are kept the same as the field names of the database table;
wherein, the database table acquisition module includes:
a creation parameter acquisition unit configured to acquire creation parameters of a database table;
a database table creating unit, configured to create a database table in a database according to a creation parameter of the database table, where the creation parameter of the database table includes a database table name and field content in the database;
wherein the database table creation unit is configured to:
calling and executing a first creation table statement corresponding to the database table name, and creating an initial database table in a database;
calling and executing a second creation table statement corresponding to the field content, adding field data corresponding to the field content into the initial database table, and generating a database table;
the preset program module further includes: the system comprises a data block access object DAO layer, an interface service action layer, a configuration file config layer and a business logic service layer, wherein at least one basic program is configured in the preset program modules, and a dependency relationship is arranged among the preset program modules.
5. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements a modular programming method as claimed in any one of claims 1-3 when executing the computer program.
6. A storage medium containing computer executable instructions which when executed by a computer processor implement a modular programming method as claimed in any one of claims 1 to 3.
CN201911158099.7A 2019-11-22 2019-11-22 Modularized programming method and 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 Modularized programming method and 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 Modularized programming method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111078205A CN111078205A (en) 2020-04-28
CN111078205B true 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 Modularized programming method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111078205B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015429B (en) * 2020-08-21 2023-08-04 杭州指令集智能科技有限公司 Code generation method, device and equipment
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
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

Citations (8)

* 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 平安科技(深圳)有限公司 Automatically generate the method, apparatus, equipment and readable storage medium storing program for executing of test cases
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
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 广联达科技股份有限公司 Method, device and equipment for associating data and readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6874706B2 (en) * 2018-02-07 2021-05-19 オムロン株式会社 How to generate application programs, devices, programs

Patent Citations (8)

* 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 平安科技(深圳)有限公司 Automatically generate the method, apparatus, equipment and readable storage medium storing program for executing of test cases
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 广联达科技股份有限公司 Method, device and equipment for associating data and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于模板的代码自动生成系统的研究与实现;夏云龙;《中国优秀硕士学位论文全文数据库 信息科技辑》(第6期);第I138-224页 *

Also Published As

Publication number Publication date
CN111078205A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
CN111078205B (en) Modularized programming method and device, storage medium and electronic equipment
US9146955B2 (en) In-memory, columnar database multidimensional analytical view integration
US10152607B2 (en) Secure access to hierarchical documents in a sorted, distributed key/value data store
US9128996B2 (en) Uniform data model and API for representation and processing of semantic data
US7502807B2 (en) Defining and extracting a flat list of search properties from a rich structured type
US8281283B2 (en) Model-based integration of business logic implemented in enterprise javabeans into a UI framework
US20050256825A1 (en) Viewing annotations across multiple applications
WO2021179722A1 (en) Sql statement parsing method and system, and computer device and storage medium
CN103810152A (en) Visualized formula editor
JP2006012155A (en) System and method for delayed fetching of designated members of user defined type
CN113448562B (en) Automatic logic code generation method and device and electronic equipment
CN103914290A (en) Operating command processing method and device
CN111949693A (en) Data processing device, data processing method, storage medium and electronic equipment
CN110889013B (en) Data association method, device, server and storage medium based on XML
US10719488B2 (en) Configurable provider for layered repository
CN109033456B (en) Condition query method and device, electronic equipment and storage medium
CN108198595B (en) Multi-source heterogeneous unstructured medical record data fusion method
CN111858645A (en) Database object processing method, device, equipment and storage medium
Mohamed et al. MOF-EMF Alignment
US20200348949A1 (en) System and methods for loading objects from hash chains
CN116737825A (en) Heterogeneous database operation processing method and device, electronic equipment and storage medium
CN110888839A (en) Data storage and data search method and device
US20140207729A1 (en) Rapid Provisioning of Information for Business Analytics
CN115145920A (en) Data storage method, device, equipment and medium
CN113761040A (en) Database and application program bidirectional mapping method, device, medium and program product

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