CN104424338B - The automatically generating device and automatic generation method of web system - Google Patents

The automatically generating device and automatic generation method of web system Download PDF

Info

Publication number
CN104424338B
CN104424338B CN201310412990.5A CN201310412990A CN104424338B CN 104424338 B CN104424338 B CN 104424338B CN 201310412990 A CN201310412990 A CN 201310412990A CN 104424338 B CN104424338 B CN 104424338B
Authority
CN
China
Prior art keywords
database
web system
layer
control
generation
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.)
Expired - Fee Related
Application number
CN201310412990.5A
Other languages
Chinese (zh)
Other versions
CN104424338A (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.)
New Founder Holdings Development Co ltd
Pku Founder Information Industry Group Co ltd
Peking University Founder Group Co Ltd
Founder Apabi Technology Ltd
Original Assignee
Founder Information Industry Holdings Co Ltd
Peking University Founder Group Co Ltd
Beijing Founder Apabi 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 Founder Information Industry Holdings Co Ltd, Peking University Founder Group Co Ltd, Beijing Founder Apabi Technology Co Ltd filed Critical Founder Information Industry Holdings Co Ltd
Priority to CN201310412990.5A priority Critical patent/CN104424338B/en
Publication of CN104424338A publication Critical patent/CN104424338A/en
Application granted granted Critical
Publication of CN104424338B publication Critical patent/CN104424338B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9017Indexing; Data structures therefor; Storage structures using directory or table look-up
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)

Abstract

本发明提供了一种web系统的自动生成装置,包括:视图层生成单元,用于生成所述web系统的视图层的表单界面;模型层生成单元,包括:数据库建立子单元,用于建立数据库,所述数据库中存储有与所述表单界面相对应的数据库表;类创建子单元,用于创建用于对所述数据库进行操作的业务处理类,以完成所述web系统的模型层的生成;控制层生成单元,包括:功能配置子单元,用于根据预设的配置文件进行功能配置;策略建立子单元,用于建立控制策略,以完成所述web系统的控制层的生成。本发明还提出了对应的web系统的自动生成方法。通过本发明的技术方案,可以提高web系统开发过程中的自动化过程,减少人工干预,简化开发过程。

The present invention provides a device for automatically generating a web system, comprising: a view layer generating unit for generating a form interface of the view layer of the web system; a model layer generating unit including: a database establishing subunit for establishing a database , a database table corresponding to the form interface is stored in the database; a class creation subunit is used to create a business processing class for operating the database, so as to complete the generation of the model layer of the web system ; The control layer generation unit includes: a function configuration subunit, configured to perform function configuration according to a preset configuration file; a strategy establishment subunit, configured to establish a control strategy to complete the generation of the control layer of the web system. The invention also proposes an automatic generation method of the corresponding web system. Through the technical scheme of the invention, the automation process in the web system development process can be improved, manual intervention can be reduced, and the development process can be simplified.

Description

web系统的自动生成装置和自动生成方法Automatic generation device and automatic generation method of web system

技术领域technical field

本发明涉及数据处理技术领域,具体而言,涉及一种web系统的自动生成装置和一种web系统的自动生成方法。The present invention relates to the technical field of data processing, in particular to an automatic generation device for a web system and an automatic generation method for a web system.

背景技术Background technique

在web系统的开发中,设计者们在面对如何架构web系统以达到开发更方便、更简洁的时候,MVC(模型(model)-视图(view)-控制器(controller))架构模式逐渐成为了主流技术。MVC是一种软件构件模式,用一种业务逻辑和数据显示分离的方法组织代码,这个方法的假设前提是如果业务逻辑被聚集到一个部件里面,而且界面和用户围绕数据的交互能被改进和个性化定制而不需要重新编写业务逻辑。MVC被应用于在一个逻辑的图形化用户界面的结构中,实现映射传统的输入、处理和输出功能。In the development of the web system, when designers are faced with how to structure the web system to achieve more convenient and concise development, the MVC (model (model)-view (view)-controller (controller)) architecture pattern has gradually become mainstream technology. MVC is a software component pattern that organizes code with a method of separating business logic and data display. The premise of this method is that if business logic is gathered into a component, and the interface and user interaction around data can be improved and Personalization without rewriting business logic. MVC is applied to map traditional input, processing and output functions in a logical GUI structure.

MVC将M(模型层)和V(视图层)的实现代码分离,从而使同一个程序可以使用不同的表现形式。比如一批统计数据可以分别用柱状图、饼图来表示。C(控制层)存在的目的则是确保M(模型层)和V(视图层)的同步,一旦M(模型层)改变,V(视图层)应该同步更新。它强制性的使应用程序的输入、处理和输出分开。基于上述原则,web应用程序被分成三个核心部件:模型、视图、控制器,它们各自处理自己的任务。MVC separates the implementation code of M (model layer) and V (view layer), so that the same program can use different forms of expression. For example, a batch of statistical data can be represented by histograms and pie charts. The purpose of C (control layer) is to ensure the synchronization of M (model layer) and V (view layer). Once M (model layer) changes, V (view layer) should be updated synchronously. It enforces separation of application input, processing, and output. Based on the above principles, web applications are divided into three core components: model, view, and controller, each of which handles its own tasks.

如今业界也有很多成熟并且被广泛应用的MVC架构方案,比如Struts、Spring、Hibernate等。它们在使用MVC设计模式进行web系统架构的时候,完全能够通过配置文件将解耦的C(控制层)和M(模型层)紧密关联起来而又相互独立,并且通过策略模式和面向切面编程的技术,能够智能地自动化生成部分M(模型层)和C(控制层)的代码。Nowadays, there are many mature and widely used MVC architecture solutions in the industry, such as Struts, Spring, Hibernate, etc. When they use the MVC design pattern for web system architecture, they are fully able to closely associate the decoupled C (control layer) and M (model layer) through configuration files and are independent of each other, and through strategy patterns and aspect-oriented programming technology, which can intelligently and automatically generate codes for parts M (model layer) and C (control layer).

然而,相关技术中所提出的各种MVC的解决方案,仍然停留在部分层次的代码自动化生成,或者某个层次部分自动化,无法提供一整套的技术方案来进行对MVC整个层次进行与业务逻辑无关的代码的自动化生成。However, the various MVC solutions proposed in related technologies still remain in the automatic generation of code at some levels, or partial automation at a certain level, and cannot provide a complete set of technical solutions to perform MVC operations on the entire level that have nothing to do with business logic. Automated generation of code.

因此,如何提供一种新的web系统的开发技术,使得web系统的开发更加自动化,让程序开发者更注重于具体的业务逻辑,提高工作效率。Therefore, how to provide a new web system development technology to make the development of the web system more automatic, to allow program developers to focus more on specific business logic, and to improve work efficiency.

发明内容Contents of the invention

本发明正是基于上述问题,提出了一种新的web系统的自动生成技术,可以提高web系统开发过程中的自动化过程,减少人工干预,简化开发过程。Based on the above problems, the present invention proposes a new web system automatic generation technology, which can improve the automation process in the web system development process, reduce manual intervention, and simplify the development process.

有鉴于此,本发明提出了一种web系统的自动生成装置,包括:视图层生成单元,用于生成所述web系统的视图层的表单界面;模型层生成单元,包括:数据库建立子单元,用于建立数据库,所述数据库中存储有与所述表单界面相对应的数据库表,所述数据库表中的字段与所述表单界面中的每个表单控件的属性信息一一对应;类创建子单元,创建用于对所述数据库进行操作的业务处理类,以完成所述web系统的模型层的生成;控制层生成单元,包括:功能配置子单元,用于根据预设的配置文件进行功能配置;策略建立子单元,用于建立控制策略,以完成所述web系统的控制层的生成。In view of this, the present invention proposes a device for automatically generating a web system, comprising: a view layer generation unit for generating a form interface of the view layer of the web system; a model layer generation unit including: a database establishment subunit, For establishing a database, the database table is stored with the database table corresponding to the form interface, and the fields in the database table correspond to the attribute information of each form control in the form interface; the class creator A unit for creating a business processing class for operating the database to complete the generation of the model layer of the web system; a control layer generation unit including: a function configuration subunit for performing functions according to a preset configuration file The configuration; strategy establishment subunit is used to establish a control strategy to complete the generation of the control layer of the web system.

在该技术方案中,通过对视图层的表单界面的属性进行获取,并建立对应的数据库,使得自动建立起视图层和模型层之间的关联关系,而不必由用户完全手动进行关联配置,提高了系统开发的自动化程度,有助于提高工作效率。同时,还通过提供自动生成的业务处理类,完成控制层对模型层的数据库的具体操作,实现了视图层、模型层和控制层之间的紧密关联,有助于降低人工的干预程度。In this technical solution, by acquiring the attributes of the form interface of the view layer and establishing a corresponding database, the association relationship between the view layer and the model layer is automatically established without the need for the user to completely manually configure the association, improving the It improves the automation of system development and helps to improve work efficiency. At the same time, by providing automatically generated business processing classes, the control layer completes the specific operation of the database of the model layer, realizes the close relationship between the view layer, model layer and control layer, and helps to reduce the degree of manual intervention.

根据本发明的又一方面,还提出了一种web系统的自动生成方法,包括:生成所述web系统的视图层的表单界面;建立数据库,所述数据库中存储有与所述表单界面相对应的数据库表,所述数据库表中的字段与所述表单界面中的每个表单控件的属性信息一一对应;创建用于对所述数据库进行操作的业务处理类,以完成所述web系统的模型层的生成;根据预设的配置文件进行功能配置,并建立控制策略,以完成所述web系统的控制层的生成。According to yet another aspect of the present invention, a method for automatically generating a web system is also proposed, including: generating a form interface of the view layer of the web system; establishing a database, storing information corresponding to the form interface in the database. A database table, the fields in the database table correspond one-to-one with the attribute information of each form control in the form interface; create a business processing class for operating the database to complete the web system Generation of the model layer; performing function configuration according to a preset configuration file, and establishing a control strategy to complete the generation of the control layer of the web system.

在该技术方案中,通过对视图层的表单界面的属性进行获取,并建立对应的数据库,使得自动建立起视图层和模型层之间的关联关系,而不必由用户完全手动进行关联配置,提高了系统开发的自动化程度,有助于提高工作效率。同时,还通过提供自动生成的业务处理类,完成控制层对模型层的数据库的具体操作,实现了视图层、模型层和控制层之间的紧密关联,有助于降低人工的干预程度。In this technical solution, by acquiring the attributes of the form interface of the view layer and establishing a corresponding database, the association relationship between the view layer and the model layer is automatically established without the need for the user to completely manually configure the association, improving the It improves the automation of system development and helps to improve work efficiency. At the same time, by providing automatically generated business processing classes, the control layer completes the specific operation of the database of the model layer, realizes the close relationship between the view layer, model layer and control layer, and helps to reduce the degree of manual intervention.

通过以上技术方案,可以提高web系统开发过程中的自动化过程,减少人工干预,简化开发过程。Through the above technical solutions, the automation process in the web system development process can be improved, manual intervention can be reduced, and the development process can be simplified.

附图说明Description of drawings

图1示出了根据本发明的实施例的web系统的自动生成装置的示意框图;Fig. 1 shows a schematic block diagram of an automatic generation device of a web system according to an embodiment of the present invention;

图2示出了根据本发明的实施例的web系统的自动生成方法的流程示意图;Fig. 2 shows a schematic flow chart of a method for automatically generating a web system according to an embodiment of the present invention;

图3示出了根据本发明的实施例的自动化生成web系统的原理示意图。Fig. 3 shows a schematic diagram of the principle of an automatic web generation system according to an embodiment of the present invention.

具体实施方式Detailed ways

为了能够更清楚地理解本发明的上述目的、特征和优点,下面结合附图和具体实施方式对本发明进行进一步的详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。In order to understand the above-mentioned purpose, features and advantages of the present invention more clearly, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.

在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是,本发明还可以采用其他不同于在此描述的其他方式来实施,因此,本发明并不限于下面公开的具体实施例的限制。In the following description, many specific details are set forth in order to fully understand the present invention, but the present invention can also be implemented in other ways different from those described here, therefore, the present invention is not limited to the specific embodiments disclosed below limit.

图1示出了根据本发明的实施例的web系统的自动生成装置的示意框图。Fig. 1 shows a schematic block diagram of an automatic generation device of a web system according to an embodiment of the present invention.

如图1所示,根据本发明的实施例的web系统的自动生成装置,包括:视图层生成单元,用于生成所述web系统的视图层的表单界面;模型层生成单元,包括:数据库建立子单元,用于建立数据库,所述数据库中存储有与所述表单界面相对应的数据库表,所述数据库表中的字段与所述表单界面中的每个表单控件的属性信息一一对应;类创建子单元,创建用于对所述数据库进行操作的业务处理类,以完成所述web系统的模型层的生成;控制层生成单元,包括:功能配置子单元,用于根据预设的配置文件进行功能配置;策略建立子单元,用于建立控制策略,以完成所述web系统的控制层的生成。As shown in Figure 1, the automatic generation device of the web system according to the embodiment of the present invention includes: a view layer generation unit, which is used to generate the form interface of the view layer of the web system; a model layer generation unit, including: database establishment The subunit is used to establish a database, wherein a database table corresponding to the form interface is stored in the database, and the fields in the database table are in one-to-one correspondence with the attribute information of each form control in the form interface; The class creation subunit is used to create a business processing class for operating the database, so as to complete the generation of the model layer of the web system; the control layer generation unit includes: a function configuration subunit, used for configuration according to a preset The file performs function configuration; the policy establishment subunit is used to establish a control policy to complete the generation of the control layer of the web system.

在该技术方案中,通过对视图层的表单界面的属性进行获取,并建立对应的数据库,使得自动建立起视图层和模型层之间的关联关系,而不必由用户完全手动进行关联配置,提高了系统开发的自动化程度,有助于提高工作效率。同时,还通过提供自动生成的业务处理类,完成控制层对模型层的数据库的具体操作,实现了视图层、模型层和控制层之间的紧密关联,有助于降低人工的干预程度。In this technical solution, by acquiring the attributes of the form interface of the view layer and establishing a corresponding database, the association relationship between the view layer and the model layer is automatically established without the need for the user to completely manually configure the association, improving the It improves the automation of system development and helps to improve work efficiency. At the same time, by providing automatically generated business processing classes, the control layer completes the specific operation of the database of the model layer, realizes the close relationship between the view layer, model layer and control layer, and helps to reduce the degree of manual intervention.

在上述技术方案中,优选地,所述视图层生成单元包括:选择子单元,用于根据接收到的用户的选择指令,选择表单控件和视图类型;表单生成子单元,用于根据获取的键入信息,为每个表单控件添加对应的属性信息和方法信息,以生成所述视图层的表单界面。In the above technical solution, preferably, the view layer generation unit includes: a selection subunit, configured to select a form control and a view type according to a received user selection instruction; a form generation subunit, configured to Information, adding corresponding attribute information and method information for each form control, so as to generate the form interface of the view layer.

在该技术方案中,用于无需执行对具体代码的编写,只需要对视图类型和预先建立的可视化的控件模型进行选择,即可由后台自动生成相应的代码,有助于提高工作效率。通过键入属性信息和方法信息,则针对由预设的控件模型构成的系统结构,为每个具体的控件设置对应的实现功能和逻辑关系,但这些操作都无需由用户手动编写代码,只需要关注具体的业务逻辑即可,提升了自动化程度,有助于提高工作效率。In this technical solution, the user does not need to write specific codes, but only needs to select the view type and the pre-established visual control model, and the corresponding code can be automatically generated by the background, which helps to improve work efficiency. By typing in attribute information and method information, the corresponding implementation functions and logical relationships are set for each specific control for the system structure composed of preset control models, but these operations do not need to be manually written by the user, only need to pay attention to Specific business logic is enough, which improves the degree of automation and helps to improve work efficiency.

在上述任一技术方案中,优选地,所述数据库建立子单元用于:创建包含所述表单界面中的每个表单控件的属性信息的JavaBean组件;根据所需的数据库的属性特征,生成数据库表,所述数据库表中的字段与所述JavaBean组件中的所有属性信息一一对应;将所述数据库表存储至数据库。In any of the above technical solutions, preferably, the database building subunit is used to: create a JavaBean component containing attribute information of each form control in the form interface; generate a database according to the attribute characteristics of the required database A table, the fields in the database table are in one-to-one correspondence with all attribute information in the JavaBean component; the database table is stored in a database.

在该技术方案中,利用动态代理技术,由JavaBean对视图层的表单控件的属性进行获取,并建立对应的数据库表,从而在视图层和模型层之间自动建立关联,以及在视图层、模型层与数据库之间自动建立关联,无需用户手动设置,有助于提升系统的自动化程度,提高用户的工作效率。In this technical solution, using dynamic proxy technology, JavaBean acquires the properties of the form control in the view layer, and establishes the corresponding database table, thereby automatically establishing an association between the view layer and the model layer, and in the view layer, model The association between the layer and the database is automatically established without manual settings by the user, which helps to improve the automation of the system and improve the work efficiency of the user.

在上述任一技术方案中,优选地,所述JavaBean组件继承用于操作所述数据库的基础类;以及所述业务处理类包括代理组件和所述JavaBean组件,其中,所述代理组件通过调用所述JavaBean组件,实现对所述数据库的操作。In any of the above technical solutions, preferably, the JavaBean component inherits the base class used to operate the database; and the business processing class includes a proxy component and the JavaBean component, wherein the proxy component calls the The JavaBean component is used to realize the operation on the database.

在该技术方案中,通过由JavaBean组件继承基础类,实现对数据库的具体操作,而由代理组件实现对系统运行时的具体请求进行响应,从而实现对多个功能的明确划分,有助于具体的调试和控制。In this technical scheme, the specific operations on the database are realized by inheriting the basic class from the JavaBean component, while the proxy component realizes the response to the specific request when the system is running, so as to realize the clear division of multiple functions, which is helpful for the specific debugging and control.

在上述任一技术方案中,优选地,所述模型层生成单元还包括:模板生成子单元,用于生成并存储与所述业务处理类相关联的SQL模板语句;其中,所述业务处理类将从接收到的操作请求中解析出的信息添加至所述SQL模板语句,以生成SQL执行语句,并通过所述SQL执行语句,实现对所述数据库的操作。In any of the above technical solutions, preferably, the model layer generation unit further includes: a template generation subunit, configured to generate and store SQL template statements associated with the business processing class; wherein, the business processing class The information parsed from the received operation request is added to the SQL template statement to generate an SQL execution statement, and the operation on the database is realized through the SQL execution statement.

在该技术方案中,通过生成SQL模板语句,则当对用户的请求进行响应时,无需每次都重新编写SQL查询语句,而直接将所希望操作的数据的标识(如具体数据库表的ID等)添加至SQL模板语句中的相应位置,即可直接实现对数据库的操作,有助于缩短响应时间,提高运行效率。In this technical solution, by generating the SQL template statement, when responding to the user's request, it is not necessary to rewrite the SQL query statement every time, but directly identify the data to be operated (such as the ID of the specific database table, etc. ) to the corresponding position in the SQL template statement, the operation on the database can be directly realized, which helps to shorten the response time and improve the operating efficiency.

在上述任一技术方案中,优选地,所述控制层生成单元还包括:文件生成子单元,用于通过检测用户的操作动作,确定操作对象和操作方式,以生成所述预设的配置文件。In any of the above technical solutions, preferably, the control layer generation unit further includes: a file generation subunit, configured to determine the operation object and operation mode by detecting the user's operation action, so as to generate the preset configuration file .

在该技术方案中,控制层的生成过程中,在初始化过程和具体的功能配置过程中,需要使用预先生成的配置文件。配置文件的生成过程无需用户手动编程,只需要由用户执行如路径的创建、对象的选择、操作方式的选择等操作,系统就能够自动生成对应的配置文件,使得配置文件的生成过程更加自动化,有助于提高工作效率。In this technical solution, during the generation process of the control layer, during the initialization process and the specific function configuration process, a pre-generated configuration file needs to be used. The generation process of the configuration file does not require manual programming by the user. Only the user needs to perform operations such as path creation, object selection, and operation mode selection, and the system can automatically generate the corresponding configuration file, making the configuration file generation process more automated. Helps improve work efficiency.

在上述任一技术方案中,优选地,所述策略建立子单元用于:根据用户选择的框架类型,读取所述框架类型对应的预设控制策略;或根据接收到的用户配置指令,建立实时配置的控制策略。In any of the above technical solutions, preferably, the policy establishment subunit is configured to: read the preset control policy corresponding to the framework type according to the framework type selected by the user; or establish the control policy according to the received user configuration instruction Control strategies for real-time configuration.

在该技术方案中,用户可以对预先设置的框架类型进行选择,则可以直接读取对应于被选中的框架对应的控制策略,以提高效率;用户也可以根据实际情况,配置新的控制策略,以适用于不同的实际情况。In this technical solution, the user can select a preset frame type, and then directly read the control strategy corresponding to the selected frame to improve efficiency; the user can also configure a new control strategy according to the actual situation, to apply to different actual situations.

图2示出了根据本发明的实施例的web系统的自动生成方法的流程示意图。Fig. 2 shows a schematic flowchart of a method for automatically generating a web system according to an embodiment of the present invention.

如图2所示,根据本发明的实施例的web系统的自动生成方法,包括:生成所述web系统的视图层的表单界面;建立数据库,所述数据库中存储有与所述表单界面相对应的数据库表,所述数据库表中的字段与所述表单界面中的每个表单控件的属性信息一一对应;创建用于对所述数据库进行操作的业务处理类,以完成所述web系统的模型层的生成;根据预设的配置文件进行功能配置,并建立控制策略,以完成所述web系统的控制层的生成。As shown in Figure 2, the method for automatically generating a web system according to an embodiment of the present invention includes: generating a form interface of the view layer of the web system; establishing a database, storing information corresponding to the form interface in the database; A database table, the fields in the database table correspond one-to-one with the attribute information of each form control in the form interface; create a business processing class for operating the database to complete the web system Generation of the model layer; performing function configuration according to a preset configuration file, and establishing a control strategy to complete the generation of the control layer of the web system.

在该技术方案中,通过对视图层的表单界面的属性进行获取,并建立对应的数据库,使得自动建立起视图层和模型层之间的关联关系,而不必由用户完全手动进行关联配置,提高了系统开发的自动化程度,有助于提高工作效率。同时,还通过提供自动生成的业务处理类,完成控制层对模型层的数据库的具体操作,实现了视图层、模型层和控制层之间的紧密关联,有助于降低人工的干预程度。In this technical solution, by acquiring the attributes of the form interface of the view layer and establishing a corresponding database, the association relationship between the view layer and the model layer is automatically established without the need for the user to completely manually configure the association, improving the It improves the automation of system development and helps to improve work efficiency. At the same time, by providing automatically generated business processing classes, the control layer completes the specific operation of the database of the model layer, realizes the close relationship between the view layer, model layer and control layer, and helps to reduce the degree of manual intervention.

在上述技术方案中,优选地,生成所述表单界面的过程包括:根据接收到的用户的选择指令,选择表单控件和视图类型,并根据获取的键入信息,为每个表单控件添加对应的属性信息和方法信息,以生成所述视图层的表单界面。In the above technical solution, preferably, the process of generating the form interface includes: selecting form controls and view types according to the received user selection instructions, and adding corresponding attributes to each form control according to the acquired input information info and method info to generate the form interface for the view layer.

在该技术方案中,用于无需执行对具体代码的编写,只需要对视图类型和预先建立的可视化的控件模型进行选择,即可由后台自动生成相应的代码,有助于提高工作效率。通过键入属性信息和方法信息,则针对由预设的控件模型构成的系统结构,为每个具体的控件设置对应的实现功能和逻辑关系,但这些操作都无需由用户手动编写代码,只需要关注具体的业务逻辑即可,提升了自动化程度,有助于提高工作效率。In this technical solution, the user does not need to write specific codes, but only needs to select the view type and the pre-established visual control model, and the corresponding code can be automatically generated by the background, which helps to improve work efficiency. By typing in attribute information and method information, the corresponding implementation functions and logical relationships are set for each specific control for the system structure composed of preset control models, but these operations do not need to be manually written by the user, only need to pay attention to Specific business logic is enough, which improves the degree of automation and helps to improve work efficiency.

在上述任一技术方案中,优选地,建立所述数据库的过程包括:创建包含所述表单界面中的每个表单控件的属性信息的JavaBean组件;根据所需的数据库的属性特征,生成数据库表,所述数据库表中的字段与所述JavaBean组件中的所有属性信息一一对应;将所述数据库表存储至数据库。In any of the above technical solutions, preferably, the process of establishing the database includes: creating a JavaBean component containing attribute information of each form control in the form interface; generating a database table according to the attribute characteristics of the required database , the fields in the database table are in one-to-one correspondence with all attribute information in the JavaBean component; the database table is stored in a database.

在该技术方案中,利用动态代理技术,由JavaBean对视图层的表单控件的属性进行获取,并建立对应的数据库表,从而在视图层和模型层之间自动建立关联,以及在视图层、模型层与数据库之间自动建立关联,无需用户手动设置,有助于提升系统的自动化程度,提高用户的工作效率。In this technical solution, using dynamic proxy technology, JavaBean acquires the properties of the form control in the view layer, and establishes the corresponding database table, thereby automatically establishing an association between the view layer and the model layer, and in the view layer, model The association between the layer and the database is automatically established without manual settings by the user, which helps to improve the automation of the system and improve the work efficiency of the user.

在上述任一技术方案中,优选地,还包括:所述JavaBean组件继承用于操作所述数据库的基础类;以及所述业务处理类包括代理组件和所述JavaBean组件,其中,所述代理组件通过调用所述JavaBean组件,实现对所述数据库的操作。In any of the above technical solutions, preferably, further comprising: the JavaBean component inherits the basic class used to operate the database; and the business processing class includes a proxy component and the JavaBean component, wherein the proxy component By calling the JavaBean component, the operation on the database is realized.

在该技术方案中,通过由JavaBean组件继承基础类,实现对数据库的具体操作,而由代理组件实现对系统运行时的具体请求进行响应,从而实现对多个功能的明确划分,有助于具体的调试和控制。In this technical scheme, the specific operations on the database are realized by inheriting the basic class from the JavaBean component, while the proxy component realizes the response to the specific request when the system is running, so as to realize the clear division of multiple functions, which is helpful for the specific debugging and control.

在上述任一技术方案中,优选地,还包括:生成并存储与所述业务处理类相关联的SQL模板语句;所述业务处理类将从接收到的操作请求中解析出的信息添加至所述SQL模板语句,以生成SQL执行语句,并通过所述SQL执行语句,实现对所述数据库的操作。In any of the above technical solutions, preferably, further comprising: generating and storing the SQL template statement associated with the business processing class; the business processing class adding the information parsed from the received operation request to the The SQL template statement is generated to generate an SQL execution statement, and the operation on the database is realized through the SQL execution statement.

在该技术方案中,通过生成SQL模板语句,则当对用户的请求进行响应时,无需每次都重新编写SQL查询语句,而直接将所希望操作的数据的标识(如具体数据库表的ID等)添加至SQL模板语句中的相应位置,即可直接实现对数据库的操作,有助于缩短响应时间,提高运行效率。In this technical solution, by generating the SQL template statement, when responding to the user's request, it is not necessary to rewrite the SQL query statement every time, but directly identify the data to be operated (such as the ID of the specific database table, etc. ) to the corresponding position in the SQL template statement, the operation on the database can be directly realized, which helps to shorten the response time and improve the operating efficiency.

在上述任一技术方案中,优选地,还包括:通过检测用户的操作动作,确定操作对象和操作方式,以生成所述预设的配置文件。In any of the above technical solutions, preferably, further comprising: determining the operation object and operation mode by detecting the user's operation action, so as to generate the preset configuration file.

在该技术方案中,控制层的生成过程中,在初始化过程和具体的功能配置过程中,需要使用预先生成的配置文件。配置文件的生成过程无需用户手动编程,只需要由用户执行如路径的创建、对象的选择、操作方式的选择等操作,系统就能够自动生成对应的配置文件,使得配置文件的生成过程更加自动化,有助于提高工作效率。In this technical solution, during the generation process of the control layer, during the initialization process and the specific function configuration process, a pre-generated configuration file needs to be used. The generation process of the configuration file does not require manual programming by the user. Only the user needs to perform operations such as path creation, object selection, and operation mode selection, and the system can automatically generate the corresponding configuration file, making the configuration file generation process more automated. Helps improve work efficiency.

在上述任一技术方案中,优选地,建立控制策略的过程包括:根据用户选择的框架类型,读取所述框架类型对应的预设控制策略;或根据接收到的用户配置指令,建立实时配置的控制策略。In any of the above technical solutions, preferably, the process of establishing the control strategy includes: according to the framework type selected by the user, reading the preset control strategy corresponding to the framework type; or establishing a real-time configuration according to the received user configuration instruction control strategy.

在该技术方案中,用户可以对预先设置的框架类型进行选择,则可以直接读取对应于被选中的框架对应的控制策略,以提高效率;用户也可以根据实际情况,配置新的控制策略,以适用于不同的实际情况。In this technical solution, the user can select a preset frame type, and then directly read the control strategy corresponding to the selected frame to improve efficiency; the user can also configure a new control strategy according to the actual situation, to apply to different actual situations.

图3示出了根据本发明的实施例的自动化生成web系统的原理示意图。Fig. 3 shows a schematic diagram of the principle of an automatic web generation system according to an embodiment of the present invention.

下面结合图3,对基于本发明的实施例的自动化生成web系统的工作原理进行详细说明。The working principle of the automatic web generation system based on the embodiment of the present invention will be described in detail below with reference to FIG. 3 .

假定本发明的web系统开发平台中,包括基础的平台系统302,还包括用于其他具体功能的如视图层平台302A、模型层平台302B、控制层平台302C等,以实现具体的web系统的开发。It is assumed that the web system development platform of the present invention includes a basic platform system 302, and other specific functions such as a view layer platform 302A, a model layer platform 302B, a control layer platform 302C, etc., to realize the development of a specific web system .

当需要执行web系统开发时,需要由平台系统302对用户预先进行和完成的设置或配置进行读取,以实现系统的初始化和功能配置。When web system development needs to be performed, the platform system 302 needs to read the settings or configurations made and completed by the user in advance, so as to realize system initialization and function configuration.

一、视图层的自动生成First, the automatic generation of the view layer

在本实施例中,主要由视图层平台302A实现视图层的自动化生成。具体地,可以通过浏览器的方式实现人机交互过程,并且用户仅需要通过鼠标拖拽和键盘操作的方式,即可实现页面的生成。In this embodiment, the automatic generation of the view layer is mainly realized by the view layer platform 302A. Specifically, the human-computer interaction process can be realized through the browser, and the user only needs to drag the mouse and operate the keyboard to realize the generation of the page.

1、视图类型1. View type

用户根据需求,选择所需的视图类型,比如HTML、jsp、freemarker等。The user selects the required view type according to the requirement, such as HTML, jsp, freemarker, etc.

2、设计图2. Design drawing

具体地,需要由视图层平台302A提供可视化的视图控件,则用户可以根据自身的需求,使用鼠标选择和拖动视图控件,即可形成相应的设计图。比如,其中的视图控件可以采用W3C(World Wide Web Consortium,万维网联盟)标准里面的控件,只需要了解W3C的相关规范,不需要再花费任何时间和精力去学习新的控件和API。Specifically, the view layer platform 302A needs to provide a visual view control, and the user can use the mouse to select and drag the view control to form a corresponding design drawing according to their own needs. For example, the view controls can use the controls in the W3C (World Wide Web Consortium, World Wide Web Consortium) standard. You only need to understand the relevant specifications of W3C, and you don't need to spend any time and effort to learn new controls and APIs.

3、表单3. Form

视图层平台302A根据用户选择的视图类型和设计平台上的设计图,即可自动生成相应的表单。The view layer platform 302A can automatically generate a corresponding form according to the view type selected by the user and the design drawing on the design platform.

其中,表单上的视图控件之间的关联和交互,可以采用JavaScript和DOM技术来实现。比如,在视图层平台302A中会提供一些基本的DOM操作(方法),以供程序员进行选择;同时,程序员也可以自定义DOM方法,并关联至具体的视图控件。而表单与后台交互则可以采用如ajax方式,或生成临时form标签提交的方式。Among them, the association and interaction between the view controls on the form can be realized by JavaScript and DOM technology. For example, some basic DOM operations (methods) are provided in the view layer platform 302A for programmers to choose; at the same time, programmers can also customize DOM methods and associate them with specific view controls. The interaction between the form and the background can be done in a way such as ajax, or by generating a temporary form tag and submitting it.

4、“登录界面”的实施例4. Embodiment of "login interface"

假定用户需要设计一个“登录界面”的web系统,则对于视图层的生成过程包括:Assuming that the user needs to design a "login interface" web system, the generation process of the view layer includes:

1)在视图设计平台302A的控件选择界面上,拖拽一个用户名输入框(input-text标签)和一个密码输入框(input-password标签),并拖拽两个按钮:“登录”(input-button标签)、“重置”(input-button标签)。1) On the control selection interface of the view design platform 302A, drag a user name input box (input-text label) and a password input box (input-password label), and drag two buttons: "login" (input -button tag), "reset" (input-button tag).

2)选择需要生成的表单类型(如JSP、HTML等):jsp;输入表单ID(唯一标示):login.jsp。2) Select the type of form to be generated (such as JSP, HTML, etc.): jsp; enter the form ID (unique mark): login.jsp.

3)编辑每个视图控件的属性。比如双击用户名输入框编辑属性,输入ID:userName;双击密码输入框编辑属性,输入ID:userPassword;双击登录按钮编辑属性,输入ID:loginButton、输入提交URL:login.do;输入需要提交的form ID:loginForm;双击重置按钮编辑属性,输入ID:resetButton;输入需要重置的form ID:loginForm。3) Edit the properties of each view control. For example, double-click the user name input box to edit properties, enter ID: userName; double-click the password input box to edit properties, enter ID: userPassword; double-click the login button to edit properties, enter ID: loginButton, enter the submission URL: login.do; enter the form to be submitted ID: loginForm; double-click the reset button to edit properties, enter ID: resetButton; enter the ID of the form that needs to be reset: loginForm.

4)视图层平台302A会自动为每个视图控件生成javaScript方法。比如给loginButton提交:产生一个临时form,ID为:loginForm,内容包含了页面上所有可输入对象(密码输入框、密码输入框);action为:login.do;最后form.submit()。4) The view layer platform 302A will automatically generate javaScript methods for each view control. For example, submit to loginButton: generate a temporary form with ID: loginForm, the content includes all input objects on the page (password input box, password input box); action: login.do; finally form.submit().

当然,如果用户需要自己编写javaScript方法进行登录,可以编辑登录按钮的事件属性,并改为自定义的方法。Of course, if the user needs to write a javaScript method to log in, he can edit the event attribute of the login button and change it to a custom method.

5)自动化装置在后台根据前面一系列设计步骤生成相应的表单界面。5) The automation device generates the corresponding form interface in the background according to the previous series of design steps.

二、模型层的自动生成2. Automatic generation of model layers

1、JavaBean1. JavaBean

模型层平台302B使用动态代理技术,将表单ID作为JavaBean的类名(为每个表单生成一个对应的JavaBean),表单上所有的html可输入标签对应于JavaBean的属性,自动生成所对应的JavaBean。The model layer platform 302B uses dynamic proxy technology, uses the form ID as the class name of the JavaBean (generates a corresponding JavaBean for each form), and all html input tags on the form correspond to the properties of the JavaBean, and automatically generates the corresponding JavaBean.

2、数据库2. Database

获取生成的JavaBean中的包含的信息,即视图层中对应表单中的视图控件的属性信息,并根据JavaBean的信息以及所选择使用的数据库类型、版本和框架,自动产生相应的数据库脚本。Obtain the information contained in the generated JavaBean, that is, the attribute information of the view control in the corresponding form in the view layer, and automatically generate the corresponding database script according to the JavaBean information and the selected database type, version and framework.

通过上述生成的数据库脚本,自动生成与JavaBean对应(比如数据库表的ID与JavaBean的ID、对应表单的ID相同)的数据库表,数据库表里面的字段与Javabean里面的属性一一对应,从而完成了对数据库的创建。Through the database script generated above, the database table corresponding to the JavaBean (for example, the ID of the database table is the same as the ID of the JavaBean and the ID of the corresponding form) is automatically generated, and the fields in the database table correspond to the attributes in the Javabean one by one, thus completing The creation of the database.

同时,每个JavaBean都继承一个基础类,该基础类主要是将JavaBean与数据库操作关联起来,能够实现对数据库的操作,如增、删、改、查等。At the same time, each JavaBean inherits a basic class, which mainly associates JavaBean with database operations, and can realize operations on the database, such as adding, deleting, modifying, and checking.

3、Action3. Action

实际上,可以由JavaBean直接响应控制层的请求,执行对数据库的操作,但为了对不同功能进行区分,便于系统的调试和分工,本系统还通过创建Action,从而分担对控制层的请求。In fact, JavaBean can directly respond to the request of the control layer to perform operations on the database, but in order to distinguish different functions and facilitate system debugging and division of labor, the system also creates Actions to share the request to the control layer.

Action为业务处理类,是根据JavaBean的属性和方法生成的一个有着基本数据库操作(增删改查等)的操作类,该Action可以通过调用JavaBean来操作数据库。Action is a business processing class. It is an operation class with basic database operations (addition, deletion, modification, query, etc.) generated according to the properties and methods of JavaBean. The Action can operate the database by calling JavaBean.

4、SQL语句模板4. SQL statement template

在产生Action的同时,模型层平台302B还会产生一个与该Action对应的SQL配置文件,以辅助支持Action对数据库的操作。具体地,该SQL配置文件包含对数据库操作的SQL语句模板,则无需每次重新生成SQL语句,而只要根据控制层的请求,将关联的数据标识(如数据库表的ID等)添加至SQL语句模板中相应的位置即可,有助于提高工作效率。While generating the Action, the model layer platform 302B will also generate a SQL configuration file corresponding to the Action to assist in supporting the Action's operation on the database. Specifically, the SQL configuration file contains SQL statement templates for database operations, so there is no need to regenerate SQL statements each time, but only to add associated data identifiers (such as database table IDs, etc.) to SQL statements according to the request of the control layer The corresponding position in the template is enough, which helps to improve work efficiency.

当然,程序员可以根据实际情况来对Action进行修改,也可以对SQL配置文件进行修改;而对于数据库的操作功能的修改,也可以自动同步到Action和SQL配置文件中。Of course, programmers can modify the Action or the SQL configuration file according to the actual situation; and the modification of the database operation function can also be automatically synchronized to the Action and SQL configuration files.

在上述技术方案中,通过对视图层表单页面的解析,将表单的各种输入控件作为属性,并生成相应的函数(方法),从而得到JavaBean。上述的动态代理技术可以很好的将前台的视图页面与后台模型层的具体业务逻辑处理类关联起来,让程序员只需要关心具体业务逻辑的处理,不用再去考虑前台与后台的关联、通信,从而提升工作效率。In the above technical solution, various input controls of the form are used as attributes by parsing the form page of the view layer, and corresponding functions (methods) are generated to obtain the JavaBean. The above-mentioned dynamic proxy technology can well associate the front view page with the specific business logic processing class of the background model layer, so that programmers only need to care about the processing of specific business logic, and do not need to consider the association and communication between the foreground and the background , thereby improving work efficiency.

5、“登录界面”的实施例5. Embodiment of "login interface"

1)根据生成的表单,在后台创建一个类,其名称依据表单ID(以便建立关联):Login_jsp.java,各属性与表单的输入控件一致:username、usePassword;相应的方法:getUserName()、setUserName()、getUserPassword()、setUserPassword()。1) According to the generated form, create a class in the background, whose name is based on the form ID (in order to establish a relationship): Login_jsp.java, and the attributes are consistent with the input controls of the form: username, usePassword; corresponding methods: getUserName(), setUserName (), getUserPassword(), setUserPassword().

2)生成SQL脚本。具体代码可以为:2) Generate SQL scripts. The specific code can be:

3)生成基础类。具体代码可以为:3) Generate the base class. The specific code can be:

4)生成Action类。具体代码可以为:4) Generate the Action class. The specific code can be:

三、控制层的自动生成3. Automatic generation of the control layer

1、用户配置1. User Configuration

控制层平台302C初始化系统配置之后,进入控制层管理界面304,并根据用户的配置,自动生成控制层。After the control layer platform 302C initializes the system configuration, it enters the control layer management interface 304, and automatically generates the control layer according to the configuration of the user.

用户需要事先生成相应的配置文件,以用于控制层的初始化配置和控制过程中的功能配置。用户无需具体地编写配置文件的功能代码,仅需对需要进行操作的对象、方式等进行选择或创建,即可由后台自动生成相应的代码,比如对于路径的指定,只需要直接创建该路径即可;对于操作对象的指定,只需要直接选中该对象即可。Users need to generate corresponding configuration files in advance for the initial configuration of the control layer and the function configuration during the control process. Users do not need to specifically write the function code of the configuration file. They only need to select or create the object and method to be operated, and the corresponding code can be automatically generated by the background. For example, for the path specification, it is only necessary to directly create the path. ; For specifying the operation object, you only need to select the object directly.

2、处理逻辑2. Processing logic

除了上述配置,还需要设置具体的处理逻辑。In addition to the above configuration, specific processing logic needs to be set.

1)控制层平台302C提供预先设置的多种框架,用户可以直接对其进行选择,则控制层平台302C可以直接将被选中的框架对应的处理逻辑应用于当前web系统中。具体地,通过将上述处理逻辑写入web、xml等类型的配置文件来实现。1) The control layer platform 302C provides a variety of preset frameworks, and the user can directly select one of them, and the control layer platform 302C can directly apply the processing logic corresponding to the selected framework to the current web system. Specifically, it is realized by writing the above processing logic into web, xml and other types of configuration files.

2)程序员也可以不选择预定义的框架,而是根据实际情况而重新定义处理逻辑。具体地,比如控制层平台302C会自动生成拦截器类来拦截程序员所配置的某种特定格式结尾的请求URL。2) Programmers can also redefine the processing logic according to the actual situation instead of choosing the predefined framework. Specifically, for example, the control layer platform 302C will automatically generate an interceptor class to intercept the request URL ending in a certain format configured by the programmer.

更具体地,如:程序员在控制层管理界面304配置了系统URL后缀名为.do,那么平台系统302会自动生成控制器,以拦截所有.do为后缀名的请求,并按照设计视图层时所配置的路径和ID,作为请求URL发送给拦截器。拦截器解析得到的URL并派发给所对应的Action(业务处理类)。More specifically, such as: the programmer configures the system URL suffix name .do on the control layer management interface 304, then the platform system 302 will automatically generate a controller to intercept all requests with the suffix name . The configured path and ID are sent to the interceptor as the request URL. The interceptor parses the obtained URL and distributes it to the corresponding Action (business processing class).

3、“登录界面”的实施例3. Embodiment of "login interface"

1)登录界面(表单)在视图层设计平台302A上设置为提交到login.do。1) The login interface (form) is set to be submitted to login.do on the view layer design platform 302A.

2)在控制器管理界面304上配置拦截器拦截所有.do的请求。2) Configure an interceptor on the controller management interface 304 to intercept all .do requests.

3)将配置的相关参数写进自动化生成的系统的web.xml文件中。3) Write the configuration related parameters into the web.xml file of the automatically generated system.

4)当点击登录按钮时,会发送参数到login.do,web.xml里面的拦截器拦截到这个请求(request),就将该请求解析并发送到loginAction中,然后由loginAction来进行处理具体地数据库操作等处理过程。4) When the login button is clicked, the parameters will be sent to login.do, and the interceptor in web.xml intercepts the request (request), then parses the request and sends it to loginAction, and then the loginAction handles it specifically Database operations and other processing procedures.

以上结合附图详细说明了本发明的技术方案,本发明提供了一种web系统的自动生成装置和一种web系统的自动生成方法,可以提高web系统开发过程中的自动化过程,减少人工干预,简化开发过程。The above describes the technical solution of the present invention in detail in conjunction with the accompanying drawings. The present invention provides an automatic generation device for a web system and an automatic generation method for a web system, which can improve the automation process in the web system development process and reduce manual intervention. Simplify the development process.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (12)

1.一种web系统的自动生成装置,其特征在于,包括:1. An automatic generation device of a web system, characterized in that, comprising: 视图层生成单元,用于生成所述web系统的视图层的表单界面;A view layer generating unit, configured to generate a form interface of the view layer of the web system; 模型层生成单元,包括:Model layer generation unit, including: 数据库建立子单元,用于建立数据库,所述数据库中存储有与所述表单界面相对应的数据库表,所述数据库表中的字段与所述表单界面中的每个表单控件的属性信息一一对应;The database establishment subunit is used to establish a database, and the database table corresponding to the form interface is stored in the database, and the fields in the database table and the attribute information of each form control in the form interface are one by one correspond; 类创建子单元,创建用于对所述数据库进行操作的业务处理类,以完成所述web系统的模型层的生成;A class creation subunit is used to create a business processing class for operating the database, so as to complete the generation of the model layer of the web system; 控制层生成单元,包括:Control layer generation unit, including: 功能配置子单元,用于根据预设的配置文件进行功能配置;A function configuration subunit, configured to perform function configuration according to a preset configuration file; 策略建立子单元,用于建立控制策略,以完成所述web系统的控制层的生成;A policy establishment subunit is used to establish a control policy to complete the generation of the control layer of the web system; 所述视图层生成单元包括:The view layer generation unit includes: 选择子单元,用于根据接收到的用户的选择指令,选择表单控件和视图类型;The selection subunit is used to select the form control and view type according to the received selection instruction from the user; 表单生成子单元,用于根据获取的键入信息,为每个表单控件添加对应的属性信息和方法信息,以生成所述视图层的表单界面。The form generation subunit is configured to add corresponding attribute information and method information to each form control according to the acquired input information, so as to generate the form interface of the view layer. 2.根据权利要求1所述的web系统的自动生成装置,其特征在于,所述数据库建立子单元用于:2. The automatic generating device of web system according to claim 1, characterized in that, the database establishment subunit is used for: 创建包含所述表单界面中的每个表单控件的属性信息的JavaBean组件;Create a JavaBean component that contains the attribute information of each form control in the form interface; 根据所需的数据库的属性特征,生成数据库表,所述数据库表中的字段与所述JavaBean组件中的所有属性信息一一对应;Generate a database table according to the attribute characteristics of the required database, and the fields in the database table are in one-to-one correspondence with all attribute information in the JavaBean component; 将所述数据库表存储至数据库。The database table is stored in a database. 3.根据权利要求2所述的web系统的自动生成装置,其特征在于,3. The automatic generating device of the web system according to claim 2, characterized in that, 所述JavaBean组件继承用于操作所述数据库的基础类;以及The JavaBean component inherits the base class for operating the database; and 所述业务处理类包括代理组件和所述JavaBean组件,其中,所述代理组件通过调用所述JavaBean组件,实现对所述数据库的操作。The business processing class includes a proxy component and the JavaBean component, wherein the proxy component realizes the operation on the database by calling the JavaBean component. 4.根据权利要求1所述的web系统的自动生成装置,其特征在于,所述模型层生成单元还包括:4. The automatic generating device of the web system according to claim 1, wherein the model layer generating unit further comprises: 模板生成子单元,用于生成并存储与所述业务处理类相关联的SQL模板语句;A template generating subunit, configured to generate and store SQL template statements associated with the business processing class; 其中,所述业务处理类将从接收到的操作请求中解析出的信息添加至所述SQL模板语句,以生成SQL执行语句,并通过所述SQL执行语句,实现对所述数据库的操作。Wherein, the business processing class adds the information parsed from the received operation request to the SQL template statement to generate an SQL execution statement, and realizes the operation on the database through the SQL execution statement. 5.根据权利要求1所述的web系统的自动生成装置,其特征在于,所述控制层生成单元还包括:5. The automatic generating device of the web system according to claim 1, wherein the control layer generating unit further comprises: 文件生成子单元,用于通过检测用户的操作动作,确定操作对象和操作方式,以生成所述预设的配置文件。The file generation subunit is configured to determine the operation object and operation mode by detecting the user's operation action, so as to generate the preset configuration file. 6.根据权利要求1所述的web系统的自动生成装置,其特征在于,所述策略建立子单元用于:6. The automatic generating device of the web system according to claim 1, wherein the policy establishment subunit is used for: 根据用户选择的框架类型,读取所述框架类型对应的预设控制策略;According to the frame type selected by the user, read the preset control strategy corresponding to the frame type; 或根据接收到的用户配置指令,建立实时配置的控制策略。Or establish a real-time configuration control strategy according to the received user configuration instruction. 7.一种web系统的自动生成方法,其特征在于,包括:7. A method for automatically generating a web system, comprising: 生成所述web系统的视图层的表单界面;Generate a form interface of the view layer of the web system; 建立数据库,所述数据库中存储有与所述表单界面相对应的数据库表,所述数据库表中的字段与所述表单界面中的每个表单控件的属性信息一一对应;A database is established, and a database table corresponding to the form interface is stored in the database, and the fields in the database table are in one-to-one correspondence with the attribute information of each form control in the form interface; 创建用于对所述数据库进行操作的业务处理类,以完成所述web系统的模型层的生成;Create a business processing class for operating the database to complete the generation of the model layer of the web system; 根据预设的配置文件进行功能配置,并建立控制策略,以完成所述web系统的控制层的生成;Perform functional configuration according to a preset configuration file, and establish a control strategy to complete the generation of the control layer of the web system; 生成所述表单界面的过程包括:The process of generating the form interface includes: 根据接收到的用户的选择指令,选择表单控件和视图类型,并根据获取的键入信息,为每个表单控件添加对应的属性信息和方法信息,以生成所述视图层的表单界面。Select the form control and view type according to the user's selection instruction received, and add corresponding attribute information and method information to each form control according to the obtained input information, so as to generate the form interface of the view layer. 8.根据权利要求7所述的web系统的自动生成方法,其特征在于,建立所述数据库的过程包括:8. the automatic generation method of web system according to claim 7, is characterized in that, the process of setting up described database comprises: 创建包含所述表单界面中的每个表单控件的属性信息的JavaBean组件;Create a JavaBean component that contains the attribute information of each form control in the form interface; 根据所需的数据库的属性特征,生成数据库表,所述数据库表中的字段与所述JavaBean组件中的所有属性信息一一对应;Generate a database table according to the attribute characteristics of the required database, and the fields in the database table are in one-to-one correspondence with all attribute information in the JavaBean component; 将所述数据库表存储至数据库。The database table is stored in a database. 9.根据权利要求8所述的web系统的自动生成方法,其特征在于,还包括:9. The automatic generation method of web system according to claim 8, is characterized in that, also comprises: 所述JavaBean组件继承用于操作所述数据库的基础类;以及The JavaBean component inherits the base class for operating the database; and 所述业务处理类包括代理组件和所述JavaBean组件,其中,所述代理组件通过调用所述JavaBean组件,实现对所述数据库的操作。The business processing class includes a proxy component and the JavaBean component, wherein the proxy component realizes the operation on the database by calling the JavaBean component. 10.根据权利要求7所述的web系统的自动生成方法,其特征在于,还包括:10. The automatic generation method of web system according to claim 7, is characterized in that, also comprises: 生成并存储与所述业务处理类相关联的SQL模板语句;Generate and store SQL template statements associated with the business processing class; 所述业务处理类将从接收到的操作请求中解析出的信息添加至所述SQL模板语句,以生成SQL执行语句,并通过所述SQL执行语句,实现对所述数据库的操作。The business processing class adds the information parsed from the received operation request to the SQL template statement to generate an SQL execution statement, and implements the operation on the database through the SQL execution statement. 11.根据权利要求7所述的web系统的自动生成方法,其特征在于,还包括:11. the automatic generation method of web system according to claim 7, is characterized in that, also comprises: 通过检测用户的操作动作,确定操作对象和操作方式,以生成所述预设的配置文件。By detecting the user's operation action, the operation object and operation mode are determined to generate the preset configuration file. 12.根据权利要求7所述的web系统的自动生成方法,其特征在于,建立控制策略的过程包括:12. The method for automatically generating a web system according to claim 7, wherein the process of establishing a control strategy comprises: 根据用户选择的框架类型,读取所述框架类型对应的预设控制策略;According to the frame type selected by the user, read the preset control strategy corresponding to the frame type; 或根据接收到的用户配置指令,建立实时配置的控制策略。Or establish a real-time configuration control strategy according to the received user configuration instruction.
CN201310412990.5A 2013-09-11 2013-09-11 The automatically generating device and automatic generation method of web system Expired - Fee Related CN104424338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310412990.5A CN104424338B (en) 2013-09-11 2013-09-11 The automatically generating device and automatic generation method of web system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310412990.5A CN104424338B (en) 2013-09-11 2013-09-11 The automatically generating device and automatic generation method of web system

Publications (2)

Publication Number Publication Date
CN104424338A CN104424338A (en) 2015-03-18
CN104424338B true CN104424338B (en) 2018-02-02

Family

ID=52973312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310412990.5A Expired - Fee Related CN104424338B (en) 2013-09-11 2013-09-11 The automatically generating device and automatic generation method of web system

Country Status (1)

Country Link
CN (1) CN104424338B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104793961A (en) * 2015-05-10 2015-07-22 黄伟 Quick JavaWeb development method and system using native Web codes
CN105262596B (en) * 2015-11-24 2019-03-15 北京字节跳动网络技术有限公司 A kind of network authentication automatic logging method and system
CN105677347A (en) * 2016-01-05 2016-06-15 浪潮通用软件有限公司 Method and device for processing data
CN106021211A (en) * 2016-05-18 2016-10-12 山东达创网络科技股份有限公司 Intelligent form system and generation method thereof
CN106648587A (en) * 2016-09-28 2017-05-10 福州宇嘉软件科技有限公司 Annotation-based Web application code generation method
CN106648690B (en) * 2016-12-29 2020-04-07 北京恒华伟业科技股份有限公司 Automatic code generation method and device
CN106951233B (en) * 2017-03-02 2020-04-17 广州天高软件科技有限公司 Mixed-mode smart phone application development framework system
CN107249106A (en) * 2017-04-28 2017-10-13 太仓鸿策拓达科技咨询有限公司 A kind of production of film and TV changing interface system
CN107491478A (en) * 2017-07-03 2017-12-19 广东南方数码科技股份有限公司 Data processing method, electronic equipment and storage medium based on flow chart directly perceived
CN110019307B (en) * 2017-12-28 2023-09-01 阿里巴巴集团控股有限公司 Data processing method and device
CN108614693B (en) * 2018-03-21 2022-06-24 创新先进技术有限公司 Processing method, device and equipment for page component
CN108984653A (en) * 2018-06-27 2018-12-11 广州市南方人力资源评价中心有限公司 A method of realizing the online development management of multisystem
CN111078213B (en) * 2018-10-18 2024-01-19 马上消费金融股份有限公司 Code generation method and code generation device
CN109284469B (en) * 2018-10-23 2021-01-05 中山市晋华软件科技有限公司 Webpage development framework
CN109783555B (en) * 2018-12-13 2021-07-30 东软集团股份有限公司 Form template storage method and device, storage medium and electronic equipment
CN109783509A (en) * 2019-01-04 2019-05-21 中国银行股份有限公司 SQL scenario generation method and device
CN111026732B (en) * 2019-12-03 2023-11-17 深圳块织类脑智能科技有限公司 Dynamic inspection tour method and system
CN111309316A (en) * 2020-01-16 2020-06-19 深圳壹账通智能科技有限公司 Web frame model establishing method and device
CN111475143A (en) * 2020-04-07 2020-07-31 四川虹美智能科技有限公司 Method and device for customizing software

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117203A (en) * 2009-12-30 2011-07-06 上海杉达学院 Information management system based on Struts frame
CN102650952A (en) * 2011-02-28 2012-08-29 北京航空航天大学 Modeling tool order calling method and system based on MVC framework

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6996800B2 (en) * 2000-12-04 2006-02-07 International Business Machines Corporation MVC (model-view-controller) based multi-modal authoring tool and development environment
CN101694618B (en) * 2009-09-01 2013-03-06 卡斯柯信号有限公司 Automatic mapping method of model layer and view layer data suitable for AJAX frame

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117203A (en) * 2009-12-30 2011-07-06 上海杉达学院 Information management system based on Struts frame
CN102650952A (en) * 2011-02-28 2012-08-29 北京航空航天大学 Modeling tool order calling method and system based on MVC framework

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于MVC模式的Web应用开发研究;刘坤彪等;《浙江交通职业技术学院学报》;20130331;第14卷(第1期);34-40 *

Also Published As

Publication number Publication date
CN104424338A (en) 2015-03-18

Similar Documents

Publication Publication Date Title
CN104424338B (en) The automatically generating device and automatic generation method of web system
US11797273B2 (en) System and method for enhancing component based development models with auto-wiring
RU2536390C2 (en) Automated report generation method
CN102207872B (en) Method and system for customizing Web UI (User Interface) control according to user requirements
WO2015078343A1 (en) Development method for web development system, and web development system
US10372443B2 (en) Multi-platform pattern-based user interfaces
US11733973B2 (en) Interactive graphic design system to enable creation and use of variant component sets for interactive objects
CN101799754A (en) Method and system for developing web application
CN104317559A (en) Visual modeling platform based on GMF
CN115080016A (en) Method, device, device and medium for implementing extended function based on UE editor
CN106815022A (en) A kind of general UI interface creating methods and device based on tree data structure
US20220245206A1 (en) Process flow builder for user-configurable web component sequences
WO2016201813A1 (en) Dynamic layout method and system based on android
CN113778384A (en) C # based rapid development platform building method and system
US20240338302A1 (en) Simulated software features in a simulated sandbox within a production environment
JP2014059699A (en) Demo application generation system and demo application generation program
KR20150098803A (en) A recording media recognized by computer for providing an application developing environment program
KR20150098962A (en) A recording media recognized by computer for providing an application developing environment program
KR20150098989A (en) A recording media recognized by computer for providing an application developing environment program
KR20150099258A (en) A recording media recognized by computer for providing an application developing environment program
KR20150098965A (en) A recording media recognized by computer for providing an application developing environment program
KR20150099177A (en) A recording media recognized by computer for providing an application developing environment program
KR20150099274A (en) A system for providing an application developing environment
KR20150099176A (en) A recording media for providing an application developing environment program
KR20150098779A (en) A method for providing an application developing environment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100871, Beijing, Haidian District Cheng Fu Road 298, founder building, 9 floor

Patentee after: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee after: FOUNDER APABI TECHNOLOGY Ltd.

Patentee after: PKU FOUNDER INFORMATION INDUSTRY GROUP CO.,LTD.

Address before: 100871, Beijing, Haidian District Cheng Fu Road 298, founder building, 9 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: FOUNDER APABI TECHNOLOGY Ltd.

Patentee before: FOUNDER INFORMATION INDUSTRY HOLDINGS Co.,Ltd.

CP01 Change in the name or title of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20220916

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: FOUNDER APABI TECHNOLOGY Ltd.

Address before: 100871, Beijing, Haidian District Cheng Fu Road 298, founder building, 9 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: FOUNDER APABI TECHNOLOGY Ltd.

Patentee before: PKU FOUNDER INFORMATION INDUSTRY GROUP CO.,LTD.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180202

CF01 Termination of patent right due to non-payment of annual fee