CN111273902B - Project and directory architecture generation method and device - Google Patents

Project and directory architecture generation method and device Download PDF

Info

Publication number
CN111273902B
CN111273902B CN201811481708.8A CN201811481708A CN111273902B CN 111273902 B CN111273902 B CN 111273902B CN 201811481708 A CN201811481708 A CN 201811481708A CN 111273902 B CN111273902 B CN 111273902B
Authority
CN
China
Prior art keywords
component
folder
page
view
editing interface
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
CN201811481708.8A
Other languages
Chinese (zh)
Other versions
CN111273902A (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.)
Shenzhen Ipanel TV Inc
Original Assignee
Shenzhen Ipanel TV Inc
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 Shenzhen Ipanel TV Inc filed Critical Shenzhen Ipanel TV Inc
Priority to CN201811481708.8A priority Critical patent/CN111273902B/en
Publication of CN111273902A publication Critical patent/CN111273902A/en
Application granted granted Critical
Publication of CN111273902B publication Critical patent/CN111273902B/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/38Creation or generation of source code for implementing user interfaces

Abstract

The application provides a project and catalog architecture generating method and device, which are applied to project generating tools based on MVC architecture, wherein the project generating tools respond to project generating requests to create model source folders, view source folders and controller source folders corresponding to the projects requested to be generated; after receiving a request for indicating to generate a page in an item, generating a first folder uniquely corresponding to the page in a view source folder for storing a view file of the page, generating a second folder uniquely corresponding to the page in a model source folder for storing a business logic file of the page, and storing a data table introduced by the business logic file in a controller source folder; when the method and the device are used for generating the project, different folders can be generated in the model source folder and the view source folder aiming at different pages, so that the pages in the generated project can be conveniently distinguished, the pages in the project can be subjected to catalog management, and the catalog architecture of the generated project is more perfect.

Description

Project and directory architecture generation method and device
Technical Field
The invention relates to the technical field of computer software, in particular to a method and a device for generating project and directory architecture.
Background
MVC is also known as Model View Controller, an abbreviation for model-view-controller, a model of software design, and a model of service logic, data, and interface display.
In generating the project architecture based on the project generation tools, a series of directories may be generated based on the target generation tools in the project generation tools, which may be understood as a directory architecture that is closer to the MVC pattern, but which is not perfect for the true project structure. For example, since the directory structure only involves source folders that generate MVC patterns, these source folders do not involve directory management for specific pages in the project, and thus there is often a problem that the project directory structure is not perfect.
In view of the above, it is an urgent problem to provide a method and apparatus for generating a catalog architecture of items, so that the catalog architecture of the generated items is more complete.
Disclosure of Invention
In view of the above, the present invention provides a method and apparatus for generating a catalog architecture of items, so as to perfect the catalog architecture of the generated items.
The technical proposal is as follows:
An item generation method applied to an item generation tool based on MVC architecture, the item generation tool creating a model source folder, a view source folder and a controller source folder corresponding to an item requested to be generated in response to an item generation request, the method comprising:
Receiving a request for indicating to generate a page in the project, generating a view editing interface and a business logic editing interface of the page, wherein the view editing interface is positioned under a first folder corresponding to the page and created in the view source folder, the business logic editing interface is positioned under a second folder corresponding to the page and created in the model source folder, the first folders corresponding to different pages are different, and the second folders corresponding to different pages are different;
receiving editing operation on the view editing interface, and taking the edited view editing interface as a view file of the page; receiving editing operation of the business logic interface, and taking the edited business logic editing interface as a business logic file of the page;
and determining whether the controller source folder stores the data table introduced in the business logic file, if not, receiving the operation of introducing the data table, and introducing the data table into the controller source folder.
Preferably, the method further comprises:
And generating the associated information of the page, wherein the associated information comprises basic information of a view file of the page and basic information of a business logic file of the page, and the basic information comprises a storage address.
Preferably, the method further comprises creating an initially empty component folder in response to the item generation request;
the receiving the editing operation on the view editing interface, taking the edited view editing interface as the view file of the page, and comprises the following steps:
receiving editing operation of the view editing interface, and introducing component information into the view editing interface;
determining whether the component indicated by the component information is a preset component or not;
if the component indicated by the component information is a preset component, acquiring and storing the component into the component folder;
If the component indicated by the component information is not a preset component, popping up a component editing interface, responding to the operation of the component editing interface, generating the component and storing the component into the component folder;
And taking the edited view editing interface as a view file of the page.
Preferably, the method further comprises creating a common resource storage folder corresponding to the item in response to the item generation request, the common resource storage folder being used for storing functions imported by the business logic page and functions imported in the component.
Preferably, the method further comprises creating a static information folder corresponding to the item in response to the item generation request, the static information folder being used for storing static information introduced in the business logic file and static information introduced in the component.
Preferably, the method further comprises:
determining a request type carried by the page and an application server for processing a request belonging to the request type;
Storing the associated request type and the address information of the application server into an information comparison folder, wherein the information comparison folder is created in response to the item generation request and corresponds to the item requested to be generated.
A catalog architecture generation method for a catalog generation tool, the catalog generation tool being for use with an item generation tool, the method comprising:
responding to the project generation request, and creating a model source folder, a view source folder and a controller source folder corresponding to the project generated by the request;
Receiving a request for indicating to generate a page in the project, creating a first folder corresponding to the page in the view source folder, and creating a view editing page of the page in the first folder; and creating a second folder corresponding to the page in the model source folder, and creating a business logic editing page of the page in the second folder; the edited view editing interface is used as a view file of the page, and the edited business logic editing interface is used as a business logic file; the controller source folder is used for storing a data table introduced in the business logic file.
An item generating apparatus comprising:
A first creation unit for creating a model source folder, a view source folder, and a controller source folder corresponding to the item requested to be generated in response to the item generation request;
An editing interface generating unit, configured to receive a request for indicating to generate a page in the item, generate a view editing interface and a business logic editing interface of the page, where the view editing interface is located under a first folder corresponding to the page created in the view source folder, and the business logic editing interface is located under a second folder corresponding to the page created in the model source folder, where the first folders corresponding to different pages are different, and the second folders corresponding to different pages are different;
The page generation unit is used for receiving the editing operation of the view editing interface and taking the edited view editing interface as a view file of the page; receiving editing operation of the business logic interface, and taking the edited business logic editing interface as a business logic file of the page;
And the data table importing unit is used for determining whether the controller source folder stores the data table imported in the business logic file, and if not, receiving the importing operation of the data table and importing the data table into the controller source folder.
Preferably, the method further comprises:
And the association information generation unit is used for generating association information of the page, wherein the association information comprises basic information of a view file of the page and basic information of a business logic file of the page, and the basic information comprises a storage address.
A catalog architecture generation apparatus, comprising:
A second creation unit for creating a model source folder, a view source folder, and a controller source folder corresponding to the item requested to be generated in response to the item generation request;
A third creation unit configured to receive a request indicating generation of a page in the item, create a first folder corresponding to the page in the view source folder, and create a view editing page of the page in the first folder; and creating a second folder corresponding to the page in the model source folder, and creating a business logic editing page of the page in the second folder; the edited view editing interface is used as a view file of the page, and the edited business logic editing interface is used as a business logic file; the controller source folder is used for storing a data table introduced in the business logic file.
The embodiment of the application provides a method and a device for generating project and catalog architecture, which are applied to a project generating tool based on MVC architecture, wherein the project generating tool responds to a project generating request to create a model source folder, a view source folder and a controller source folder corresponding to the project requested to be generated; after receiving a request for indicating to generate a page in an item, generating a first folder uniquely corresponding to the page in a view source folder for storing a view file of the page, generating a second folder uniquely corresponding to the page in a model source folder for storing a business logic file of the page, and storing a data table introduced by the business logic file in a controller source folder; therefore, when the project is generated, different folders can be generated in the model source folder and the view source folder aiming at different pages, so that the generated projects are conveniently distinguished, the catalog management is carried out on the pages in the project, and the catalog architecture of the generated project is more perfect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for generating items according to an embodiment of the present application;
FIG. 2 is a flowchart of another method for generating items according to an embodiment of the present application;
FIG. 3 is a flowchart of another method for generating items according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for generating a directory architecture according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an item generating device according to an embodiment of the present application;
Fig. 6 is a schematic structural diagram of a directory structure generating device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides a project generation method which is applied to a project generation tool based on an MVC architecture; the project generating tool can be installed on a terminal, and a user can achieve the purpose of generating projects by using the project generating tool installed on the terminal.
The above is merely a preferred manner of the item provided by the embodiment of the present application, and the inventor may set the specific content of the item according to his own needs, which is not limited herein.
Referring to fig. 1, fig. 1 is a flowchart of an item generating method according to an embodiment of the present invention.
The project generation method provided by the embodiment of the invention is applied to a project generation tool installed on a terminal, and the project generation tool can respond to a project generation request to create at least one folder corresponding to a project requested to be generated by the project generation request, wherein the at least one folder is a model source folder, a view source folder and a controller source folder respectively.
As shown in fig. 1, the method includes:
S101, creating a model source folder, a view source folder and a controller source folder corresponding to an item requested to be generated in response to an item generation request;
s102, receiving a request for indicating to generate pages in an item, generating a view editing interface and a business logic editing interface of the pages, wherein the view editing interface is positioned under a first folder corresponding to the pages and created in a view source folder, the business logic editing interface is positioned under a second folder corresponding to the pages and created in a model source folder, the first folders corresponding to different pages are different, and the second folders corresponding to different pages are different;
optionally, the user sends an item generating request to the item generating tool, and the item generating tool receives and responds to the item generating request to create a model source folder, a view source folder and a controller source folder corresponding to the item requested to be generated; after generating the model source folder, the view source folder and the controller source folder corresponding to the project, the project generating tool can further receive a request which is input by a user and indicates to generate the page in the project, after receiving the request which indicates to generate the page in the project, the project generating tool creates a first folder which is uniquely corresponding to the page in the view source folder corresponding to the project, creates a second folder which is uniquely corresponding to the page in the model source folder corresponding to the project, generates a view editing interface of the page which is generated by the request in the first folder, and generates a business logic editing interface of the page which is generated by the request in the second folder.
S103, receiving editing operation of the view editing interface, and taking the edited view editing interface as a view file of the page; receiving editing operation of the business logic interface, and taking the edited business logic editing interface as a business logic file of the page;
the user can edit the view editing interface of the page requested to be generated, and the view editing interface of the page can be regarded as a view file of the page after the user edits the page. Thus, the generated view file of the page can be located in: and in a first folder corresponding to the page, which is created in a view source folder corresponding to an item to which the page belongs.
And the user can edit the service logic editing interface of the page which is required to be generated, and the service logic editing interface of the page can be regarded as the service logic file of the page after the user edits the page. Thus, the generated business logic file of the page can be located in the following way: and creating a second folder corresponding to the page in the model source folder corresponding to the item to which the page belongs.
In the embodiment of the present application, preferably, after generating a model source folder, a view source folder and a controller source file corresponding to an item, for an item, different first folders may be created in the view source folder corresponding to the item for different pages in the item, and different second folders may be created in the model source folder corresponding to the item for different pages in the item.
S104, determining whether a controller source folder stores a data table introduced in a business logic file, and if not, executing a step S105;
Alternatively, if it is determined that the data table introduced in the business logic file is stored in the controller source folder, step S105 is not performed.
S105, receiving an importing operation of the data table, and importing the data table into a controller source folder.
The project generating method provided by the invention can be used for creating different model source folders, view source folders and controller source folders for different projects, and also can be used for creating different first file folders in the view source folders and different second file folders in the model source folders for different pages in the projects, and importing data tables introduced by the pages in the projects in the controller source folders; based on the method, the generated different items correspond to different model source files, view source folders and controller source folders, different pages in the items correspond to different first folders in the view source folders corresponding to the items, and different second folders in the model source folders corresponding to the items, so that the different pages are distinguished based on the different first folders and the different second folders, and the directory architecture of the generated items is more perfect.
Further, the method for generating the project provided by the invention further comprises the following steps: and generating the associated information of the page, wherein the associated information comprises basic information of a view file of the page and basic information of a business logic file of the page, and the basic information comprises a storage address.
According to the item generation method provided by the invention, after the view file, the business logic file and the data table introduced by the business logic file of the page are generated, the associated information of the page can be generated, wherein the associated information of the page comprises the storage address of the view file of the page and the storage address of the business logic file of the page.
The storage address of the view file of the page is a first folder in which the view file of the page is located, and the storage address of the business logic file of the page is a second folder in which the business logic file of the page is located.
Further, the association information of the page may further include a table name of a data table introduced by the service logic file of the page.
Further, in order to avoid that the person skilled in the art does not know the storage position of the data table introduced by the service logic file of the page, the association information of the page may further include the storage position of the data table introduced by the service logic file of the page, where the storage position is a controller source folder uniquely corresponding to an item to which the page belongs.
When the method and the device are used for generating the project, the associated information of each page in the project is generated, and further, the user can conveniently maintain the generated project in the later period in a mode of displaying the associated information of each page in the project to the user, for example, after the user determines the storage positions of the view files and the business logic files of the pages in the project based on the associated information of the pages in the project, the view files and the business logic files of the pages can be quickly found to carry out corresponding modification. Furthermore, when the associated information of the page also comprises the table name and the storage position of the data table introduced in the business logic file of the page, the user can conveniently and rapidly determine the data table introduced in the business logic file of the page to carry out corresponding modification, thereby greatly providing convenience for the user to carry out post maintenance on the project and improving the post maintenance efficiency of the project.
Fig. 2 is a flowchart of another item generating method according to an embodiment of the present application.
As shown in fig. 2, the method includes:
S201, creating a model source folder, a view source folder, a controller source folder and an initial empty component folder corresponding to the item requested to be generated in response to the item generation request;
in the embodiment of the present application, preferably, a view folder, a controller folder, and a component folder corresponding to an item requested to be generated are created in response to an item generation request, where the component folder is an empty folder.
S202, receiving a request for indicating to generate pages in an item, generating a view editing interface and a business logic editing interface of the pages, wherein the view editing interface is positioned under a first folder corresponding to the pages and created in a view source folder, the business logic editing interface is positioned under a second folder corresponding to the pages and created in a model source folder, the first folders corresponding to different pages are different, and the second folders corresponding to different pages are different;
s203, receiving editing operation of the view editing interface, and determining whether component information is introduced into the view editing interface; if yes, go to step S204;
s204, determining whether the component indicated by the component information is a preset component; if yes, go to step S205; if not, executing step S206;
S205, acquiring the components and storing the components into a component folder;
S206, popping up the component editing interface, responding to the operation of the component editing interface, generating a component and storing the component into a component folder;
In the embodiment of the application, preferably, the component can be generated based on the MVC framework in response to the operation of the component editing interface, and the generated component is stored in the component folder.
S207, taking the edited view editing interface as a view file of the page; receiving editing operation on a business logic interface, and taking the edited business logic editing interface as a business logic file of a page;
S208, determining whether a controller source folder stores a data table introduced in a business logic file; if not, executing step S209;
S209, receiving an importing operation of the data table, and importing the data table into a controller source folder.
Furthermore, in the project generating method provided by the embodiment of the application, when the model source folder, the view source folder, the controller source folder and the component source folder corresponding to the project are created in response to the project generating request, a public resource storage folder can be further created, and the public resource storage folder is used for storing functions introduced by the business logic page and functions introduced in the component.
When the service logic page is introduced with the function, the introduced function can be embodied in the service logic page, and the specific content of the function is stored in a public resource storage folder; similarly, when a function is introduced into a component, the introduced function may be only embodied in the component, and specific contents of the introduced function in the component may be stored in a common resource storage folder.
Therefore, the same function can be called by a plurality of different files, and the function taking is realized; moreover, the generated file can be more concise and clear; further, the method can facilitate the post maintenance of the generated project, for example, in the case of introducing the same function to a plurality of files, the function is stored in a public resource storage folder, and the function stored in the public resource storage folder is only required to be modified once, so that the modification of all files introducing the function in the project can be realized, and the problems of time waste, easy error in modification and the like caused by the modification of each file introducing the function are avoided.
Further, in the method for generating an item according to the embodiment of the present application, when a model source folder, a view source folder, and a controller source folder corresponding to the item are created in response to an item generation request, a static information folder corresponding to the item may be created, where the static information folder is used to store static information introduced in a service logic file and static information introduced in a component.
Fig. 3 is a flowchart of another method for generating an item according to an embodiment of the present application.
As shown in fig. 3, the method includes:
s301, creating a model source folder, a view source folder, a controller source folder and an information comparison source folder corresponding to an item requested to be generated in response to an item generation request;
s302, receiving a request for indicating to generate pages in an item, generating a view editing interface and a business logic editing interface of the pages, wherein the view editing interface is positioned under a first folder corresponding to the pages and created in a view source folder, the business logic editing interface is positioned under a second folder corresponding to the pages and created in a model source folder, the first folders corresponding to different pages are different, and the second folders corresponding to different pages are different;
s303, receiving editing operation of the view editing interface, and taking the edited view editing interface as a view file of the page; receiving editing operation of the business logic interface, and taking the edited business logic editing interface as a business logic file of the page;
s304, determining whether a controller source folder stores a data table introduced in a business logic file; if not, go to step S305;
S305, receiving an importing operation of a data table, and importing the data table into a controller source folder;
s306, determining the request type carried by the page and an application server for processing the request belonging to the request type;
s307, storing the associated request type and the address information of the application server into an information comparison folder.
The project generation method provided by the application is characterized in that the request type carried by the page in the project is determined, and the address information of an application server used for processing the request belonging to the request type is obtained; and the determined request type and the address information of the application server for processing the request of the request type are associated, so that the associated request type and the address information of the application server for processing the request of the request type are stored in the information comparison folder, and the application server for processing the request carried by the page can be rapidly determined after the request type carried by the page is determined in the process of maintaining the generated item, thereby realizing rapid maintenance of the item.
Fig. 4 is a flowchart of a method for generating a catalog architecture according to an embodiment of the present application, where the method for generating a catalog architecture shown in fig. 4 is applied to a catalog generating tool, and the catalog generating tool may be disposed in an item generating tool, so that a user may generate a catalog of a generated item by the catalog generating tool disposed in the item generating tool during the process of generating the item based on the item generating tool.
As shown in fig. 4, the method includes:
S401, responding to an item generation request, and creating a model source folder, a view source folder and a controller source folder corresponding to the item generated by the request;
Optionally, the item generating tool receives an item generating request input by a user, and the catalog generating tool in the item generating tool creates a model source folder, a view source folder and a controller source folder corresponding to the item requested to be generated.
S402, receiving a request for indicating to generate pages in an item, creating a first folder corresponding to the pages in a view source folder, and creating view editing pages of the pages in the first folder; the second folder is created in the model source folder and corresponds to the page, and the business logic editing page of the page is created in the second folder; the edited view editing interface is used as a view file of the page, and the edited business logic editing interface is used as a business logic file; the controller source folder is used for storing data tables introduced in the business logic file.
The embodiment of the application provides a catalog architecture generation method which is applied to a target generation tool in an item generation tool based on MVC architecture, wherein the catalog generation tool responds to an item generation request to create a model source folder, a view source folder and a controller source folder corresponding to the item requested to be generated; and receiving a request indicating to generate a page in an item, generating a first folder uniquely corresponding to the page in a view folder, generating a second folder corresponding to the page in a model folder, storing a view edit page of the page in the generated first folder, storing a business logic page of the page in the generated second folder, and storing a data table introduced in the business logic page in a controller folder. Therefore, when the project is generated, the catalog generating tool based on the project generating tool can generate different folders in the model source folder and the view source folder aiming at different pages, so that the generated projects are conveniently distinguished, the catalog management is carried out on the pages in the project, and the catalog architecture of the generated project is more perfect.
Fig. 5 is a schematic structural diagram of an item generating device according to an embodiment of the present application.
As shown in fig. 5, the apparatus includes:
A first creation unit 51 for creating a model source folder, a view source folder, and a controller source folder corresponding to the item requested to be generated in response to the item generation request;
an editing interface generating unit 52, configured to receive a request for indicating to generate a page in an item, generate a view editing interface and a business logic editing interface of the page, where the view editing interface is located under a first folder corresponding to the page created in a view source folder, the business logic editing interface is located under a second folder corresponding to the page created in a model source folder, the first folders corresponding to different pages are different, and the second folders corresponding to different pages are different;
A page generation unit 53, configured to receive an editing operation of the view editing interface, and use the edited view editing interface as a view file of a page; receiving editing operation of the business logic interface, and taking the edited business logic editing interface as a business logic file of the page;
The data table importing unit 54 is configured to determine whether the controller source folder stores the data table imported in the service logic file, and if not, receive an importing operation for the data table, and import the data table into the controller source folder.
Further, the item generating device provided by the embodiment of the application further comprises a related information generating unit, wherein the related information generating unit is used for generating related information of the page, the related information comprises basic information of a view file of the page and basic information of a business logic file of the page, and the basic information comprises a storage address.
Fig. 6 is a schematic structural diagram of a directory structure generating device according to an embodiment of the present application.
As shown in fig. 6, the apparatus includes:
A second creation unit 61 for creating a model source folder, a view source folder, and a controller source folder corresponding to the item requested to be generated in response to the item generation request;
a third creating unit 62 for receiving a request indicating generation of a page in an item, creating a first folder corresponding to the page in a view source folder, creating a view edit page of the page in the first folder; the second folder is created in the model source folder and corresponds to the page, and the business logic editing page of the page is created in the second folder; the edited view editing interface is used as a view file of the page, and the edited business logic editing interface is used as a business logic file; the controller source folder is used for storing data tables introduced in the business logic file.
The embodiment of the application provides a project and catalog architecture generating device which is applied to a project generating tool based on an MVC architecture, wherein the project generating tool responds to a project generating request to create a model source folder, a view source folder and a controller source folder corresponding to the project requested to be generated; after receiving a request for indicating to generate a page in an item, generating a first folder uniquely corresponding to the page in a view source folder for storing a view file of the page, generating a second folder uniquely corresponding to the page in a model source folder for storing a business logic file of the page, and storing a data table introduced by the business logic file in a controller source folder; therefore, when the project is generated, different folders can be generated in the model source folder and the view source folder aiming at different pages, so that the generated projects are conveniently distinguished, the catalog management is carried out on the pages in the project, and the catalog architecture of the generated project is more perfect.
The foregoing has described in detail a method and apparatus for generating a project and directory architecture, and specific examples have been used herein to illustrate the principles and embodiments of the present invention, and the above examples are only for aiding in understanding the method and core idea of the present invention; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the idea of the present invention, the present disclosure should not be construed as limiting the present invention in summary.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include, or is intended to include, elements inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. An item generation method applied to an item generation tool based on MVC architecture, the item generation tool creating a model source folder, a view source folder, and a controller source folder corresponding to an item requested to be generated in response to an item generation request, the method comprising:
Receiving a request for indicating to generate a page in the project, generating a view editing interface and a business logic editing interface of the page, wherein the view editing interface is positioned under a first folder corresponding to the page and created in the view source folder, the business logic editing interface is positioned under a second folder corresponding to the page and created in the model source folder, the first folders corresponding to different pages are different, and the second folders corresponding to different pages are different;
receiving editing operation on the view editing interface, and taking the edited view editing interface as a view file of the page; receiving editing operation of the business logic interface, and taking the edited business logic editing interface as a business logic file of the page;
Determining whether the controller source folder stores the data table introduced in the business logic file, if not, receiving the importing operation of the data table, and importing the data table into the controller source folder;
the method further includes creating an initially empty component folder in response to the item generation request;
the receiving the editing operation on the view editing interface, taking the edited view editing interface as the view file of the page, and comprises the following steps:
receiving editing operation of the view editing interface, and introducing component information into the view editing interface;
determining whether the component indicated by the component information is a preset component or not;
if the component indicated by the component information is a preset component, acquiring and storing the component into the component folder;
If the component indicated by the component information is not a preset component, popping up a component editing interface, responding to the operation of the component editing interface, generating the component and storing the component into the component folder;
And taking the edited view editing interface as a view file of the page.
2. The method as recited in claim 1, further comprising:
And generating the associated information of the page, wherein the associated information comprises basic information of a view file of the page and basic information of a business logic file of the page, and the basic information comprises a storage address.
3. The method of claim 1, further comprising creating a common resource store folder corresponding to the item in response to the item generation request, the common resource store folder for storing functions imported by the business logic page and functions imported in the component.
4. A method according to claim 3, further comprising creating a static information folder corresponding to the item in response to the item generation request, the static information folder for storing static information introduced in the business logic file and static information introduced in the component.
5. The method as recited in claim 2, further comprising:
determining a request type carried by the page and an application server for processing a request belonging to the request type;
Storing the associated request type and the address information of the application server into an information comparison folder, wherein the information comparison folder is created in response to the item generation request and corresponds to the item requested to be generated.
6. A catalog architecture generation method for a catalog generation tool, the catalog generation tool being for use with an item generation tool, the method comprising:
responding to the project generation request, and creating a model source folder, a view source folder and a controller source folder corresponding to the project generated by the request;
receiving a request for indicating to generate a page in the project, creating a first folder corresponding to the page in the view source folder, and creating a view editing interface of the page in the first folder; and creating a second folder corresponding to the page in the model source folder, and creating a business logic editing interface of the page in the second folder; the edited view editing interface is used as a view file of the page, and the edited business logic editing interface is used as a business logic file; the controller source folder is used for storing a data table introduced in the business logic file;
the method further includes creating an initially empty component folder in response to the item generation request;
the generation process of the view file of the page comprises the following steps:
receiving editing operation of the view editing interface, and introducing component information into the view editing interface;
determining whether the component indicated by the component information is a preset component or not;
if the component indicated by the component information is a preset component, acquiring and storing the component into the component folder;
If the component indicated by the component information is not a preset component, popping up a component editing interface, responding to the operation of the component editing interface, generating the component and storing the component into the component folder;
And taking the edited view editing interface as a view file of the page.
7. An item generating apparatus, comprising:
A first creation unit for creating a model source folder, a view source folder, and a controller source folder corresponding to the item requested to be generated in response to the item generation request;
An editing interface generating unit, configured to receive a request for indicating to generate a page in the item, generate a view editing interface and a business logic editing interface of the page, where the view editing interface is located under a first folder corresponding to the page created in the view source folder, and the business logic editing interface is located under a second folder corresponding to the page created in the model source folder, where the first folders corresponding to different pages are different, and the second folders corresponding to different pages are different;
The page generation unit is used for receiving the editing operation of the view editing interface and taking the edited view editing interface as a view file of the page; receiving editing operation of the business logic interface, and taking the edited business logic editing interface as a business logic file of the page;
a data table importing unit, configured to determine whether the controller source folder stores a data table imported in the service logic file, and if not, receive an importing operation for the data table, and import the data table into the controller source folder;
The device is also for: creating an initially empty component folder in response to the item generation request;
The page generation unit is specifically configured to:
receiving editing operation of the view editing interface, and introducing component information into the view editing interface;
determining whether the component indicated by the component information is a preset component or not;
if the component indicated by the component information is a preset component, acquiring and storing the component into the component folder;
If the component indicated by the component information is not a preset component, popping up a component editing interface, responding to the operation of the component editing interface, generating the component and storing the component into the component folder;
And taking the edited view editing interface as a view file of the page.
8. The apparatus as recited in claim 7, further comprising:
And the association information generation unit is used for generating association information of the page, wherein the association information comprises basic information of a view file of the page and basic information of a business logic file of the page, and the basic information comprises a storage address.
9. A catalog architecture generation apparatus, comprising:
A second creation unit for creating a model source folder, a view source folder, and a controller source folder corresponding to the item requested to be generated in response to the item generation request;
A third creation unit configured to receive a request indicating generation of a page in the item, create a first folder corresponding to the page in the view source folder, and create a view editing interface of the page in the first folder; and creating a second folder corresponding to the page in the model source folder, and creating a business logic editing interface of the page in the second folder; the edited view editing interface is used as a view file of the page, and the edited business logic editing interface is used as a business logic file; the controller source folder is used for storing a data table introduced in the business logic file;
The device is also for: creating an initially empty component folder in response to the item generation request;
the generation process of the view file of the page comprises the following steps:
receiving editing operation of the view editing interface, and introducing component information into the view editing interface;
determining whether the component indicated by the component information is a preset component or not;
if the component indicated by the component information is a preset component, acquiring and storing the component into the component folder;
If the component indicated by the component information is not a preset component, popping up a component editing interface, responding to the operation of the component editing interface, generating the component and storing the component into the component folder;
And taking the edited view editing interface as a view file of the page.
CN201811481708.8A 2018-12-05 2018-12-05 Project and directory architecture generation method and device Active CN111273902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811481708.8A CN111273902B (en) 2018-12-05 2018-12-05 Project and directory architecture generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811481708.8A CN111273902B (en) 2018-12-05 2018-12-05 Project and directory architecture generation method and device

Publications (2)

Publication Number Publication Date
CN111273902A CN111273902A (en) 2020-06-12
CN111273902B true CN111273902B (en) 2024-04-26

Family

ID=71003202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811481708.8A Active CN111273902B (en) 2018-12-05 2018-12-05 Project and directory architecture generation method and device

Country Status (1)

Country Link
CN (1) CN111273902B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722372A (en) * 2012-05-25 2012-10-10 上海学智科技有限公司 Method and system for automatically generating codes through classification and configuration
KR20140019627A (en) * 2012-08-06 2014-02-17 인크로스 주식회사 An authoring tool for web applications and the authoring method thereof
CN103605516A (en) * 2013-11-12 2014-02-26 国家电网公司 Flexible Web display frame model architecture designing method
CN104111826A (en) * 2013-04-19 2014-10-22 杭州新世纪电子科技有限公司 Software project development method and device
CN106528108A (en) * 2016-10-31 2017-03-22 任子行网络技术股份有限公司 WEB development method and device based on code file route
CN106598620A (en) * 2016-12-21 2017-04-26 深圳南北互联网金融服务有限公司 Code generation method and code generator
CN106648690A (en) * 2016-12-29 2017-05-10 北京恒华伟业科技股份有限公司 Code automatic generation method and apparatus
CN107346242A (en) * 2017-05-12 2017-11-14 南京物开网络科技有限公司 A kind of MVC frame systems for being applied to HybridAPP exploitations based on AppCan
CN108427551A (en) * 2018-03-24 2018-08-21 深圳市前海安测信息技术有限公司 MVC assembly type program development frames create system and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7076766B2 (en) * 2002-06-03 2006-07-11 Steve Wirts Software application development methods and framework
AU2003262702A1 (en) * 2002-08-23 2004-03-11 Jway Group, Inc. Extensible user interface (xui) framework and development environment
US20050076291A1 (en) * 2003-10-01 2005-04-07 Yee Sunny K. Method and apparatus for supporting page localization management in a Web presentation architecture

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722372A (en) * 2012-05-25 2012-10-10 上海学智科技有限公司 Method and system for automatically generating codes through classification and configuration
KR20140019627A (en) * 2012-08-06 2014-02-17 인크로스 주식회사 An authoring tool for web applications and the authoring method thereof
CN104111826A (en) * 2013-04-19 2014-10-22 杭州新世纪电子科技有限公司 Software project development method and device
CN103605516A (en) * 2013-11-12 2014-02-26 国家电网公司 Flexible Web display frame model architecture designing method
CN106528108A (en) * 2016-10-31 2017-03-22 任子行网络技术股份有限公司 WEB development method and device based on code file route
CN106598620A (en) * 2016-12-21 2017-04-26 深圳南北互联网金融服务有限公司 Code generation method and code generator
CN106648690A (en) * 2016-12-29 2017-05-10 北京恒华伟业科技股份有限公司 Code automatic generation method and apparatus
CN107346242A (en) * 2017-05-12 2017-11-14 南京物开网络科技有限公司 A kind of MVC frame systems for being applied to HybridAPP exploitations based on AppCan
CN108427551A (en) * 2018-03-24 2018-08-21 深圳市前海安测信息技术有限公司 MVC assembly type program development frames create system and method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Implementation of MVC (Model-View-Controller) design architecture to develop web based Institutional repositories: A tool for Information and knowledge sharing;Vinod Kumar等;《Indian Research Journal of Extension Education》;1-9 *
基于ASP.NET MVC3和jQuery的网站应用开发;郭昊;《中国优秀硕士学位论文全文数据库 信息科技辑》;I139-191 *
基于MVC模式的Web框架构建与应用;卢长利;《中国优秀硕士学位论文全文数据库 信息科技辑》;I139-328 *

Also Published As

Publication number Publication date
CN111273902A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
CN106648690B (en) Automatic code generation method and device
JP5219928B2 (en) Editing apparatus, editing method, and program
JP2008140273A (en) Document providing system and information providing program
CN107315764B (en) Method and system for updating non-relational database associated data
US20150066977A1 (en) Method and system for managing digital resources
EP3444725A1 (en) Man-machine interaction method and device therefor
CN102193925A (en) On-line multi-version management method and device for manuscripts in manuscript system
CN103701817A (en) Method and device for generating configuration file
CN110806866A (en) Generation method and device of front-end management system
CN110555317B (en) Application file change processing method, device and system
JP6193406B2 (en) Serialization for differential encoding
CN103176979B (en) The online duplication method of format file content, equipment and system
CN111273902B (en) Project and directory architecture generation method and device
CN113407356A (en) Data processing method and device, electronic equipment and storage medium
CN112817915A (en) Automatic multi-product document uniform publishing and displaying method
US11163793B2 (en) Ordered list management in a replicated environment
CN110989999A (en) Code generation method and device, electronic equipment and medium
CN102171696A (en) Producing method and device for ordered material
CN115269548A (en) Method and system for generating data warehouse development model and related equipment
JP2016513298A (en) Electronic document providing method, system, parent server, and child client
CN107491466A (en) client device, information processing system and information processing method
Pulverer Transparent, reproducible data
JP2011170587A (en) Software development support apparatus and method
CN107885502B (en) Interface processing method, processing device, interface management method and management device
CN111967226A (en) Document format conversion method, device and medium

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