Disclosure of Invention
The invention provides a method for realizing a high-configurable low-code development platform based on a card assembly, which solves the problems in the prior art.
The technical scheme of the invention is realized as follows:
a method for realizing a high-configurable low-code development platform based on a card assembly comprises the following steps:
constructing a card assembly according to business requirements;
configuring a card assembly into a document;
the method comprises the steps that a document engine obtains a card component list in a document;
the card assembly acquires data according to preset logic and processes the data;
the front end receives the data processed by the card assembly, and renders and displays the data into a user interface according to preset front end logic.
Further, the implementation method of the high-configurable low-code development platform based on the card assembly further includes:
a user interface acquires an operation instruction;
the front end analyzes and calculates data according to the operation instruction of the user;
and the card assembly receives the data analyzed and calculated by the front end according to the preset data storage logic and stores the data in the database.
Further, the step of building a card assembly based on business requirements includes:
creating a card front-end component;
implementing a front-end component of the card;
determining an interface of a card front-end component based on business requirements;
and correspondingly integrating the card back-end object with the card front-end component.
Further, the step of creating a card front-end component includes:
creating a card abstract class, carrying out abstract packaging on the basic functions of the card assembly and reserving an enhanced interface;
the card implementation class inherits the card abstract class and adds the @ Component annotation to enable the Spring container to be automatically scanned and registered.
Further, the enhanced interfaces reserved by the card assembly comprise a configuration interface, a data acquisition interface and a data creation and update interface.
Further, the steps for implementing the front-end component of the card are specifically:
the card front-end component is globally registered Vue components in module.
Further, the step of correspondingly integrating the card rear end object and the card front end component specifically comprises:
the Card object at the back end of a Card corresponds to the Vue component at the front end of a Card and the Vue component at the front end of a Card.
Further, the step of configuring the card assembly into the document includes:
adding a card assembly to the document;
setting a title displayed in the document by the card assembly;
the order in which the card assemblies are displayed in the document is set.
The invention has the beneficial effects that:
1. the component formula is as follows: according to the method, the card assemblies are used as the assembly type method with the lowest granularity, each card assembly can complete the characteristic atomized service function, the reusability of the card assemblies can be realized through the self-defined expansion function, the multi-time use of one-time development is realized, each card assembly has the functions of complete front and back ends such as a user interface, service logic, data access logic and the like, the complex service requirements can be supported, and the problem that the traditional method for dragging and building the document by using the control cannot be realized is solved;
2. combination type: according to the invention, the functional document can be created to form a specific business system platform, each functional document is composed of a plurality of card assemblies, and the card assemblies are configured on the specific document through the document configuration function, so that the function of one business document can be quickly realized after the specific card assemblies are developed, and certain logic isolation is provided among the card assemblies, so that the dependence and coupling among system functions are reduced;
3. agility: the invention is based on the characteristics of assembly and combination, the document of the system is formed by combining and configuring card components, in the mode, a functional page can be quickly created, the increase and decrease of the card assemblies are very convenient, the whole function of the document cannot be damaged, because the logic of each card assembly is relatively independent, and the coupling is low, the range of influence involved in modifying a card assembly is also relatively small, so that the whole system has higher agility, especially when the user demand is not clear, the configuration and realization of the document function can be carried out according to the most important function known by the current user, when the function is continuously detailed and changed, the problem that an agile software development mode is difficult to implement in a large-scale service system platform is solved well finally by quickly responding to service change through the characteristics of configurability, low coupling and the like of the functions of the card assembly;
4. scene change: the business system platform is formed by the document, the document is formed by the card component combination, because of adopting the design scheme of the card component, each card has a specific atomization function, based on the logic, the difference of the business system platforms of different types lies in the specific function level, and the specific function is formed by the card component, after the card component with the pointed function is developed aiming at different system characteristics, the one set of system can meet the requirements of various scenes, for example: CRM system, financial transaction system, order management system and purchase, sale and stock management system etc..
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, the implementation method of a high-configurable low-code development platform based on a card assembly according to the present invention includes:
constructing a card assembly according to business requirements;
configuring a card assembly into a document;
the method comprises the steps that a document engine obtains a card component list in a document;
the card assembly acquires data according to preset logic and processes the data;
the front end receives the data processed by the card assembly, and renders and displays the data into a user interface according to preset front end logic.
Specifically, the card assembly referred to in the present invention presents cards in the form of one-by-one on the user interface, and is therefore referred to as a card assembly; the technology is realized by adopting a scheme of separating a front end and a rear end, the data persistence adopts an ORM frame for supporting most of relational databases, the ORM is a programming technology and is used for realizing the conversion between data of different types of systems in an object-oriented programming language, the front end can be described by Vue.js, and the rear end is described by java, the data persistence scheme of the invention is realized by adopting an ORM component, the processing logic of the data is completely realized by java codes without depending on the characteristics of any database, and the compatibility of any form of relational databases is ensured so as to improve the universality of the system, the ORM component adopts a MyBatis frame, and the MyBatis a data persistence layer frame which supports customized SQL, a storage process and high-level mapping; each document can be provided with a plurality of card assemblies, each card assembly has respective business logic and functions, and the whole document can complete a specific business function, for example, a business application document comprises a document basic information card, a customer information card, a product information card, a price information card, an accessory information card and the like, the card assemblies in the document are selected according to business requirements, and the functions of the card assemblies are realized according to the functional requirements; in the invention, the document is the most core function, the realized card assembly is configured on the document to form the final function, the whole realized business model is borne by the document, the document engine mainly manages the document type and the document configuration without being responsible for specific business logic, different types of documents are assisted and completed by the document processor in the document configuration, only one document engine can be provided, and the document engine is adapted to various document processors, and even the document processor can be customized or the existing document processor is inherited to complete more complex business scenes.
The implementation method of the high-configurable low-code development platform based on the card assembly further comprises the following steps:
a user interface acquires an operation instruction;
the front end analyzes and calculates data according to the operation instruction of the user;
and the card assembly receives the data analyzed and calculated by the front end according to the preset data storage logic and stores the data in the database.
The step of constructing the card assembly based on the service requirement comprises the following steps:
creating a card front-end component;
implementing a front-end component of the card;
determining an interface of a card front-end component based on business requirements;
and correspondingly integrating the card back-end object with the card front-end component.
Wherein the step of creating the card front-end component comprises:
creating a card abstract class, carrying out abstract packaging on the basic functions of the card assembly and reserving an enhanced interface;
the card implementation class inherits the card abstract class and adds the @ Component annotation to enable the Spring container to be automatically scanned and registered.
The enhanced interface reserved by the card component comprises a configuration interface, a data acquisition interface and a data creation and update interface.
Wherein, the steps of carrying out the realization of card front end subassembly specifically are:
the card front-end component is globally registered Vue components in module.
Wherein, correspond integrated step specifically with card back end object and card front end subassembly:
the Card object at the back end of a Card corresponds to the Vue component at the front end of a Card and the Vue component at the front end of a Card.
Wherein the step of configuring the card assembly into the document comprises:
adding a card assembly to the document;
setting a title displayed in the document by the card assembly;
the order in which the card assemblies are displayed in the document is set.
Specifically, the process of configuring the card assembly into the document is as follows: the method comprises the steps of clicking a newly added card in document configuration, then selecting a required card assembly, setting a title of the card assembly displayed in a document page, setting a display sequence of the card assembly in the document, then setting rules and logics of the card assembly in the document in more configurations of the configured card assembly, and if other business logics cannot be realized through configuration, providing an enhanced interface for the card assembly, and realizing the enhanced interface through a coding mode.
The invention relates to a method for realizing a high-configurable low-code development platform based on a card assembly, which is characterized in that the design thinking is based on that the finest granularity functional unit of a software system is an assembly, but not a control, the control is a basic unit for forming the assembly, the control does not carry business logic and is only used for assisting a user to input data and standardizing the format and the mode of the user to input data, and therefore, a more complex functional assembly cannot be realized by depending on the stacking of the control. The invention redefines the concept and the minimum granularity of componentization, designs the minimum granularity of the component into a unit function level, and names the unit function level as a card component by combining a front-end function display mode, wherein in an actual scene, a document is formed by combining card components, the card component has independent function logic, and can meet the function requirement of a certain aspect of a service, and the document formed by combining a plurality of card components can meet the function requirement of a user in a certain actual service scene, for example: sales orders, invoices, sales contracts and the like; from the multiplexing point of view, the card component with independent function logic is the finest granularity unit with the system function multiplexing, the card component can be order basic information, customer basic information, accessory information and the like, the component is a group of atomized functional units with independent interfaces, service logic and data storage structures, and the component has the characteristic of multiplexing, and the invention has the specific advantages that:
1. the component formula is as follows: according to the method, the card assemblies are used as the assembly type method with the lowest granularity, each card assembly can complete the characteristic atomized service function, the reusability of the card assemblies can be realized through the self-defined expansion function, the one-time development and the repeated use are realized, each card assembly has the complete functions of a user interface, service logic, data access logic and the like at the front end and the rear end, the complex service requirements can be supported, and the problem that the traditional method for dragging and building the document by using the control cannot be realized is solved;
2. and (2) combined type: according to the invention, the functional documents can be created to form a specific service system platform, each functional document is composed of a plurality of card assemblies, and the card assemblies are configured on the specific document through the document configuration function, so that the function of one service document can be rapidly realized after the specific card assemblies are developed, and the card assemblies have certain logical isolation, so that the dependence and coupling among system functions are reduced;
3. an agile style: the invention is based on the characteristics of assembly and combination, the document of the system is formed by combining and configuring card components, in the mode, a functional page can be quickly created, the increase and decrease of the card assemblies are very convenient, the whole function of the document cannot be damaged, because the logic of each card assembly is relatively independent, and the coupling is low, the range of influence involved in modifying a card assembly is also relatively small, so that the whole system has higher agility, especially when the user demand is not clear, the configuration and realization of the document function can be carried out according to the most important function known by the current user, when the function is continuously detailed and changed, the problem that an agile software development mode is difficult to implement in a large-scale service system platform is solved well finally by quickly responding to service change through the characteristics of configurability, low coupling and the like of the functions of the card assembly;
4. scene change: the business system platform is formed by the document, the document is formed by the card component combination, because of adopting the design scheme of the card component, each card has a specific atomization function, based on the logic, the difference of the business system platforms of different types lies in the specific function level, and the specific function is formed by the card component, after the card component with the pointed function is developed aiming at different system characteristics, the one set of system can meet the requirements of various scenes, for example: CRM system, financial transaction system, order management system and purchase, sale and stock management system etc..
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.