Page layout method, device, computer equipment and storage medium
Through the page orchestration method with business field objects as the core, the problems of low efficiency and high communication costs in front-end page development in enterprise-level application development are solved, and efficient links between front-end page development and back-end service are achieved, reducing development difficulty and workload.
Patent Information
- Application Number
- CN202411463873.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-10-21
AI Technical Summary
In the enterprise-level application development of existing technologies, the front-end page development model has problems such as low development efficiency, high requirements for developers' skills, poor business and technology connection, high front-end communication costs, cumbersome mapping relationship configuration and prone to errors.
Through the page orchestration method with business domain objects as the core, the functions to be developed are determined and the corresponding business domain objects are bound, the page common logic is configured, and the mapping relationship between page controls and back-end services is automatically established to realize the connection between front-end page orchestration and back-end services.
It reduces the communication cost and difficulty between the business, front-end and back-end, improves development efficiency, reduces development workload, avoids bugs introduced by artificial configuration, improves functional quality, and enables business personnel and non-technical personnel to use front-end low-code technology to develop page functions.
Smart Images

Figure CN118981314B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to a page layout method, device, computer equipment and storage medium. Background Art
[0002] At present, in enterprise-level application development, the following development methods are usually included. Traditional front-end development mode: Based on html / html5, traditional jsp / php technology + various template frameworks + various JS frameworks are used, and the MVC mode is generally used to develop front-end pages. Front-end development mode after front-end and back-end separation: Based on html / html5, the front-end technology framework (such as VUE, REACT) after front-end and back-end separation is used in combination with JS / TS and other technologies to develop front-end pages. And the conventional front-end page development method: Development based on the conventional front-end low-code platform, that is, based on the front-end page arrangement capability provided by the front-end low-code platform, low-code / zero-code development is performed by dragging and dropping. This method mainly realizes the development of the front-end page by dragging and dropping the layout / display / form controls on the canvas of the page, and then calls the services provided by the back-end by parameter assembly / mapping to realize the connection between the front-end and the back-end, including the assembly of input parameters and the mapping assignment of return parameters.
[0003] Among them, the traditional front-end development model and the front-end development model after the separation of the front-end and back-end are both the most traditional development models that realize the development of front-end pages through coding. These two methods are not as good as the development model based on the conventional front-end low-code platform in terms of development efficiency and skill requirements for developers. In the conventional front-end low-code development model, the business language of the front-end is the layout of the page and the typesetting of the controls, and the business language of the back-end is the business object and business logic. The front-end and the back-end are connected and communicated through the interface protocol. A model from technical implementation to business, which is exactly the opposite of the conventional model from business needs to technical implementation, has a significant counter-effect on the smooth connection between business and technology, resulting in poor connection between business and technology, unfriendly to the business understanding, connection and implementation of business personnel and technical personnel, increasing the difficulty and cost of communication, and not conducive to the mastery and use of front-end low-code technology by business personnel / other non-technical personnel. In addition, due to the different business languages of the front-end and back-end, the communication cost between the front-end and back-end is increased, and the workload of front-end and back-end integration and testing is also implicitly increased. And every time each sub-page involves a back-end service call, it is necessary to perform tedious configuration work on the mapping between front-end controls and service input parameters, as well as the mapping between service return parameters and front-end controls. This mapping configuration is tedious, labor-intensive, error-prone and difficult to troubleshoot; and in one function, the same or similar mapping relationship will involve multiple configurations, increasing the development workload. Summary of the invention
[0004] Based on this, it is necessary to provide a page layout method, device, computer equipment and storage medium to solve at least one problem existing in the above-mentioned prior art.
[0005] In a first aspect, the embodiment of the present application is implemented as follows: a page layout method is provided, comprising:
[0006] Identify features to be developed;
[0007] Determine the business domain object bound to the function to be developed, and determine the page layout method corresponding to the function to be developed;
[0008] Based on the business domain object, configure the common logic of each page of the function to be developed, wherein the common logic refers to configuring the attribute option setting information of the business domain object according to the attributes of the business domain object;
[0009] Determine the business domain object attributes and page layout controls corresponding to each page, and arrange the business domain object attributes and page layout controls into the corresponding page to form an arrangement page;
[0010] A mapping relationship between each page control of the arrangement page and the backend service is automatically established to call the backend service, wherein the input / output parameters of the backend service are designed through the business domain object.
[0011] In one embodiment, after determining the business domain object bound to the function to be developed based on the function to be developed, the method includes:
[0012] Determining an object type of the business domain object;
[0013] When the object type of the business domain object is a primary object, setting key attributes of the business domain object;
[0014] When the object type of the business domain object is a slave object, key attributes, associated attributes, and master object associated attributes of the business domain object are set.
[0015] In one embodiment, the determining, based on the function to be developed, a business domain object bound to the function to be developed includes:
[0016] Determine the business domain to which the business domain object bound to the function to be developed belongs after being generated and the database where the database table to which the business domain belongs is located;
[0017] Obtaining a database table to which the business domain belongs based on the database query to generate a business domain object bound to the function to be developed; or
[0018] A domain object corresponding to the function to be developed is selected from the existing domain objects as the business domain object bound to the function to be developed.
[0019] In one embodiment, configuring the common logic of each page of the function to be developed based on the business domain object includes:
[0020] In the property option setting interface corresponding to the business domain object, the property option setting information of the business domain object is configured.
[0021] In one embodiment, after automatically establishing the mapping relationship between each page control of the arrangement page and the backend service, the following steps are included:
[0022] Previewing and functionally testing the layout page on which the mapping relationship is established;
[0023] When all the layout pages are tested, the development completion function is obtained, and the development completion function is configured into the menu of the formal system for release.
[0024] In one embodiment, determining the page layout mode corresponding to the function to be developed includes:
[0025] The page layout mode is abstracted through a recursively nested custom layout, wherein the layout controls of the custom layout include a straight layout control, a label layout control, a form container control, a table container control, a button container control and a tree container control.
[0026] In one embodiment, the method further includes:
[0027] Abstracting the function definition of the function to be developed and the custom pages constituting the function to be developed;
[0028] Abstracting the business domain objects involved in the functions to be developed;
[0029] Abstracting the common logic of each custom page in the function to be developed;
[0030] The page layout mode of each custom page in the function to be developed is abstracted.
[0031] In a second aspect, a page layout device is provided, comprising:
[0032] A function-to-be-developed determining unit, used for determining functions to be developed;
[0033] A business domain object and page layout mode determination unit, used to determine the business domain object bound to the function to be developed, and determine the page layout mode corresponding to the function to be developed;
[0034] A common logic configuration unit, configured to configure the common logic of each page of the function to be developed based on the business domain object, wherein the common logic refers to configuring the attribute option setting information of the business domain object according to the attributes of the business domain object;
[0035] A page layout unit, used to determine the business domain object attributes and page layout controls corresponding to each page, and layout the business domain object attributes and page layout controls into the corresponding page to form a layout page;
[0036] A mapping relationship establishing unit is used to automatically establish a mapping relationship between each page control of the arrangement page and the backend service to call the backend service, wherein the output / input parameters of the backend service are designed through the business domain object.
[0037] In a third aspect, a computer device is provided, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the page layout method as described above when executing the computer-readable instructions.
[0038] In a fourth aspect, a readable storage medium is provided, wherein the readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the page layout method as described above are implemented.
[0039] The above-mentioned page layout method, device, computer equipment and storage medium, the method implementation includes: determining the function to be developed; determining the business domain object bound to the function to be developed, and determining the page layout mode corresponding to the function to be developed; based on the business domain object, configuring the common logic of each page of the function to be developed, wherein the common logic refers to configuring the attribute option setting information of the business domain object according to the business domain object attribute; determining the business domain object attribute and page layout control corresponding to each page, and arranging the business domain object attribute and page layout control into the corresponding page to form an arrangement page; automatically establishing a mapping relationship between each page control of the arrangement page and the back-end service to call the back-end service, wherein the input / output parameters of the back-end service are designed through the business domain object. In the embodiment of the present application, the business domain object is used as the business language at the front end and the back end, the front end arranges the page through the business domain object, and the back end designs the input / output parameters with the business domain object, takes the business domain object as the center, arranges the front-end page and associates the back-end service, and abstracts and encapsulates the common logic of the front end on the business domain object. It can automatically establish the mapping relationship between the front-end page space and the back-end service, effectively reducing the communication cost and difficulty between the business, front-end, back-end and testing. The model of front-end page development with business domain objects as the core can effectively reduce the difficulty and requirements of using front-end low-code development technology, so that business personnel / other non-technical personnel can use front-end low-code technology to develop front-end page functions. It can also reduce the communication cost between the front-end and back-end and the workload of subsequent front-end and back-end integration and testing, avoid the configuration of the mapping relationship between the front-end controls and the back-end parameters in most scenarios, reduce the development workload, and avoid bugs introduced by human configuration, and improve the quality of functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 It is a flow chart of a page layout method in one embodiment of the present application;
[0042] Figure 2 This is a schematic diagram of a configuration interface for binding relevant information configuration interface of a business domain object in one embodiment of the present application;
[0043] Figure 3 This is a schematic diagram of the interface configuration of the business domain object attribute option interface in one embodiment of the present application;
[0044] Figure 4a This is a layout demonstration diagram of a page layout interface in one embodiment of the present application;
[0045] Figure 4b Shows Figure 4a A partial interface diagram of the property component on the left side of the page layout interface;
[0046] Figure 5 This is a schematic diagram of an application environment of a core model in an embodiment of the present application;
[0047] Figure 6 is a structural schematic diagram of a page layout device in one embodiment of the present application;
[0048] Figure 7 It is a schematic diagram of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] In the embodiment of the present application, business domain objects are used as a unified business language between business, front-end, back-end and testers. Business personnel / product managers use business domain objects to comb business, write requirements and design product prototypes; front-end personnel design and develop front-end pages with business domain objects as the core; back-end personnel design and develop back-end services with business domain objects as the cornerstone of the protocol between the front and back ends; testers understand the business and write front-end test cases based on business domain objects. Using business domain objects as a common unified language can effectively reduce the communication cost and difficulty between business, front-end, back-end and testing; the model of front-end page development with business domain objects as the core can effectively reduce the difficulty and requirements of using front-end low-code development technology, so that business personnel / other non-technical personnel can use front-end low-code technology to develop front-end page functions. With business domain objects as the core, pages are arranged by dragging and dropping business domain object attributes instead of dragging and dropping page controls. This development model is more intuitive and closer to the business, and can effectively reduce the development workload.
[0051] In the embodiment of the present application, the front-end and the back-end are based on the business domain objects and the basic interface protocol. That is, the front-end page can place the corresponding attributes of the business domain objects in the corresponding page layout by dragging, pulling, and dragging the business domain objects and their attributes in the configuration interface to realize the arrangement of the page. The back-end service can design the input and output parameters with the business domain objects as the core. After the current back-end is developed, the business domain object data between the front-end and the back-end can automatically establish a mapping relationship, so that most scenarios can no longer configure the mapping relationship between the front-end controls and the back-end parameters, thereby reducing the communication cost between the front-end and the back-end and the workload of the subsequent front-end and back-end integration and testing, and avoiding the configuration of the mapping relationship between the front-end controls and the back-end parameters in most scenarios, reducing the development workload, and avoiding the bugs introduced by artificial configuration, and improving the functional quality.
[0052] In the embodiment of the present application, the common logic of the front end is uniformly abstracted and encapsulated on the business domain object. The common logic between different sub-pages of the same function, such as the drop-down option configuration of the same attribute, the linkage logic between attributes (including hiding / displaying, value linkage, etc.), the pop-up selection of related information configuration, the pop-up viewing of related information configuration, and the translation logic associated with these configurations, can be uniformly configured on the business domain object and the attributes of the object, and a unified parsing and implementation logic can be implemented to achieve the purpose of one-time configuration and multiple uses. Since the above-mentioned common logic is relatively complex in implementation, avoiding repeated configuration can effectively reduce the development workload. Targeted testing can be performed on only one configuration, which can effectively reduce the error probability and testing workload. Moreover, in subsequent modifications and maintenance, only the configuration of one place needs to be adjusted and checked, which can effectively reduce the workload of modification and maintenance.
[0053] In one embodiment, if Figure 1 As shown, a page layout method is provided, comprising the following steps:
[0054] In step S110, the function to be developed is determined;
[0055] Optionally, the function to be developed may include function definition and function customization page, which may be obtained through abstraction. For example, specific functions may be abstracted, such as user management function, tag management function, etc. The function customization page refers to the abstraction of specific pages constituting the function, for example, the user management function includes a query list page, a user addition page, a user information modification page, and a user information viewing page.
[0056] In step S120, the business domain object bound to the function to be developed is determined, and the page layout mode corresponding to the function to be developed is determined;
[0057] like Figure 2 As shown, after determining the function to be developed, the binding function of the business domain object is introduced, that is, when creating the function to be developed, the bound business domain object of the function to be developed can be set, and the binding type, key attributes, associated attributes, main object associated attributes and display order of the bound business domain object can be set.
[0058] The business domain object may be a domain object, which usually refers to an operation object or entity involved in the front end, for example, a certain product, brand, etc.
[0059] In the embodiment of the present application, after determining the function to be developed, the layout form of each custom page of the function to be developed can be abstracted through a recursive nested custom layout. The layout control of the function custom layout may include a vertical layout control, a label layout control, a form container control, a table container control, a button container control, a tree container control, etc.
[0060] In step S130, based on the business domain object, the common logic of each page of the function to be developed is configured, wherein the common logic refers to configuring the attribute option setting information of the business domain object according to the attributes of the business domain object;
[0061] See also Figure 3 After determining the business domain object, you can configure the common page logic such as the linkage type of the attribute, the optional value configuration method, the linkage parent object and attribute, the display and hide configuration, the pop-up selection configuration, and the query type in the attribute option setting page of the business domain object. It should be noted that the common logic of each page in the function to be developed is an abstraction of unified settings from the perspective of the business domain object, and the function binding object attribute option settings can be set according to the bound business domain object attributes.
[0062] Among them, the attribute option setting information may specifically include the drop-down option configuration for the same attribute, the linkage logic between attributes (including hiding / displaying, value linkage, etc.), the pop-up selection related information configuration, the pop-up viewing related information configuration, and the translation logic associated with these configurations.
[0063] It should be noted that after setting the common logic of each page on the property option setting page of the business domain object, there is no need to repeat the setting in each custom page of the function to be developed, and it can be used directly, which reduces the development workload and improves development efficiency.
[0064] In step S140, the business domain object attributes and page layout controls corresponding to each page are determined, and the business domain object attributes and page layout controls are arranged in the corresponding page to form an arrangement page;
[0065] In the embodiment of the present application, when performing page layout, the page layout can be performed mainly with business domain object attributes and supplemented by form controls. For example, taking the user management function as an example, its bound business domain object is the user domain object, then when the page is arranged, the bound object attributes such as user code, user name, user type, login name, login password, etc. can be displayed in the newly added area of the user domain object. The developer can place the required attributes in the corresponding position of the current page by dragging, pulling, and dragging to realize the arrangement of the page. Figure 4a is a schematic diagram of a layout demonstration of a page layout interface in an embodiment of the present application, Figure 4b Shows Figure 4a A partial interface diagram of the property component on the left side of the page layout interface. The properties of multiple bound business domain objects are displayed in the label definition on the left. Drag in the direction of the arrow to generate corresponding content on the page, such as label code, label name, label category, parent label, display order, remarks, and cancel and add buttons.
[0066] In step S150, a mapping relationship between each page control of the arrangement page and the backend service is automatically established to call the backend service, wherein the input / output parameters of the backend service are designed through the business domain object.
[0067] In the embodiment of the present application, the business domain object is used as the unified business language of the front-end and the back-end, that is, the basic protocol. The front-end can perform page layout through the business domain object, and the back-end can design the input and output parameters based on the business domain object. After the front-end can layout the page according to the business domain object bound to the function to be developed, the page form control value of the layout page can be automatically mapped with the input and output parameters of the back-end service, without the need for manual mapping relationship processing, so as to improve development efficiency and reduce development workload.
[0068] For example, the page layout process is described by taking the tag management function as a function to be developed, which specifically includes the following steps:
[0069] (1) Click the "New" button to enter the "Function New Page";
[0070] (2) In "New Function Page", you can select "Custom Function Template" as the function template. You can see that the template contains only one function custom page by default: "Custom Function - Main Page";
[0071] (3) Select "Create from database table" for creation mode, select the business domain to which the domain object belongs after it is generated and the database where the database table is located. Set the table name prefix "pcc_" to be ignored;
[0072] (4) Select the database table "pcc_label_def" as the binding object, set the binding type to "primary object", and set the key attribute to the primary key "label_id" of the table. Since this object is the primary object, there is no need to set the associated attributes and the primary object associated attributes;
[0073] (5) Click the "OK" button to complete the initial creation of the "Tag Management" function;
[0074] (6) The backend logic will automatically generate the corresponding backend domain objects and methods. The default generation logic generates the domain object LabelDef, all the attributes of the domain object, and the corresponding new save, modify save, query list, query details and delete methods of the domain object LabelDef and the corresponding business logic.
[0075] (7) At the same time, the backend logic will instantiate the data of entity tables such as function definition, function custom page, function custom page associated area, function area, function binding object, function binding object attribute option setting by default, and automatically generate the "Custom Function-Main Page";
[0076] (8) After the initial creation is completed, the system will jump to the editing page of the "Tag Management" function by default;
[0077] (9) On the editing page of the "Label Management" function, the function name, the list of bound objects (including LabelDef domain objects) and the function customization list ("Customized Function - Main Page") are displayed by default. Through "Add from Page", you can create "Label Add Page", "Label Information Modification Page", "Label Information View", "Parent Label Selection Page" and other sub-pages;
[0078] (10) Click the "Edit" button of the LabelDef domain object in the binding object list to enter the editing page of the binding object LabelDef. On this page, you can maintain the basic information of the binding object and the option information of the attributes;
[0079] (11) Click the "Set" button for each attribute to set the option information for each attribute (optional), including the attribute drop-down list information, linkage information between attributes, display and hide configuration information, pop-up selection configuration information, and supported query capabilities (fuzzy query / multi-value query / range query), etc.
[0080] (12) After the settings are completed, click the "Save" button to return to the editing page of the "Tag Management" function;
[0081] (13) On the editing page of the "Tag Management" function, click the "Edit" button for each function area in the function custom page list to enter the function custom page editing page. This page can set the function area name and page configuration information; click the "Visual Design" button to enter the visual design page of the custom page;
[0082] (14) In the visual design of the custom page, layout controls, business domain object attributes and buttons that need to be displayed on the page are arranged on the page by dragging and dropping, and the page effect is displayed in a WYSIWYG manner; click the business domain object attribute displayed on the page to set the attribute display information, including the attribute display name, display type, whether it is read-only, the number of rows occupied, the number of columns occupied, the display width, whether it is required, and other display styles; click the button displayed on the page to set the button configuration information, including the button name, whether it is a custom operation, the operation type, the display type, the corresponding backend service information, the belonging binding object, the target area and other operation configuration information (configurable input parameters, output parameters and other information); after the arrangement is completed, click the Save button to save the current arrangement information;
[0083] (15) Complete the design and layout of custom pages such as "Custom Function - Main Page", "Tag Add Page", "Tag Information Modification Page", "Tag Information View", and "Up-level Tag Selection Page" in sequence;
[0084] (16) After the front-end page information configuration is completed, the back-end business logic orchestration function can be used to further adjust the back-end domain methods, such as adding validity verification of domain object attributes, setting default values, and adjusting personalized logic.
[0085] (17) After the front-end and back-end are adjusted and the cache is refreshed, you may preview and test the "Tag Management" function through the "Preview" button on the edit page of the "Tag Management" function;
[0086] (18) After the test is passed, you can configure the tag management function to the menu of the official system through the URL of the "tag management function": "customizedFunc.html?funcId=79fdb174bbef4527aaa6d836e171f5bc" to officially release the function;
[0087] (19) The development process of the “Tag Management” function is officially completed. If the “Tag Management” function needs to be adjusted or upgraded in the future, it can also be modified and upgraded in the above way.
[0088] In an embodiment of the present application, a page layout method is provided, including: determining a function to be developed; determining a business domain object bound to the function to be developed, and determining a page layout mode corresponding to the function to be developed; configuring the common logic of each page of the function to be developed based on the business domain object, wherein the common logic refers to configuring the attribute option setting information of the business domain object according to the business domain object attribute; determining the business domain object attribute and page layout control corresponding to each page, and arranging the business domain object attribute and page layout control into the corresponding page to form an arrangement page; automatically establishing a mapping relationship between each page control of the arrangement page and the backend service to call the backend service, wherein the input / output parameters of the backend service are designed through the business domain object. In an embodiment of the present application, the business domain object is used as the business language at the front end and the back end, the front end arranges the page through the business domain object, and the back end designs the input / output parameters with the business domain object, takes the business domain object as the center, arranges the front end page and associates the back end service, and abstracts and encapsulates the common logic of the front end on the business domain object. It can automatically establish the mapping relationship between the front-end page space and the back-end service, effectively reducing the communication cost and difficulty between the business, front-end, back-end and testing. The model of front-end page development with business domain objects as the core can effectively reduce the difficulty and requirements of using front-end low-code development technology, so that business personnel / other non-technical personnel can use front-end low-code technology to develop front-end page functions. It can also reduce the communication cost between the front-end and back-end and the workload of subsequent front-end and back-end integration and testing, avoid the configuration of the mapping relationship between the front-end controls and the back-end parameters in most scenarios, reduce the development workload, and avoid bugs introduced by human configuration, and improve the quality of functions.
[0089] In an embodiment of the present application, after determining the business domain object bound to the function to be developed based on the function to be developed, the method includes:
[0090] Determining an object type of the business domain object;
[0091] When the object type of the business domain object is a primary object, setting key attributes of the business domain object;
[0092] When the object type of the business domain object is a slave object, key attributes, associated attributes, and master object associated attributes of the business domain object are set.
[0093] Optionally, after determining the business domain object bound to the function to be developed, the object type of the business domain object can be set in the business domain object property option setting interface, for example, a master object or a slave object. If it is a master object, the key attributes of the business domain object, i.e., the primary key, can be further set; if the business domain object is a slave object, it is also necessary to further set associated attributes, i.e., foreign keys, and master object associated attributes, such as the attributes of the master object that store slave object data.
[0094] In an embodiment of the present application, determining the business domain object bound to the function to be developed based on the function to be developed includes:
[0095] Determine the business domain to which the business domain object bound to the function to be developed belongs after being generated and the database where the database table to which the business domain belongs is located;
[0096] Obtaining a database table to which the business domain belongs based on the database query to generate a business domain object bound to the function to be developed; or
[0097] A domain object corresponding to the function to be developed is selected from the existing domain objects as the business domain object bound to the function to be developed.
[0098] Optionally, the creation method of the business domain object can be selected. If it is created for a database table, the business domain to which the business domain object bound to the function to be developed belongs after generation and the database where the database table is located can be selected, and then the corresponding database table can be selected as the bound business domain object, thereby generating the bound business domain object. Alternatively, the required domain object can be selected from the pre-built domain objects as the business domain object bound to the function to be developed. For example, when developing other functions, the same business domain object is generated, which can be directly stored for backup, so that when other functions have the same business domain object, it can be directly called without executing the steps of generating the business domain object again, thereby improving development efficiency.
[0099] In an embodiment of the present application, configuring the common logic of each page of the function to be developed based on the business domain object includes:
[0100] In the property option setting interface corresponding to the business domain object, the property option setting information of the business domain object is configured.
[0101] Optionally, after determining the business domain object bound to the function to be developed, the attribute option setting information of the business domain object can be directly configured in the attribute option setting interface of the business domain object. For example, the drop-down option configuration of the same attribute, the linkage logic between attributes (including hiding / displaying, value linkage, etc.), the pop-up selection of related information configuration, the pop-up viewing of related information configuration, and the translation logic associated with these configurations. After setting it here, there is no need to repeat the setting when arranging the page in each custom page, and it can be used directly. By uniformly abstracting and encapsulating the common logic of the front end in the business domain object, unified parsing and implementation logic can be achieved, and the purpose of multiple uses of one configuration can be achieved, which can effectively reduce the development workload. Only targeted testing is performed on the configuration in one place, which can reduce the error probability and testing workload. In subsequent modifications and maintenance, only the configuration in one place needs to be adjusted and tested, which can reduce the workload of modification and maintenance.
[0102] In an embodiment of the present application, after automatically establishing the mapping relationship between each page control of the arrangement page and the backend service, the method includes:
[0103] Previewing and functionally testing the layout page on which the mapping relationship is established;
[0104] When all the layout pages are tested, the development completion function is obtained, and the development completion function is configured into the menu of the formal system for release.
[0105] Optionally, after the mapping relationship is established, you can preview and test the function according to the "Preview" button on the editing page of the function to be developed. After the test is passed, the function to be developed can be configured in the menu of the formal system and officially released, thus completing the development process of the function to be developed. If the function to be developed needs to be adjusted or iteratively upgraded, you can also re-arrange the new page of the function to be developed or re-arrange the original page.
[0106] In an embodiment of the present application, determining the page layout mode corresponding to the function to be developed includes:
[0107] The page layout mode is abstracted through a recursively nested custom layout, wherein the layout controls of the custom layout include a straight layout control, a label layout control, a form container control, a table container control, a button container control and a tree container control.
[0108] Optionally, the page layout mode may include a function custom layout, a function custom page layout associated area, a function area, a function area operation, a function area binding attribute, etc. The function custom layout may be abstracted by a recursively nested custom layout. The layout controls of the function custom layout include a vertical layout control, a label layout control, a form container control, a table container control, a button container control, a tree container control, etc. When arranging a page, the corresponding layout control may be directly selected by dragging, pulling, or dragging to realize the page layout.
[0109] In one embodiment of the present application, the method further includes:
[0110] Abstracting the function definition of the function to be developed and the custom pages constituting the function to be developed;
[0111] Abstracting the business domain objects involved in the functions to be developed;
[0112] Abstracting the common logic of each custom page in the function to be developed;
[0113] The page layout mode of each custom page in the function to be developed is abstracted.
[0114] See also Figure 5 , provides a core domain model, which includes the abstraction of functions, the abstraction of business domain objects involved in functions, the abstraction of common logic of each page in functions, and the abstraction of page layout. Abstraction refers to extracting the common content of multiple things. In the figure, 1 represents a one-to-one relationship, 1...* represents a one-to-many relationship, and 0...* represents a one-to-0 or one-to-many relationship. For example, the attribute option setting information of a function binding object may include 0, 1, or more.
[0115] Among them, the abstraction of functions includes the abstraction of function definitions and the abstraction of function customization pages. Function definition: It is an abstraction of a specific function, such as the common user management function. Function definition and function customization page can be a one-to-many relationship, that is, a function can be composed of one or more function customization pages, but a function customization page can only belong to one function. Taking the user management function as an example, the user management function includes the query list page, the user addition page, the user information modification page, and the user information viewing page. Function definition and function binding object, that is, the business domain object bound to the function, are a one-to-many relationship, that is, a function can contain one or more function binding objects, and a function binding object can only belong to one function. Taking the user management function as an example, the user management function can be bound to the user domain object. Function customization page: It is an abstraction of the specific pages that make up the function. For example, the user management function can include the query list page, the user addition page, the user information modification page, and the user information viewing page.
[0116] Among them, the business domain objects involved in the function to be developed are abstracted. For example, the user domain objects involved in the user management function, it should be noted that the business domain objects are the unified business language of the front-end and back-end, and the function binding objects are related to the domain objects. In the function binding object, the type of the binding object can be set, such as the master object or the slave object, and the key attribute of the binding object, that is, the primary key. If it is a slave object, it is also necessary to set the associated attribute, that is, the foreign key, and the associated attribute of the master object. The master object stores the attributes of the slave object data. It should be noted that the relationship between the function binding object and the function binding object attribute option setting is one-to-many, that is, a function binding object can set 0, 1 or more function binding object attribute option settings on the attribute. For example, the user domain object of the binding object of the user management function, in the function binding object attribute option setting, the optional value method of the user type field is set. The relationship between the function binding object and the function area binding attribute is one-to-many, and a function binding object can display 0, 1 or more binding attributes in different function areas. For example, the user domain object of the binding object of the user management function displays the binding attributes such as user code, user name, user type, login name, login password, etc. in the new area.
[0117] Among them, the common logic of each custom page in the function to be developed is abstracted. The shared logic of each page is an abstraction of unified settings from the perspective of business domain objects, for example, the drop-down option configuration of the same attribute, the linkage logic between attributes (including hiding / displaying, value linkage, etc.), the pop-up selection of related information configuration, the pop-up viewing of related information configuration, and the translation logic associated with these configurations, etc. After setting it here, there is no need to repeat the setting in each custom page, and it can be used directly. The function binding object attribute option setting is set according to the attribute of the binding object. It can achieve the purpose of one-time configuration and multiple uses, avoid repeated configuration, and reduce the development workload. And targeted testing can be performed on one configuration, which can reduce the error probability and testing workload. In subsequent modifications and maintenance, it is necessary to adjust and check one configuration, which can reduce the workload of modification and maintenance.
[0118] Among them, the page layout mode of each custom page in the function to be developed is abstracted, specifically including: Function custom layout: the layout form of the page is abstracted through a recursively nested custom layout, and the layout controls of the function custom layout include vertical layout controls, label layout controls, form container controls, table container controls, button container controls, tree container controls, etc. Function custom page layout association area: for container-type controls, there is a one-to-one function custom page layout association area, which is mainly used to associate the corresponding function area. Function area: there is a one-to-one relationship between container-type controls and function areas, and specific form controls and button controls are laid out through function areas. Function area operation: the button control information arranged in a specific function area is recorded and saved in the entity, such as recording the buttons to be displayed, the type of buttons, the display order of buttons, the backend services bound to buttons, etc. in the function area. Function area binding attributes: the form control information arranged in a specific function area is recorded and saved in the entity, such as recording the attributes to be displayed, the display type of attributes, the display order of attributes, and the size of occupied blocks, etc. in the function area.
[0119] In the embodiment of the present application, the business domain objects are used as the business language in the front-end and the back-end. The front-end arranges the pages through the business domain objects, and the back-end uses the business domain objects for input / output parameter design. The business domain objects are used as the center to arrange the front-end pages and associate the back-end services. The mapping relationship between the front-end page space and the back-end services is automatically established, which effectively reduces the communication cost and difficulty between the business, the front-end, the back-end, and the test. The mode of front-end page development with business domain objects as the core can effectively reduce the difficulty and requirements of using the front-end low-code development technology, so that business personnel / other non-technical personnel can use the front-end low-code technology to develop the front-end page functions. It can also reduce the communication cost between the front-end and the back-end and the workload of subsequent front-end and back-end integration and testing, avoid the configuration of the mapping relationship between the front-end controls and the back-end parameters in most scenarios, and the development efficiency can be improved by 20-40% compared with the conventional front-end low-code platform technology, and avoid the bugs introduced by human configuration, and improve the quality of functions.
[0120] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0121] In one embodiment, a page layout device is provided, which corresponds one-to-one to the page layout method in the above embodiment. Figure 6 As shown, the page layout device includes a function determination unit 10 to be developed, a business domain object and page layout mode determination unit 20, a common logic configuration unit 30, a page layout unit 40 and a mapping relationship establishment unit 50. The functional modules are described in detail as follows:
[0122] A function to be developed determining unit 10, used to determine the function to be developed;
[0123] The business domain object and page layout mode determination unit 20 is used to determine the business domain object bound to the function to be developed, and determine the page layout mode corresponding to the function to be developed;
[0124] A common logic configuration unit 30, configured to configure the common logic of each page of the function to be developed based on the business domain object, wherein the common logic refers to configuring the attribute option setting information of the business domain object according to the attributes of the business domain object;
[0125] The page layout unit 40 is used to determine the business domain object attributes and page layout controls corresponding to each page, and to layout the business domain object attributes and page layout controls into the corresponding page to form a layout page;
[0126] The mapping relationship establishing unit 50 is used to automatically establish a mapping relationship between each page control of the arrangement page and the backend service to call the backend service, wherein the input / output parameters of the backend service are designed through the business domain object.
[0127] In an embodiment of the present application, the device further includes a business domain object configuration unit, which is used to:
[0128] Determining an object type of the business domain object;
[0129] When the object type of the business domain object is a primary object, setting key attributes of the business domain object;
[0130] When the object type of the business domain object is a slave object, key attributes, associated attributes, and master object associated attributes of the business domain object are set.
[0131] In an embodiment of the present application, the business domain object and page layout mode determination unit 20 is further used to:
[0132] Determine the business domain to which the business domain object bound to the function to be developed belongs after being generated and the database where the database table to which the business domain belongs is located;
[0133] Obtaining a database table to which the business domain belongs based on the database query to generate a business domain object bound to the function to be developed; or
[0134] A domain object corresponding to the function to be developed is selected from the existing domain objects as the business domain object bound to the function to be developed.
[0135] In an embodiment of the present application, the common logic configuration unit 30 is further used for:
[0136] In the property option setting interface corresponding to the business domain object, the property option setting information of the business domain object is configured.
[0137] In one embodiment of the present application, the device further includes a testing unit, which is used to:
[0138] Previewing and functionally testing the layout page on which the mapping relationship is established;
[0139] When all the layout pages are tested, the development completion function is obtained, and the development completion function is configured into the menu of the formal system for release.
[0140] In an embodiment of the present application, the business domain object and page layout mode determination unit 20 is further used to:
[0141] The page layout mode is abstracted through a recursively nested custom layout, wherein the layout controls of the custom layout include a straight layout control, a label layout control, a form container control, a table container control, a button container control and a tree container control.
[0142] In an embodiment of the present application, the device further includes an abstraction unit, which is used to abstract the function definition of the function to be developed and the custom pages constituting the function to be developed;
[0143] Abstracting the business domain objects involved in the functions to be developed;
[0144] Abstracting the common logic of each custom page in the function to be developed;
[0145] The page layout mode of each custom page in the function to be developed is abstracted.
[0146] In the embodiment of the present application, the business domain objects are used as the business language in the front-end and the back-end. The front-end arranges the pages through the business domain objects, and the back-end uses the business domain objects for input / output parameter design. The business domain objects are used as the center to arrange the front-end pages and associate the back-end services. The mapping relationship between the front-end page space and the back-end services is automatically established, which effectively reduces the communication cost and difficulty between the business, the front-end, the back-end, and the test. The mode of front-end page development with business domain objects as the core can effectively reduce the difficulty and requirements of using the front-end low-code development technology, so that business personnel / other non-technical personnel can use the front-end low-code technology to develop the front-end page functions. It can also reduce the communication cost between the front-end and the back-end and the workload of subsequent front-end and back-end integration and testing, avoid the configuration of the mapping relationship between the front-end controls and the back-end parameters in most scenarios, and the development efficiency can be improved by 20-40% compared with the conventional front-end low-code platform technology, and avoid the bugs introduced by human configuration, and improve the quality of functions.
[0147] The specific definition of the page layout device can be found in the definition of the page layout method above, which will not be repeated here. Each module in the above page layout device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0148] In one embodiment, a computer device is provided. The computer device may be a terminal device, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium. The readable storage medium stores computer-readable instructions. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a page layout method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.
[0149] In an embodiment of the present application, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the page layout method described above when executing the computer-readable instructions.
[0150] In an embodiment of the application, a readable storage medium is provided, wherein the readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the page layout method described above are implemented.
[0151] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0152] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0153] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A page layout method, characterized in that: The method comprises: Identify features to be developed; Determine the business domain object bound to the function to be developed, and determine the page layout method corresponding to the function to be developed; Based on the business domain object, configure the common logic of each page of the function to be developed, wherein the common logic refers to configuring the attribute option setting information of the business domain object according to the attributes of the business domain object; Determine the business domain object attributes and page layout controls corresponding to each page, and arrange the business domain object attributes and page layout controls into the corresponding page to form an arrangement page, wherein, when arranging the page, the page is arranged mainly with the business domain object attributes and supplemented with the form controls. In the visual design of the custom page, the layout controls and the business domain object attributes and buttons to be displayed on the page are arranged into the page by dragging and dropping, and the page effect is displayed in a WYSIWYG manner on the page; A mapping relationship between each page control of the arrangement page and the back-end service is automatically established to call the back-end service, wherein business domain objects are used as a unified business language between the business, front-end, back-end and testers, the input / output parameters of the back-end service are designed through the business domain objects, the front-end arranges pages through business domain objects, and business personnel / product managers use business domain objects to sort out business, write requirements and design product prototypes; back-end personnel use business domain objects as the protocol cornerstone between the front-end and back-end to design and develop back-end services; testers understand the business and write front-end test cases based on business domain objects. After the development of the current back-end is completed, the business domain object data between the front-end and back-end automatically establishes a mapping relationship. After the front-end page information configuration is completed, the back-end domain method is further adjusted through the business logic arrangement function of the back-end.
2. The page layout method according to claim 1, characterized in that: After determining the business domain object bound to the function to be developed, the method includes: Determining an object type of the business domain object; When the object type of the business domain object is a primary object, setting key attributes of the business domain object; When the object type of the business domain object is a slave object, key attributes, associated attributes, and master object associated attributes of the business domain object are set.
3. The page layout method according to claim 1 or 2, characterized in that: The determining of the business domain object bound to the function to be developed includes: Determine the business domain to which the business domain object bound to the function to be developed belongs after being generated and the database where the database table to which the business domain belongs is located; Obtaining a database table to which the business domain belongs based on the database query to generate a business domain object bound to the function to be developed; or A domain object corresponding to the function to be developed is selected from existing domain objects as the business domain object bound to the function to be developed.
4. The page layout method according to claim 1, characterized in that: The configuring the common logic of each page of the function to be developed based on the business domain object includes: In the property option setting interface corresponding to the business domain object, the property option setting information of the business domain object is configured.
5. The page layout method according to claim 1, characterized in that: After the mapping relationship between each page control of the arrangement page and the backend service is automatically established, it includes: Previewing and functionally testing the layout page on which the mapping relationship is established; When all the layout pages are tested, the development completion function is obtained, and the development completion function is configured into the menu of the formal system for release.
6. The page layout method according to claim 1, characterized in that: The determining of the page layout mode corresponding to the function to be developed includes: The page layout mode is abstracted through a recursively nested custom layout, wherein the layout controls of the custom layout include a straight layout control, a label layout control, a form container control, a table container control, a button container control and a tree container control.
7. The page layout method according to claim 1, characterized in that: The method further comprises: Abstracting the function definition of the function to be developed and the custom pages constituting the function to be developed; Abstracting the business domain objects involved in the functions to be developed; Abstracting the common logic of each custom page in the function to be developed; The page layout mode of each custom page in the function to be developed is abstracted.
8. A page layout device, characterized in that: The device comprises: A function-to-be-developed determining unit, used for determining functions to be developed; A business domain object and page layout mode determination unit, used to determine the business domain object bound to the function to be developed, and determine the page layout mode corresponding to the function to be developed; A common logic configuration unit, configured to configure the common logic of each page of the function to be developed based on the business domain object, wherein the common logic refers to configuring the attribute option setting information of the business domain object according to the attributes of the business domain object; A page layout unit is used to determine the business domain object attributes and page layout controls corresponding to each page, and layout the business domain object attributes and page layout controls into the corresponding page to form a layout page. When performing page layout, the page layout is performed mainly with the business domain object attributes and supplemented by form controls. In the visual design of the custom page, the layout controls and the business domain object attributes and buttons to be displayed on the page are arranged into the page by dragging and dropping, and the page effect is displayed in a WYSIWYG manner on the page. A mapping relationship establishment unit is used to automatically establish a mapping relationship between each page control of the arrangement page and the back-end service to call the back-end service, wherein the business domain object is used as a unified business language between the business, front-end, back-end and testers, the input / output parameters of the back-end service are designed through the business domain object, and the business personnel / product managers use the business domain object to sort out the business, write requirements and design product prototypes; the back-end personnel use the business domain object as the protocol cornerstone between the front-end and back-end to design and develop the back-end service; the testers start from the business domain object to understand the business and write front-end test cases. After the development of the current back-end is completed, the business domain object data between the front-end and back-end automatically establishes a mapping relationship. After the front-end page information configuration is completed, the back-end domain method is further adjusted through the business logic orchestration function of the back-end.
9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer-readable instructions, the steps of the page layout method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps of the page layout method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Domain-driven design-based low-code development platform and business system creation method
CN115640045A
Rapid business development method and device, electronic equipment and storage medium
CN117234512A
Page development method and device, equipment and storage medium
CN117707529A