language-icon Old Web
English
Sign In

Code generation method and device

2009 
The invention discloses a code generation method, which comprises the following steps of: receiving a service scene selected by a user, scene configuration information, a persistence model selected for the service scene, and interface configuration information, storing the service scene and the scene configuration information in a scene model and storing the interface configuration information inan interface model; according to the persistence model, reading information required by a persistence layer code and adding the information to a corresponding position in a preset scene code templateto generate the persistence layer code; reading the interface configuration information and adding the interface configuration information to the corresponding position in the scene code template to generate an interface layer code; in combination with the scene model, the persistence model and the interface model, calculating the information required for deriving a presentation layer code and a logical layer code and storing the information into the scene model; and according to the scene model, reading the information required by the presentation layer code and the logical layer code and adding the information to the corresponding position in the scene code template to generate the presentation layer code and the logical layer code. The code generation method improves code generation efficiency.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    0
    References
    0
    Citations
    NaN
    KQI
    []