Application program development method, system and equipment and storage medium
By creating business sub-domains and dividing business objects during the development process, and building bounded context and domain models, the communication misunderstanding problems caused by language inconsistencies between business personnel and developers are solved, and program errors in the application are significantly reduced.
Patent Information
- Application Number
- CN202311121307.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2025-02-28
AI Technical Summary
During the development process, business personnel and developers are prone to communication misunderstandings due to inconsistent languages, resulting in more program errors (bugs) in the application.
By creating multiple business sub-fields based on the application's business goals and dividing business objects in the business process into these sub-fields, a bounded context and domain model is built to facilitate effective communication and code development for business personnel and developers.
It realizes the unification of the language of business personnel and developers, reduces communication misunderstandings, and thus effectively reduces program errors in the application.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of software development, and in particular to a method, system, device and storage medium for developing an application program. Background Art
[0002] At present, in some development models, business personnel propose business requirements and then developers develop based on them. However, developers usually use programming languages (such as objects, variables, etc.), while business personnel usually use business languages (such as quantities, products, etc.), and the two may have different names for the same thing. In this context, misunderstandings may occur between business personnel and developers during demand communication, resulting in a large number of program errors (i.e. bugs) in the final developed application.
[0003] Therefore, a development method that can reduce program errors is urgently needed. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure provide an application development method, an application development system, an electronic device, and a computer-readable storage medium, which can effectively reduce program errors in the application.
[0005] In one aspect, the present disclosure provides a method for developing an application program, the method comprising:
[0006] For the application to be developed, obtaining the business objectives of the application, and creating multiple business sub-domains according to the business objectives;
[0007] Acquire a business process for achieving the business goal, and divide the business objects in the business process into the multiple business sub-fields according to the field types of the business sub-fields;
[0008] For any business sub-domain, a bounded context of the business sub-domain is constructed based on the business objects and business behaviors of the business objects in the business sub-domain;
[0009] Build a domain model for application code development according to the bounded context of the business sub-domain.
[0010] Another aspect of the present disclosure further provides an application development system, the system comprising:
[0011] A domain division module is used to obtain the business objectives of the application to be developed and create multiple business sub-domains according to the business objectives;
[0012] A process splitting module, used to obtain a business process for achieving the business goal, and divide the business objects in the business process into the multiple business sub-fields according to the field types of the business sub-fields;
[0013] A context construction module, for any business sub-domain, constructs a bounded context of the business sub-domain according to the business objects and business behaviors of the business objects in the business sub-domain;
[0014] The model building module is used to build a domain model for application code development according to the bounded context of the business sub-domain.
[0015] Another aspect of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method described above is implemented.
[0016] Another aspect of the present disclosure provides an electronic device, which includes a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method described above is implemented.
[0017] In the technical solutions of some embodiments of the present application, multiple business sub-domains are created according to the business objectives of the application, and the business objects in the business process are divided into business sub-domains, and then based on the business objects in each business sub-domain and the business behaviors of the business objects, a domain model for application development is constructed. The domain model is between the business process and the program code. Business personnel and developers can communicate about business based on the domain model. Through the domain model, business personnel and developers can achieve language unification, reduce communication misunderstandings, and thus effectively reduce program errors in the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The features and advantages of the present disclosure will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present disclosure in any way. In the accompanying drawings:
[0019] Figure 1 A schematic diagram showing a flow chart of a method for developing an application program provided by an embodiment of the present application;
[0020] Figure 2 A schematic diagram showing the relationship between application programs, business sub-fields, and functions provided by an embodiment of the present application;
[0021] Figure 3 A schematic diagram of dividing a business object into sub-business areas provided by an embodiment of the present application is shown;
[0022] Figure 4A schematic diagram showing the division of business objects into sub-business areas provided by another embodiment of the present application is shown;
[0023] Figure 5 Shows the Figure 4 Schematic diagram after adding new business sub-areas in;
[0024] Figure 6 A schematic diagram of the development process of an application provided by an embodiment of the present application is shown;
[0025] Figure 7 A schematic diagram of a module of an application development system provided by an embodiment of the present application is shown;
[0026] Figure 8 A schematic diagram of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0028] The application development method provided in this application can be applied to electronic devices. Electronic devices include but are not limited to tablet computers, laptop computers, desktop computers, servers, etc. Figure 1 , which is a flow chart of a method for developing an application provided in one embodiment of the present application. Figure 1 The development method includes the following steps:
[0029] Step S11, for the application to be developed, obtain the business objectives of the application, and create multiple business sub-domains according to the business objectives.
[0030] Among them, application programs can refer to computer programs used to complete specific tasks, such as information recommendation programs that recommend information to users, video sharing programs that allow users to share short videos, and reading programs that provide reading functions for users.
[0031] Business goals can refer to the value that an application can provide to users. For example, a reading program can improve users' knowledge reserves or provide users with reading pleasure. For another example, an information recommendation program can broaden users' information acquisition channels. When an application has multiple types of users, the business goals of the application can be obtained according to the user type. For example, users of a reading program can include authors and readers. Authors write books through the reading program, and readers read books written by authors through the reading program. The business goals of the reading program can include a first business goal for authors and a second business goal for readers. The first business goal can be to provide writing assistance to authors, and the second business goal can be to bring reading pleasure to readers.
[0032] A business subdomain can be represented as a set of functions that an application should provide to achieve business goals. A business subdomain can correspond to one or more functions of an application. Different business subdomains correspond to different functions. For example, in conjunction with Figure 2 , which is a schematic diagram of the relationship between applications, business sub-fields and functions provided in one embodiment of the present application. Figure 2 In the example, assume that the business goal of the reading program is to provide writing assistance to authors and bring reading pleasure to readers. For authors, the functions that the reading program needs to provide may include counting the number of words currently written by the author, providing feedback to the author on the readers' ratings of the book, and managing the versions of the books written by the author; for readers, the functions that the reading program needs to provide may include recommending books to readers, supporting readers to annotate books, supporting readers to search for books, and recording the reading position when readers finish reading. Based on the above functions, four business sub-areas can be divided into statistics, book management, search recommendation, and reading management. Among them, the business sub-area "Statistics" can correspond to the word count function (that is, counting the number of words currently written by the author); the business sub-area "Book Management" can correspond to the rating and version management functions (that is, giving authors feedback on readers' ratings of books, and performing version management on books written by authors); the business sub-area "Search Recommendation" can correspond to book recommendation and book search functions (that is, recommending books to readers and supporting readers to search for books); the business sub-area "Reading Management" can correspond to the annotation and location recording functions (that is, supporting readers to annotate books and recording the chapters and paragraphs that readers have read when they finish reading).
[0033] Generally, the business objectives of an application are relatively stable and clear, and the business sub-areas obtained by dividing the business objectives of the application are relatively accurate and stable.
[0034] Step S12, obtaining a business process for achieving the business goal, and dividing the business objects in the business process into multiple business sub-fields according to the field types of the business sub-fields.
[0035] Specifically, the business process can also be understood as a solution to implement the application function. When the application function is implemented, the business goal of the application is also achieved. Before developing the application, the business process can be predetermined based on the business needs of the application. The business process can be composed of a series of operations. The objects that initiate operations and / or are operated in the business process can be called business objects. Business objects can be used to implement the functions of the application. Specifically, if a business object appears in the business process of a certain function, it can be said that the business object is used to implement the function. For example, in a reading program, assuming that business object A appears in the business process of the search function and the rating function, it can be said that business object A is used to implement the search function and the rating function of the reading program.
[0036] For ease of understanding, let's take the reading program as an example. Assume that the reading program has the following four business processes:
[0037] Business process 1:
[0038] 11) Obtain the search keywords (such as book titles) entered by readers;
[0039] 12) Get the attribute information of the books saved by the reading program (such as book name, book ID, etc.);
[0040] 13) Match the search keywords with the attribute information of the books and display the books that have been successfully matched.
[0041] Business process 2:
[0042] 21) Receive and save readers’ rating information on books;
[0043] 22) Get the books under each author's username and display the rating information of these books.
[0044] Business process three:
[0045] 31) Receive and save the annotation information of the reader on the book while the reader is reading the book;
[0046] 32) When the reader quits reading the book, save the user's annotation information;
[0047] 33) When a reader reads a book again, the annotation information of the book made by the reader during the previous reading is displayed.
[0048] Business process four:
[0049] 41) When the author is writing a book, the number of words written by the author is counted in real time;
[0050] 42) Display word count statistics for easy viewing by authors and users.
[0051] In the above three business processes, the first business process can be a solution for realizing the search function of the reading program, the second business process can be a solution for realizing the rating function of the reading program, the third business process can be a solution for realizing the annotation function of the reading program, and the fourth business process can be a solution for realizing the statistical function. The reader users, author users, search keywords, attribute information of the book, rating information, annotation information, chapters and paragraphs that the reader users have read, and the number of words counted, etc. involved in these business processes can be called business objects. Among them, the reader users appear in the first three business processes, so the reader users can be used to realize the search, rating and annotation functions; the search keywords and the attribute information of the book appear in the first business process, so the search keywords and the attribute information of the book can be used to realize the search function; the author users appear in the second business process and the fourth business process, so the author users can be used to realize the rating function and the statistical function; the rating information appears in the second business process, so the rating information can be used to realize the rating function; the annotation information appears in the third business process, so the annotation information can be used to realize the annotation function; the number of words counted appears in the fourth business process, so the number of words counted can be used to realize the statistical function.
[0052] Based on the above description, when dividing the business objects in the business process into multiple business sub-domains, the functions corresponding to each business sub-domain can be determined based on the domain type of the business sub-domain, and then the business objects can be divided into business sub-domains corresponding to the target functions according to the target functions that the business objects are used to achieve. Specifically, the domain type can represent the functions corresponding to the business sub-domain. For example Figure 2 In the business sub-domain "Book Management" corresponds to functions related to rating and version management, and the business sub-domain "Search Recommendation" corresponds to functions related to book recommendation and book search. Dividing business objects into various business sub-domains means grouping business objects according to the functions they are used to implement and the functions corresponding to each business sub-domain.
[0053] For example, refer to Figure 3 , which is a schematic diagram of dividing a business object into sub-business areas provided by an embodiment of the present application. Figure 3 Take the reading program as an example. Figure 3 The content in the upper rectangular box is the functions of each business object obtained after analyzing the process of the reading program; the oval box below represents the business sub-areas obtained based on the business objectives of the reading program. The functions corresponding to each business sub-area can be found in Figure 2 . See also Figure 2 and Figure 3. Take the business object "reader user" as an example. Since the business object "reader user" can be used to implement the search function, rating function and annotation function, it is necessary to divide the business object "reader user" into the business sub-fields corresponding to the search function, rating function and annotation function, that is, divide the business object "reader user" into the business sub-fields "book management", "search recommendation" and "reading management." Take the business object "search keyword" as an example. Since the business object "search keyword" can be used to implement the search function, it is necessary to divide the business object "search keyword" into the business sub-field corresponding to the search function, that is, divide the business object "search keyword" into the business sub-field "search recommendation". According to the principles similar to the business objects "reader user" and "search keyword", each business object can be divided into the corresponding business sub-field.
[0054] After grouping the business objects, the functions corresponding to each business sub-area can be implemented based on the business objects included in the corresponding business sub-area. Figure 3 In the business sub-domain "Book Management", the business objects included are reader users, author users, and rating information. Based on these business objects, the functions corresponding to the business sub-domain "Book Management" can be implemented.
[0055] Step S13, for any business sub-domain, construct a bounded context of the business sub-domain based on the business objects and business behaviors of the business objects in the business sub-domain.
[0056] The business behavior of a business object can be understood as the relationship between business objects. Figure 3 Take the business sub-domain "Book Management" in as an example. The relationship between business objects is: the reader user submits the rating information of the book, and the rating information of the book will be displayed to the author user. The relationship between the three is: reader user> rating information> author user.
[0057] The relationship between business objects can be obtained by analyzing the business process. Bounded context is the content that reflects the business objects in the business sub-domain and the relationship between business objects. In this way, when implementing the functions corresponding to each business sub-domain, the relationship between each business object in the business sub-domain can be determined based on the bounded context, and the complete business process required for function implementation can be obtained.
[0058] Step S14: construct a domain model for application code development according to the bounded context of the business sub-domain.
[0059] In this embodiment, the domain model can be a DDD (Domain-Driven Design) model. The domain model can have model objects. Model objects refer to objects specified by the domain model itself, such as entities, value objects, etc. According to the bounded context, building a domain model can be understood as converting business objects, associations between business objects, etc. in the bounded context into content expressed according to the specifications of the domain model. Specifically, when building a domain model, a correspondence between business objects and model objects can be established, and associations between model objects can be created based on the correspondence and the business behaviors supported by the business objects. For example, the business object "reader user" in the bounded context is converted into an entity object in the domain model specification, and the business object "statistical word count" in the bounded context is converted into a value object in the domain model specification, and the model objects are associated based on the business behaviors supported by the business objects (i.e., the associations between business objects).
[0060] After completing the construction of the domain model, developers can develop the code of the application based on the domain model. It can be understood that the constructed domain model is an intermediate product between the business process and the code. The business objects in the business process can be mapped to the model objects in the domain model. The developer converts the model object into program code. The domain model is more intuitive and easy to understand than the program code. Based on the domain model, business personnel can check whether the business process is correct; based on the domain model, developers can check whether the code development is correct. When communicating, business personnel and developers can communicate on the basis of the domain model. Through the domain model, the language used by business personnel and developers is consistent, reducing the situation of communication misunderstandings. For example, under normal circumstances, business personnel may refer to users as reader users or author users, while developers refer to users as userA or userB. If business personnel and developers communicate directly on needs, communication misunderstandings caused by inconsistent languages may occur. In this application scheme, the reader user or author user referred to by the business personnel and the userA or userB referred to by the developer correspond to the same object in the domain model. When business personnel and developers communicate based on the domain model, they use the same name for users, thereby reducing communication misunderstandings.
[0061] In summary, in the technical solutions of some embodiments of the present application, multiple business sub-domains are created according to the business objectives of the application, and the business objects in the business process are divided into business sub-domains, and then based on the business objects in each business sub-domain and the business behaviors of the business objects, a domain model for application development is constructed. The domain model is between the business process and the program code. Business personnel and developers can communicate about business based on the domain model. Through the domain model, business personnel and developers can achieve language unification, reduce communication misunderstandings, and thus effectively reduce program errors in the application.
[0062] The solution of this application is further described below.
[0063] In some embodiments, in the above step S12, after the business objects in the business process are divided into multiple business sub-fields, if there are business objects that are not divided into any business sub-field, a first new business sub-field is created according to the function used to implement the business object to divide the target business object into the first new business sub-field.
[0064] For example, refer to Figure 4 , which is a schematic diagram of dividing a business object into sub-business areas provided by another embodiment of the present application. Figure 4 In the existing business sub-domains, there is no business sub-domain corresponding to the billing function, resulting in the business object "Statistical Billing" cannot be divided into a business sub-domain. In this case, you can create a new business sub-domain corresponding to the billing function and divide the business object "Statistical Billing" into the new business sub-domain. Figure 5 , for Figure 4 Schematic diagram after adding new business sub-areas in. Figure 5 In the new business sub-domain "Billing" corresponding to the billing function, the business object "Statistical Billing" is divided into the business sub-domain "Billing". In this way, it can be ensured that each business object can be divided into a business sub-domain, and code development can be carried out for each business object to avoid the omission of functions in the developed application.
[0065] In some embodiments, for business sub-domains corresponding to two or more functions, multiple functions in the same business sub-domain may use a common business object, which may cause the functions to affect each other. For example, function A and function B both use business object a. According to the business process of function A, the attributes of business object a are modified, which may affect the use of function B. In view of this, in order to ensure the stability of some important functions, the development method of the present application may also include:
[0066] Among multiple functions corresponding to the same business sub-field, obtain an indicator parameter value of each function, wherein the indicator parameter value is used to represent the importance of the function;
[0067] If there is a function whose indicator parameter value exceeds the parameter threshold, a second new business sub-field is created for the function, and the function is separated from other functions so that the function corresponds to the second new business sub-field.
[0068] Specifically, the indicator parameter value may include but is not limited to the number of times a function is used per unit time, the cumulative number of times a function is used, etc. It is understandable that the more times a function is used, the more important the function is, and it is necessary to ensure the stability of the function. Therefore, a second new business sub-field can be recreated for the function, and the function can be separated from other functions so that the function corresponds to the second new business sub-field alone, that is, the function has the second new business sub-field exclusively. In this way, the function will not be affected by other functions, thereby ensuring the stability of the function.
[0069] In some embodiments, after the application code development is completed, the development method of the present application may further include:
[0070] When there is a discrepancy between the actual running functionality of the application and the planned functionality of the application, retroactively modify one or more of the domain model, bounded context, or business subdomain.
[0071] The actual running function can be the function actually provided by the application after development. The planned function can be the function that the application should provide as planned before development. In theory, the actual running function should be consistent with the planned function, otherwise, it can be considered that the application has a program error. If there is a difference between the actual running function and the planned function of the application, it means that one or more of the domain model, bounded context, and business subdomain has an error and needs to be modified. Specifically, during the modification process, the domain model can be modified first. If during the modification process, it is found that the error in the domain model is caused by the bounded context, the bounded context can be modified forward. If it is found that the error in the bounded context is an error in the division of business objects in the business subdomain (that is, an error when the business object is divided into the business subdomain), or an error in the division of the business subdomain (for example, some business subdomains correspond to the same function), the business subdomain can be further modified forward. In this way, retroactive modification is achieved to ensure that the functions actually provided by the application are consistent with the planned functions.
[0072] For example, in the planning function of the reading program, the reading program is required to recommend books by user group. For example, recommend science and technology books to scientific and technological personnel, and recommend course tutoring books to students. However, during the development and testing of the application, it was found that the application could not recommend books by user group, such as recommending course tutoring books to scientific and technological personnel. After investigation, it was found that the business object "reader user" was missing an attribute information, which caused the function of recommending books by user group to fail. At this time, it is necessary to modify the attributes of the model object corresponding to the "reader user" in the domain model. If during the modification process, it is found that the attribute setting of the model object is wrong, it is because the business object "reader user" in the bounded context does not set the corresponding attribute information, then you can continue to modify the bounded context.
[0073] Specifically, if only the domain model is modified, developers can modify or develop the code based on the modified domain model; if the bounded context is modified, the domain model needs to be rebuilt based on the modified bounded context, and the code needs to be modified or developed according to the rebuilt domain model; if the business sub-domain is modified, the bounded context needs to be rebuilt, and the domain model needs to be rebuilt based on the modified bounded context, and the code needs to be modified or developed according to the rebuilt domain model.
[0074] From the above modification process, we can see that in the retrospective modification process, the further back the modification is made, the greater the modification cost involved. The modification cost can be the modification amount, the modification time, etc. In view of this, retrospective modification of one or more of the domain model, bounded context, and business subdomain can include:
[0075] Modify the domain model based on the differences between the actual operating functions and the planned functions;
[0076] If the modification scope of the domain model exceeds the first scope threshold, modify the bounded context;
[0077] If the modification scope of the bounded context exceeds the second scope threshold, the business sub-domain is modified.
[0078] Specifically, the first scope threshold and the second scope threshold can be the number of parameters to be modified, the length of time for modification, etc. Under normal circumstances, if only modifying the domain model can solve the problem, it is preferred to modify only the domain model. In this way, the modification cost can be reduced. If the modification scope of the domain model exceeds the first scope threshold, it means that the modification cost of only modifying the domain model exceeds the modification cost of modifying the bounded context. At this time, the bounded context can be modified; if the modification scope of the bounded context exceeds the second scope threshold, it means that the modification cost of only modifying the domain model and the bounded context exceeds the modification cost of modifying the business subdomain. At this time, the business subdomain can be modified. For example, if only the domain model is modified, two parameters may need to be modified, and the modification time is shorter than the time to modify the bounded context and rebuild the domain model. In this case, retroactive modification can be performed by modifying only the domain model. However, if only the domain model is modified, 100 parameters may need to be modified; if the bounded context is modified, only one parameter may need to be modified. The modification cost of modifying the bounded context and rebuilding the model is lower than the modification cost of modifying only the domain model. In this case, you can modify the bounded context first and then rebuild the domain model to improve modification efficiency.
[0079] To summarize, in the technical solutions of some embodiments of the present application, since the domain model is used to unify the language, on the one hand, the communication efficiency between developers and business personnel is improved, communication misunderstandings are reduced, and program errors in developed application products can be greatly reduced; on the other hand, developers, maintainers, etc. can quickly understand the application program based on the domain model to improve the efficiency of product development or maintenance; on the other hand, the domain model has good scalability. In iterative development, new functions can reuse or partially reuse existing functions to improve development efficiency.
[0080] The following is a specific example to illustrate the development method of this application. Figure 6 , which is a schematic diagram of the development process of an application provided in one embodiment of the present application. Figure 6 In the demand pool, the business process to achieve business goals is stored. The business process in the demand pool can be developed in batches (i.e. iterative development). The specific development process is as follows:
[0081] Step S51, obtain part of the business process from the demand pool, and perform business process splitting on the obtained business process, that is, dividing the business objects in the business process into pre-created business sub-domains. The principle of division can be found in the above step S12, which will not be repeated here.
[0082] For each business sub-area, perform the following steps:
[0083] Step S52: construct a bounded context of the business sub-domain based on the business objects and the business behaviors of the business objects in the business sub-domain.
[0084] Step S53: construct a domain model based on the bounded context in the business sub-domain.
[0085] Step S54, driver development, that is, developers develop codes based on the domain model.
[0086] After step S52 to step S54, each business sub-domain has corresponding completed codes and domain models.
[0087] After completing the development of the above-mentioned part of the business process, you can continue to obtain new undeveloped business processes from the demand pool, and continue to develop in the order of step S51 to step S54. In the subsequent development, only incremental development is required. For example, in the previous development process, it is assumed that the business object "reader user" has been divided into business sub-domain_1, but the business object "reader user" has not established an association relationship with the business object "rating information". In the subsequent development, if the business process includes the business object "reader user", and the business object "reader user" needs to establish an association relationship with the business object "rating information", in this case, there is no need to perform the operation of dividing the business object "reader user" into business sub-domain_1. It is only necessary to establish an association relationship between the business object "reader user" and the business object "rating information" in the bounded context of business sub-domain_1. In this way, the development efficiency can be improved.
[0088] See also Figure 7 , is a schematic diagram of a module of an application development system provided by an embodiment of the present application. The development system includes the following steps:
[0089] The domain division module is used to obtain the business objectives of the application to be developed and create multiple business sub-domains based on the business objectives;
[0090] The process splitting module is used to obtain the business process used to achieve the business goal, and divide the business objects in the business process into multiple business sub-fields according to the field type of the business sub-field;
[0091] The context construction module builds the bounded context of any business sub-domain based on the business objects and business behaviors in the business sub-domain.
[0092] The model building module is used to build domain models for application code development according to the bounded context of the business sub-domain.
[0093] In some embodiments, the development system further includes a verification module, and after the application code development is completed, the verification module is used to:
[0094] When there is a discrepancy between the actual running functionality of the application and the planned functionality of the application, retroactively modify one or more of the domain model, bounded context, or business subdomain.
[0095] In some embodiments, the verification module is specifically used to:
[0096] Modify the domain model based on the differences between the actual operating functions and the planned functions;
[0097] If the modification scope of the domain model exceeds the first scope threshold, modify the bounded context;
[0098] If the modification scope of the bounded context exceeds the second scope threshold, the business sub-domain is modified.
[0099] In some embodiments, a business sub-domain is characterized as a set of functions that an application should provide to achieve a business goal. Each business sub-domain corresponds to one or more functions of the application, and the business object is used to implement the functions of the application. The process splitting module is specifically used to:
[0100] Based on the domain type, determine the functions corresponding to each business sub-domain;
[0101] According to the target functions that the business objects are used to achieve, the business objects are divided into business sub-areas corresponding to the target functions.
[0102] In some embodiments, the process splitting module is further used to:
[0103] If there is a business object that is not classified into any business sub-field, a first new business sub-field is created according to the function that the business object is used to implement, so as to classify the target business object into the first new business sub-field.
[0104] In some embodiments, in a business sub-field, if there is a business sub-field corresponding to two or more functions, the process splitting module is further used to:
[0105] Among multiple functions corresponding to the same business sub-field, obtain an indicator parameter value of each function, wherein the indicator parameter value is used to represent the importance of the function;
[0106] If there is a function whose indicator parameter value exceeds the parameter threshold, a second new business sub-field is created for the function, and the function is separated from other functions so that the function corresponds to the second new business sub-field.
[0107] In some embodiments, the domain model has a model object; the model building module is specifically used to:
[0108] Establish a correspondence between business objects and model objects, and create associations between model objects based on the correspondence and the business behaviors supported by the business objects.
[0109] See also Figure 8 , is a schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device includes a processor and a memory, the memory is used to store a computer program, and when the computer program is executed by the processor, the above method is implemented.
[0110] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0111] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiment of the present invention. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method embodiment.
[0112] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0113] One embodiment of the present application further provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, the above method is implemented.
[0114] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for developing an application, characterized in that: The method comprises: For the application to be developed, obtaining the business objectives of the application, and creating multiple business sub-domains according to the business objectives; Acquire a business process for achieving the business goal, and divide the business objects in the business process into the multiple business sub-fields according to the field types of the business sub-fields; For any business sub-domain, a bounded context of the business sub-domain is constructed based on the business objects and business behaviors of the business objects in the business sub-domain; Build a domain model for application code development according to the bounded context of the business sub-domain.
2. The method according to claim 1, characterized in that After the application code development is completed, the method further includes: When there is a difference between the actual running function of the application and the planned function of the application, retroactive modification is performed on one or more of the domain model, the bounded context, and the business sub-domain.
3. The method according to claim 2, characterized in that The retroactive modification of one or more of the domain model, the bounded context, and the business sub-domain includes: Based on the difference between the actual operation function and the planned function, modify the domain model; If the modification scope of the domain model exceeds a first scope threshold, modify the bounded context; If the modification scope of the bounded context exceeds a second scope threshold, the business sub-domain is modified.
4. The method according to claim 1, characterized in that The business sub-domain represents a set of functions that the application should provide in order to achieve the business goal. Each of the business sub-domains corresponds to one or more functions of the application. The business object is used to implement the functions of the application. The dividing the business objects in the business process into the multiple business sub-fields according to the field types of the business sub-fields includes: Based on the field type, determine the function corresponding to each of the business sub-fields; According to the target function that the business object is used to achieve, the business object is divided into business sub-fields corresponding to the target function.
5. The method according to claim 4, characterized in that After dividing the business objects in the business process into the multiple business sub-fields, the method further includes: If there is a business object that is not classified into any business sub-domain, a first new business sub-domain is created according to the function that the business object is used to implement, so as to classify the target business object into the first new business sub-domain.
6. The method according to claim 4, characterized in that In the business sub-field, if there is a business sub-field corresponding to two or more functions, the method further includes: Obtaining an indicator parameter value of each function among multiple functions corresponding to the same business sub-field, wherein the indicator parameter value is used to characterize the importance of the function; If there is a function whose indicator parameter value exceeds the parameter threshold, a second new business sub-field is created for the function, and the function is separated from other functions so that the function corresponds to the second new business sub-field.
7. The method according to claim 1, characterized in that The domain model has a model object; the domain model for application code development is constructed according to the bounded context of the business sub-domain, including: A corresponding relationship between the business object and the model object is established, and an association relationship between the model objects is created based on the corresponding relationship and the business behaviors supported by the business object.
8. An application development system, characterized in that: The system comprises: A domain division module is used to obtain the business objectives of the application to be developed and create multiple business sub-domains according to the business objectives; A process splitting module, used to obtain a business process for achieving the business goal, and divide the business objects in the business process into the multiple business sub-fields according to the field types of the business sub-fields; A context construction module, for any business sub-domain, constructs a bounded context of the business sub-domain according to the business objects and business behaviors of the business objects in the business sub-domain; The model building module is used to build a domain model for application code development according to the bounded context of the business sub-domain.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is implemented.