Method and device for generating codes

A code generation and method body technology, applied in the field of programming, can solve problems that affect application development efficiency, achieve the effects of improving development efficiency, improving work efficiency, and saving programming work

Active Publication Date: 2014-02-19
STATE GRID CORP OF CHINA +2
View PDF5 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, when developing applications based on the above-mentioned layered approach, it is necessary to write codes at the three levels of presentation layer, business logic layer, a

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for generating codes
  • Method and device for generating codes
  • Method and device for generating codes

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0050] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0051] The present invention provides a code generation method, comprising:

[0052] S11. Create a business object model for each business of the web application. Creating the business object model includes creating business entities of the business and creating associations between business entities;

[0053] In practical applications, object-oriented design methods can be used to create business object models for various businesses of Web applications. Speci...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a method and device for generating codes. The method comprises the steps that service object models are created for all services of the Web application, wherein creation of the service object models comprises creation of service entities of the services and creation of associated relations of all service entities; an interface model is created for the Web application, wherein the interface model comprises interface templates corresponding to the service entities in the service object models; the codes are generated by a code generation engine according to the service object models and the interface model. Due to the fact that the service object models of all services of the application are created, the interface model of the application is created, and then the codes are generated by the code generation engine according to the service object models and the interface model, developers can obtain needed program codes through the code generation engine after creating the service object models and determining display forms of all services in the interface of application software, a large amount of programming work of the developers is omitted, and further application development efficiency is effectively improved.

Description

technical field [0001] The present invention relates to the field of programming, and more specifically, relates to a code generation method and device. Background technique [0002] In the prior art, the concept of layering is generally applied in the development of Web applications to increase the scalability and reusability of the application system; a typical layering method is to divide Web applications into presentation layer, business logic layer and persistence layer There are three levels in total. Among them, the presentation layer is the definition of some common Web components, including forms, lists, trees, buttons, etc.; the business logic layer is for adding, deleting, modifying, and checking operations for different business objects; the persistence layer is for different persistent objects. Data access operations, including insert, query, modify, and delete. [0003] For each of the above three layers, the corresponding open source framework can be used to...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/44
Inventor 田涛于烨任东晓
Owner STATE GRID CORP OF CHINA
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products