CN108804197A - A kind of dynamic assembly implementation method, device, equipment and storage medium - Google Patents
A kind of dynamic assembly implementation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN108804197A CN108804197A CN201810630759.6A CN201810630759A CN108804197A CN 108804197 A CN108804197 A CN 108804197A CN 201810630759 A CN201810630759 A CN 201810630759A CN 108804197 A CN108804197 A CN 108804197A
- Authority
- CN
- China
- Prior art keywords
- component
- data
- module
- allocation list
- administrative model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a kind of dynamic assembly implementation method, device, equipment and storage medium, the method includes:After page creation, the data protocol of each component in the page is retrieved as from server;According to the data protocol of each component, respectively described each component creates the module data administrative model example for management assembly state;Each component is created, and each component of establishment is bound with the corresponding module data administrative model example.The present invention is realized in the case where not updating packet, by adjusting the data protocol of the component of background server storage, using the module data administrative model for management assembly state, to change the service condition of component.
Description
Technical field
The present invention relates to page development field more particularly to a kind of dynamic assembly implementation method, device, equipment and storages
Medium.
Background technology
In page development, the research and development of component are carried out first, being then based on ReactNative, (cross-platform mobile application is opened
Hair frame) provide original frame be introduced directly by code, then in the Rendering logic of the page complete component nesting and
Attribute configuration.When certain components needs are multiplexed in another page, these components are quoted again, are realized newly in new page
Nested and attribute configuration logic.
However since original frame does not have the characteristic of dynamic configuration, the page for containing multiple components for one, it is right
It is determining in advance in the service condition of component so that the page of exploitation can not make component in the case where not updating packet
It is adjusted with situation.
Invention content
In view of the above problems, it is proposed that the embodiment of the present invention in order to provide a kind of dynamic assembly implementation method, device, set
Standby and storage medium.
The one side of embodiment according to the present invention provides a kind of dynamic assembly implementation method, including:
After page creation, the data protocol of each component in the page is retrieved as from server;
According to the data protocol of each component, respectively described each component creates the package count for management assembly state
According to administrative model example;
Each component is created, and each component of establishment is tied up with the corresponding module data administrative model example
It is fixed.
Optionally, the data protocol includes:Component identifies and component states data.
Optionally, the data protocol according to each component, respectively described each component, which creates, is used for management assembly
The module data administrative model example of state, including:
According to the component mark for including in the data protocol of each component, preconfigured first allocation list is searched, is obtained
Take the type that corresponding module data administrative model is identified with the component;
According to the type of the module data administrative model, the module data administrative model example is created, and will be described
In the component states data setting to the Data Management Model example for including in data protocol.
Optionally, establishment each component, including:
It is identified, is searched in preconfigured second allocation list and component mark pair according to the component of each component
The component type answered;
Component is created according to the component type.
Optionally, each component by establishment is bound with the corresponding module data administrative model example, tool
Body includes:
In the Rendering logic of the page, by each component of establishment and the corresponding module data administrative model example
It is bound, so that each component created takes component states data in the module data administrative model example of binding, into
Row component renders.
Optionally, before page creation, further include:
The first allocation list is created, comprising being registered to this configuration according to component after developer component in first allocation list
The type of module data administrative model in table.
Optionally, before page creation, further include:
The second allocation list is created, comprising being registered to this configuration according to component after developer component in second allocation list
Component type in table.
Optionally, the process of developer component includes:
Component is created, and the module data administrative model for management assembly state is created for the component;
It is data protocol described in the component according to the data protocol format of setting;
The component and module data administrative model are developed, and in the Rendering logic of the component, by the package count
According to component states and the component binding in administrative model.
The second aspect of embodiment according to the present invention provides a kind of dynamic assembly realization device, including:
Data acquisition module, for after page creation, the number of each component in the page to be retrieved as from server
According to agreement;
First processing module, for the data protocol according to each component, respectively described each component is created for managing
Manage the module data administrative model example of component states;
Second processing module, for creating each component;
Third processing module, for tying up each component created with the corresponding module data administrative model example
It is fixed.
Optionally, the data protocol includes:Component identifies and component states data.
Optionally, the first processing mould, specifically for the component mark for including in the data protocol according to each component
Know, search preconfigured first allocation list, obtains the type for identifying corresponding module data administrative model with the component;Root
According to the type of the module data administrative model, the module data administrative model example is created, and will be in the data protocol
Including the setting of component states data in the Data Management Model example.
Optionally, the Second processing module, for being identified according to the component of each component, preconfigured second
Component type corresponding with component mark is searched in allocation list, and component is created according to the component type.
Optionally, the third processing module is specifically used in the Rendering logic of the page, by each component of establishment
It is bound with the corresponding module data administrative model example, so that the module data of each component created in binding
Component states data are taken in administrative model example, carry out component rendering.
Optionally, described device further includes:First configuration module;
First configuration module is used for before page creation, is created the first allocation list, is included in first allocation list
The type of the module data administrative model in this allocation list is registered to according to component after developer component.
Optionally, described device further includes:Second configuration module;
Second configuration module is used for before page creation, is created the second allocation list, is included in second allocation list
The component type being registered to according to component after developer component in this allocation list.
Optionally, described device further includes:
Components Development module creates the module data for management assembly state for creating component, and for the component
Administrative model;It is data protocol described in the component according to the data protocol format of setting;And the exploitation component and
Module data administrative model, and in the Rendering logic of the component, by the component states in the module data administrative model
With the component binding.
According to the present invention in terms of the third of embodiment, a kind of computing device is provided, the computing device includes:Storage
Device, processor and communication bus;The communication bus is for realizing the connection communication between processor and memory;
The processor is used to execute the dynamic assemblyization stored in memory and realizes program, to realize that following method walks
Suddenly:
After page creation, the data protocol of each component in the page is retrieved as from server;
According to the data protocol of each component, respectively described each component creates the package count for management assembly state
According to administrative model example;
Each component is created, and each component of establishment is tied up with the corresponding module data administrative model example
It is fixed.
4th aspect of embodiment according to the present invention, provides a kind of computer readable storage medium, the computer can
It reads to be stored with computer program on storage medium, which realizes following method and step when being executed by processor:
After page creation, the data protocol of each component in the page is retrieved as from server;
According to the data protocol of each component, respectively described each component creates the package count for management assembly state
According to administrative model example;
Each component is created, and each component of establishment is tied up with the corresponding module data administrative model example
It is fixed.
Dynamic assembly implementation provided in an embodiment of the present invention creates the number of component according to the data protocol of component
According to administrative model, by the model and component binding, the management to component states using Data Management Model is realized.To realize
In the case where not updating packet, by adjusting the data protocol of the component of background server storage, using for management assembly
The module data administrative model of state, to change the service condition of component, without determining the service condition of component in advance.
Above description is only the general introduction of technical solution of the embodiment of the present invention, in order to better understand the embodiment of the present invention
Technological means, and can be implemented in accordance with the contents of the specification, and in order to allow above and other mesh of the embodiment of the present invention
, feature and advantage can be clearer and more comprehensible, the special specific implementation mode for lifting the embodiment of the present invention below.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit are common for this field
Technical staff will become clear.Attached drawing only for the purpose of illustrating preferred embodiments, and is not considered as to the present invention
The limitation of embodiment.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is a kind of flow chart for dynamic assembly implementation method that first embodiment of the invention provides;
Fig. 2 is a kind of flow chart for dynamic assembly implementation method that second embodiment of the invention provides;
Fig. 3 is a kind of flow chart for dynamic assembly implementation method that third embodiment of the invention provides;
Fig. 4 is a kind of structure diagram for dynamic assembly realization device that fifth embodiment of the invention provides;
Fig. 5 is a kind of structure diagram for dynamic assembly realization device that sixth embodiment of the invention provides.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
In the first embodiment of the invention, a kind of dynamic assembly implementation method is provided, more specifically, provides a kind of base
In the dynamic assembly implementation method of ReactNative, optionally, it is applied to the page development stage.
As shown in Figure 1, described method includes following steps for the present embodiment:
Step S101 is retrieved as the data protocol of each component in the page from server after page creation;
In the embodiment of the present invention, the page can be, but not limited to the page to be loaded for application program.
In the embodiment of the present invention, the format of the data protocol can flexible configuration according to demand, the present invention is not to it
Do unique restriction.
Component states data are included at least in the data protocol.Wherein, it to be opened up in the main finger assembly of component states data
The data shown, for example, the address for the picture to be shown in component, color etc..
Step S102, according to the data protocol of each component, respectively described each component, which creates, is used for management assembly shape
The module data administrative model example of state;
In the embodiment of the present invention, Data Management Model is the observable object under a MobX frame, the attribute in object
The state of proxy component, meanwhile, which is also responsible for providing interface, is called for other external environments, and then changes component states.
So in the present embodiment, the effect of Data Management Model is the state of management assembly.
In the embodiment of the present invention, in the Components Development stage, being created for each component has corresponding Data Management Model,
And the type of Data Management Model and inter-module are established into mapping relations.It in turn, can be according in the page after page creation
The type of the corresponding Data Management Model of each component, creates corresponding Data Management Model example.
In the embodiment of the present invention, the type of module data administrative model, which is one kind in an exemplary embodiment, to be created
Build the method class of module data administrative model.
Step S103, creates each component, and by each component of establishment and the corresponding module data administrative model
Example is bound.
In the embodiment of the present invention, according to the type for the component that the Components Development stage determines, each component is created.Wherein, component
Type in one exemplary embodiment be create component method class.
In the embodiment of the present invention, in the Rendering logic of the page, by each component of establishment and the corresponding component
Data Management Model is bound, so that each component created takes component states in the module data administrative model of binding
Data carry out component rendering.
To sum up, the page developed using the method for the embodiment of the present invention, when component is adjusted in needing to the page,
The Data Management Model reality for only needing to adjust the data protocol for the component that background server stores, and being created based on data protocol
Example, you can will be in the state synchronized to component after adjustment.So that scheme described in the embodiment of the present invention is supported in the feelings for not updating packet
Under condition, original open is increased to change the service condition of component using the module data administrative model for management assembly state
Send out the dynamic characteristic of frame.
In second embodiment of the invention, a kind of dynamic assembly implementation method is provided, more specifically, provides a kind of base
In the dynamic assembly implementation method of ReactNative, optionally, it is applied to the page development stage.
As shown in Fig. 2, described method includes following steps for the present embodiment:
Step S201 is retrieved as the data protocol of each component in the page from server after page creation;
In the embodiment of the present invention, the page can be, but not limited to the page to be loaded for application program.
Component mark and component states data are included at least in the embodiment of the present invention, in the data protocol.
Wherein, component is identified as the unique mark that the Components Development stage is component establishment.Component states data refer mainly to group
The data to be shown in part, for example, the address for the picture to be shown in component, color etc..
Step S202 is identified according to the component for including in the data protocol of each component, searches preconfigured first
Allocation list obtains the type that corresponding module data administrative model is identified with the component;
Step S203 creates the module data administrative model example according to the type of the module data administrative model,
And it will be in the component states data for including in data protocol setting to the Data Management Model example.
Step S204, according to the component of each component identify, in preconfigured second allocation list search with it is described
Component identifies corresponding component type;
Step S205 creates component according to the component type, and by each component of establishment and the corresponding package count
It is bound according to administrative model example.
In the embodiment of the present invention, in the Rendering logic of the page, by each component of establishment and the corresponding component
Data Management Model is bound, so that each component created takes component states in the module data administrative model of binding
Data carry out component rendering.
To sum up, the page developed using the method for the embodiment of the present invention, when component is adjusted in needing to the page,
The Data Management Model reality for only needing to adjust the data protocol for the component that background server stores, and being created based on data protocol
Example, you can will be in the state synchronized to component after adjustment.So that scheme described in the embodiment of the present invention is supported in the feelings for not updating packet
Under condition, original open is increased to change the service condition of component using the module data administrative model for management assembly state
Send out the dynamic characteristic of frame.
In the third embodiment of the present invention, a kind of dynamic assembly implementation method is provided and more specifically provides one kind
Dynamic assembly implementation method based on ReactNative is optionally applied to the page development stage.
As shown in figure 3, described method includes following steps for the present embodiment:
Step S301 creates the first allocation list and the second allocation list;
Wherein, the module data being registered to according to component after developer component in this allocation list is included in the first allocation list
The type of administrative model;Include the component class being registered to according to component after developer component in this allocation list in second allocation list
Type.
Wherein, the process of developer component includes:
Component is created, and the module data administrative model for management assembly state is created for the component;
It is the component data protocol according to the data protocol format of setting;
The component and module data administrative model are developed, and in the Rendering logic of the component, by the package count
According to component states and the component binding in administrative model.
Wherein, the process of developer component and module data administrative model, it can be understood as developer component and module data pipe
Manage the process of the specific service logic of model.
In the present embodiment, when creating component, a unique mark is created for each component, i.e. component identifies, and is opened in component
After the completion of hair, is identified using component and the type of the component type of component and module data administrative model is registered to corresponding configuration
In table.
Step S302 is retrieved as the data protocol of each component in the page from server after page creation;
Component mark and component states data are included at least in the embodiment of the present invention, in the data protocol.
Wherein, component is identified as the unique mark that the Components Development stage is component establishment.Component states data refer mainly to group
The data to be shown in part, for example, the address for the picture to be shown in component, color etc..
Step S303 is identified according to the component for including in the data protocol of each component, searches preconfigured first
Allocation list obtains the type that corresponding module data administrative model is identified with the component;
In the embodiment of the present invention, the type of module data administrative model, which is one kind in an exemplary embodiment, to be created
Build the method class of module data administrative model.
Step S304 creates the module data administrative model example according to the type of the module data administrative model,
And it will be in the component states data for including in data protocol setting to the Data Management Model example.
Step S305, according to the component of each component identify, in preconfigured second allocation list search with it is described
Component identifies corresponding component type;
Step S306 creates component according to the component type, and by each component of establishment and the corresponding package count
It is bound according to administrative model example.
In the embodiment of the present invention, in the Rendering logic of the page, by each component of establishment and the corresponding component
Data Management Model is bound, so that each component created takes component states in the module data administrative model of binding
Data carry out component rendering.
To sum up, the page developed using the method for the embodiment of the present invention, when component is adjusted in needing to the page,
The Data Management Model reality for only needing to adjust the data protocol for the component that background server stores, and being created based on data protocol
Example, you can will be in the state synchronized to component after adjustment.So that scheme described in the embodiment of the present invention is supported in the feelings for not updating packet
Under condition, original open is increased to change the service condition of component using the module data administrative model for management assembly state
Send out the dynamic characteristic of frame.
In the fourth embodiment of the present invention, a kind of dynamic assembly implementation method is provided, the present embodiment will be from two sides
More detailed explanation is carried out in face of the embodiment of the present invention process.
One, page development;
First, building for page development frame is carried out, specifically:
1. creating two allocation lists.One allocation list carrys out configuration component type using the unique mark of component, another is matched
Set the type that table carrys out configuration component Data Management Model using the unique mark of component;Wherein, module data administrative model i.e. one
Observable object under a MobX frames.The effect of the object is the state of management assembly, is represented below with Model.
In the present embodiment, the form of allocation list is illustratively as follows:
{tag_a:ItemA,…}
{tag_a:ModelA,…}
Wherein, tag_a is the unique mark of component, and ItemA is the type of component, and ModelA is the type of model A.
Include mainly two functions 2. realizing a factory class:First, according to component mark acquisition group in allocation list
The type of part.Second is that identifying the type for getting Model in allocation list, wound according to the component for including in the data protocol of the page
Build corresponding Model examples.
3. formulating the page data agreement of conversion Model for factory class, and realize conversion process.Such as by following this shape
Formula:
[{type:tag_a,data:{title:aaa}},
{type:tag_b,data:{title:bbb}},
{type:tag_c,data:{title:ccc}},…]
It is converted into this form:
[ModelA examples, ModelB examples, ModelC examples ...]
It is the page according to factory class 4. creating the page and creating the corresponding page Model for administration page state
Model creates a zinc plant engineering, for the data protocol of the component obtained from background server to be switched to component Model examples
List.
5. realizing in the Rendering logic of the page, the component Model example list securing component marks in page Model are traversed
Know, and using the zinc plant engineering of page Model according to mark securing component type, and the Model examples of component are tied up with component
Surely the state binding of page rendering is completed.
Based on above-mentioned page development frame, Components Development is carried out, Components Development process includes:
11. creating component and being corresponded to for the component and create a unique mark and a Model.
In the present embodiment, each component (non-page assembly) fixes two attributes, and one is the Data Management Model of itself,
The other is the Data Management Model of the page.For page assembly, (i.e. the page also corresponds to component, belongs to comprising multiple components
Parent component) fix an attribute, the i.e. Data Management Model of its own.
In the present embodiment, the purpose of the Data Management Model comprising the page is that this component can pass through the page in attribute
The interface that provides of Data Management Model find in the page other components, with the state of the other components of modification.
12. being the corresponding back-end data agreement of component.Such as press following this form:
{type:tag_a,data:{title:aaa}}
Wherein, tag_a identifies for component, { title:Aaa } it is component states data.
13. carry out the exploitation of component and component Model, and in the Rendering logic of component by the state of component Model and
Component binding completes the Rendering logic of component.
14. component and component Model are completed the exploitation of a component by being registered in allocation list.
Continue 11-14 steps and develops other assemblies.
Two, using above-mentioned page development frame, carries out page development and specifically include:
Step 1, the page is created;
Step 2, page Model is created;
Step 3, it is that page Model creates a zinc plant engineering according to factory class;
Step 4, the data protocol of each component in the page is obtained from server;
Step 5, the component for each component for including in data protocol of the zinc plant engineering according to each component identifies, from allocation list
The type of component Model is got, and corresponding Model examples are created according to the type of component Model, and will be in data protocol
Including the setting of component states data in corresponding Model examples, obtain Model example lists;
Step 6, page rendering is triggered;
Step 7, zinc plant engineering traverses Model example lists, takes out component mark;
Step 8, zinc plant engineering identifies the type that corresponding component is got from allocation list according to component;
Step 9, component is created according to the type of component;
Step 10, component Modle examples are bound with corresponding component;
Step 11, component is fetched in component Model according to progress component rendering.
Scheme described in the present embodiment, increases dynamic characteristic in original ReactNative frame foundations, supports not more
In the case of new RN packets, the service condition of component is changed without determining in advance by the adjustment of back-end data agreement.And
And do not have dependence between component and the page, do not have to pay close attention to that how many page uses, and directly changes when changing component,
Reduce maintenance cost.
In addition, the present embodiment is only absorbed in the realization with the realization and component Model of component after the completion of dynamic frame is built,
And without the service condition of the concern page, new page development also only needs to apply mechanically allocation plan, need not pay close attention to component
It realizes, greatly improves development efficiency.It solves in the prior art in component reusing technology, each the newly-built page must be again real
Now nested to component and attribute configuration, causes repeated workload to improve, the low problem of development efficiency.
In fifth embodiment of the invention, a kind of dynamic assembly realization device is provided, as shown in figure 4, including:
Data acquisition module 410, for after page creation, each component in the page to be retrieved as from server
Data protocol;
First processing module 420, for the data protocol according to each component, respectively described each component establishment is used for
The module data administrative model example of management assembly state;
Second processing module 430, for creating each component;
Third processing module 440, for each component that will create and the corresponding module data administrative model example into
Row binding.
Optionally, in the embodiment of the present invention, third processing module 440 is specifically used in the Rendering logic of the page,
Each component of establishment is bound with the corresponding module data administrative model example, so that each component created is being bound
The module data administrative model example in take component states data, carry out component rendering.
Optionally, in the embodiment of the present invention, the data protocol includes:Component identifies and component states data.
In the embodiment of the present invention, the format of the data protocol can flexible configuration according to demand, the present invention is not to it
Do unique restriction.Wherein, component is identified as the unique mark that the Components Development stage is component establishment.Component states data refer mainly to
The data to be shown in component, for example, the address for the picture to be shown in component, color etc..
To sum up, the page developed using described device of the embodiment of the present invention, when component is adjusted in needing to the page,
The Data Management Model reality for only needing to adjust the data protocol for the component that background server stores, and being created based on data protocol
Example, you can will be in the state synchronized to component after adjustment.So that scheme described in the embodiment of the present invention is supported in the feelings for not updating packet
Under condition, original open is increased to change the service condition of component using the module data administrative model for management assembly state
Send out the dynamic characteristic of frame.
In sixth embodiment of the invention, a kind of dynamic assembly realization device is provided, as shown in figure 5, including:
First configuration module 510, for creating the first allocation list, in first allocation list comprising after developer component according to
Component is registered to the type of the module data administrative model in this allocation list.
Second configuration module 520, for creating the second allocation list, in second allocation list comprising after developer component according to
Component is registered to the component type in this allocation list.
Data acquisition module 530, for after page creation, each component in the page to be retrieved as from server
Data protocol;
First processing module 540, the component mark for including in the data protocol according to each component, is searched advance
First allocation list of configuration obtains the type that corresponding module data administrative model is identified with the component;According to the component
The type of Data Management Model creates the module data administrative model example, and the component that will include in the data protocol
In status data setting to the Data Management Model example.
Second processing module 550, for being identified according to the component of each component, in preconfigured second allocation list
Component type corresponding with component mark is searched, component is created according to the component type.
Third processing module 560, for each component that will create and the corresponding module data administrative model example into
Row binding.
Optionally, third processing module 560, in the Rendering logic of the page, by each component of establishment with it is corresponding
The module data administrative model example is bound, so that the module data administrative model of each component created in binding
Component states data are taken in example, carry out component rendering.
In the embodiment of the present invention, the type of module data administrative model, which is one kind in an exemplary embodiment, to be created
Build the method class of module data administrative model.
In the embodiment of the present invention, the type of component is the method class for creating component in one exemplary embodiment.
Optionally, described device of the embodiment of the present invention further includes:
Components Development module 570 creates the package count for management assembly state for creating component, and for the component
According to administrative model;It is data protocol described in the component according to the data protocol format of setting;And the exploitation component
With module data administrative model, and in the Rendering logic of the component, by the component shape in the module data administrative model
State and the component binding.
To sum up, the page developed using described device of the embodiment of the present invention, when component is adjusted in needing to the page,
The Data Management Model reality for only needing to adjust the data protocol for the component that background server stores, and being created based on data protocol
Example, you can will be in the state synchronized to component after adjustment.So that scheme described in the embodiment of the present invention is supported in the feelings for not updating packet
Under condition, original open is increased to change the service condition of component using the module data administrative model for management assembly state
Send out the dynamic characteristic of frame.
In the seventh embodiment of the present invention, a kind of computing device is provided, the computing device includes:Memory, processing
Device and communication bus;The communication bus is for realizing the connection communication between processor and memory;
The processor is used to execute the dynamic assemblyization stored in memory and realizes program, to realize that following method walks
Suddenly:
Step 1, after page creation, the data protocol of each component in the page is retrieved as from server;
Step 2, according to the data protocol of each component, respectively described each component is created for management assembly state
Module data administrative model example;
Step 3, each component is created, and by each component of establishment and the corresponding module data administrative model example
It is bound.
The detailed implementation process of above steps can be found in first to fourth embodiment, and details are not described herein for the present embodiment.
In the eighth embodiment of the present invention, a kind of computer readable storage medium, the computer-readable storage are provided
Computer program is stored on medium, which realizes following method and step when being executed by processor:
Step 1, after page creation, the data protocol of each component in the page is retrieved as from server;
Step 2, according to the data protocol of each component, respectively described each component is created for management assembly state
Module data administrative model example;
Step 3, each component is created, and by each component of establishment and the corresponding module data administrative model example
It is bound.
The detailed implementation process of above steps can be found in first to fourth embodiment, and details are not described herein for the present embodiment.
In embodiment provided herein, it should be understood that disclosed device and method, it can also be by other
Mode realize.The apparatus embodiments described above are merely exemplary, for example, the flow chart and block diagram in attached drawing are shown
The device of multiple embodiments according to the present invention, the architectural framework in the cards of method and computer program product, function
And operation.In this regard, each box in flowchart or block diagram can represent one of a module, section or code
Point, a part for the module, section or code includes one or more for implementing the specified logical function executable
Instruction.It should also be noted that at some as in the realization method replaced, the function of being marked in box can also be attached to be different from
The sequence marked in figure occurs.For example, two continuous boxes can essentially be basically executed in parallel, they also may be used sometimes
To execute in the opposite order, this is depended on the functions involved.It is also noted that each of block diagram and or flow chart
The combination of box in box and block diagram and or flow chart, function or the dedicated of action are based on as defined in execution
The system of hardware is realized, or can be realized using a combination of dedicated hardware and computer instructions.
In addition, each function module in each embodiment of the present invention can integrate to form an independent portion
Point, can also be modules individualism, can also two or more modules be integrated to form an independent part.
In short, the foregoing is merely illustrative of the preferred embodiments of the present invention, it is not intended to limit the scope of the present invention.
All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should be included in the present invention's
Within protection domain.
Claims (18)
1. a kind of dynamic assembly implementation method, which is characterized in that including:
After page creation, the data protocol of each component in the page is retrieved as from server;
According to the data protocol of each component, respectively described each component creates the module data pipe for management assembly state
Manage model instance;
Each component is created, and each component of establishment is bound with the corresponding module data administrative model example.
2. the method as described in claim 1, which is characterized in that the data protocol includes:Component identifies and component states
Data.
3. method as claimed in claim 2, which is characterized in that the data protocol according to each component, respectively institute
It states each component and creates the module data administrative model example for being used for management assembly state, including:
According to the component mark for including in the data protocol of each component, search preconfigured first allocation list, obtain with
The component identifies the type of corresponding module data administrative model;
According to the type of the module data administrative model, the module data administrative model example is created, and by the data
In the component states data setting to the Data Management Model example for including in agreement.
4. method as claimed in claim 2, which is characterized in that establishment each component, including:
It is identified, is searched in preconfigured second allocation list corresponding with component mark according to the component of each component
Component type;
Component is created according to the component type.
5. the method as described in Claims 1-4 any one, which is characterized in that each component by establishment with it is corresponding
The module data administrative model example is bound, and is specifically included:
In the Rendering logic of the page, each component of establishment is carried out with the corresponding module data administrative model example
Binding carries out group so that each component created takes component states data in the module data administrative model example of binding
Part renders.
6. method as claimed in claim 3, which is characterized in that before page creation, further include:
The first allocation list is created, comprising being registered in this allocation list according to component after developer component in first allocation list
Module data administrative model type.
7. method as claimed in claim 4, which is characterized in that before page creation, further include:
The second allocation list is created, comprising being registered in this allocation list according to component after developer component in second allocation list
Component type.
8. method as claimed in claims 6 or 7, which is characterized in that the process of developer component includes:
Component is created, and the module data administrative model for management assembly state is created for the component;
It is data protocol described in the component according to the data protocol format of setting;
The component and module data administrative model are developed, and in the Rendering logic of the component, by the module data pipe
Manage the component states in model and the component binding.
9. a kind of dynamic assembly realization device, which is characterized in that including:
Data acquisition module, for after page creation, the data association of each component in the page to be retrieved as from server
View;
First processing module, for the data protocol according to each component, respectively described each component is created for managing group
The module data administrative model example of part state;
Second processing module, for creating each component;
Third processing module, for binding each component created with the corresponding module data administrative model example.
10. device as claimed in claim 9, which is characterized in that the data protocol includes:Component identifies and component states
Data.
11. device as claimed in claim 10, which is characterized in that the first processing mould is specifically used for according to each group
The component mark for including in the data protocol of part, searches preconfigured first allocation list, obtains corresponding with component mark
Module data administrative model type;According to the type of the module data administrative model, the module data management is created
Model instance, and will be in the component states data for including in data protocol setting to the Data Management Model example.
12. device as claimed in claim 10, which is characterized in that the Second processing module, for according to each component
Component mark, corresponding with component mark component type is searched in preconfigured second allocation list, according to described
Component type creates component.
13. the device as described in claim 9 to 12 any one, which is characterized in that the third processing module is specifically used for
In the Rendering logic of the page, each component of establishment is tied up with the corresponding module data administrative model example
It is fixed, so that each component created takes component states data in the module data administrative model example of binding, carry out component
It renders.
14. device as claimed in claim 11, which is characterized in that further include:First configuration module;
First configuration module includes exploitation for before page creation, creating the first allocation list in first allocation list
The type of the module data administrative model in this allocation list is registered to according to component after component.
15. device as claimed in claim 12, which is characterized in that further include:Second configuration module;
Second configuration module includes exploitation for before page creation, creating the second allocation list in second allocation list
The component type being registered to according to component after component in this allocation list.
16. the device as described in claims 14 or 15, which is characterized in that further include:
Components Development module creates the module data management for management assembly state for creating component, and for the component
Model;It is data protocol described in the component according to the data protocol format of setting;And develop the component and component
Data Management Model, and in the Rendering logic of the component, by the module data administrative model component states and institute
State component binding.
17. a kind of computing device, which is characterized in that the computing device includes:Memory, processor and communication bus;It is described
Communication bus is for realizing the connection communication between processor and memory;
The processor is used to execute the dynamic assemblyization stored in memory and realizes program, to realize as in claim 1 to 8
The step of any one of them dynamic assembly implementation method.
18. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program is realized when the program is executed by processor such as dynamic assembly implementation method described in any item of the claim 1 to 8
Step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810630759.6A CN108804197B (en) | 2018-06-19 | 2018-06-19 | Dynamic componentization implementation method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810630759.6A CN108804197B (en) | 2018-06-19 | 2018-06-19 | Dynamic componentization implementation method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108804197A true CN108804197A (en) | 2018-11-13 |
CN108804197B CN108804197B (en) | 2022-04-05 |
Family
ID=64083483
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810630759.6A Active CN108804197B (en) | 2018-06-19 | 2018-06-19 | Dynamic componentization implementation method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108804197B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109683884A (en) * | 2018-12-25 | 2019-04-26 | 福建南威软件有限公司 | A kind of cloud application modular assembly method |
CN112667263A (en) * | 2021-01-05 | 2021-04-16 | 北京城市网邻信息技术有限公司 | Dynamic updating method and device of Flutter component, electronic equipment and storage medium |
WO2022017473A1 (en) * | 2020-07-23 | 2022-01-27 | 杭州海康威视数字技术股份有限公司 | Application program interface display method and apparatus, and computer device |
CN114385733A (en) * | 2021-12-31 | 2022-04-22 | 上海柯林布瑞信息技术有限公司 | Method and device for uniformly creating data model in ETL (extract transform and load) process |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105574049A (en) * | 2014-10-30 | 2016-05-11 | 阿里巴巴集团控股有限公司 | Page processing method, device and system of mobile applications |
CN105760149A (en) * | 2014-12-18 | 2016-07-13 | 阿里巴巴集团控股有限公司 | Client-terminal-interface dynamic display method and system |
CN105955723A (en) * | 2016-04-21 | 2016-09-21 | 人人行科技股份有限公司 | Method and device for processing cross-platform application of mobile terminal |
CN106528601A (en) * | 2016-09-23 | 2017-03-22 | 北京五八信息技术有限公司 | Method and device for dynamically configuring module |
CN106843850A (en) * | 2016-12-28 | 2017-06-13 | 北京五八信息技术有限公司 | A kind of method and apparatus that native objects are transmitted between React Native components |
CN107291482A (en) * | 2016-03-30 | 2017-10-24 | 阿里巴巴集团控股有限公司 | The display methods and device of content of pages in application program |
US20170329746A1 (en) * | 2016-05-12 | 2017-11-16 | Alibaba Group Holding Limited | Page component dynamic layout |
CN107391114A (en) * | 2017-06-27 | 2017-11-24 | 阿里巴巴集团控股有限公司 | The page visualizes rendering intent and device |
CN108121539A (en) * | 2016-11-28 | 2018-06-05 | 北京国双科技有限公司 | Component processing method and device |
-
2018
- 2018-06-19 CN CN201810630759.6A patent/CN108804197B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105574049A (en) * | 2014-10-30 | 2016-05-11 | 阿里巴巴集团控股有限公司 | Page processing method, device and system of mobile applications |
CN105760149A (en) * | 2014-12-18 | 2016-07-13 | 阿里巴巴集团控股有限公司 | Client-terminal-interface dynamic display method and system |
CN107291482A (en) * | 2016-03-30 | 2017-10-24 | 阿里巴巴集团控股有限公司 | The display methods and device of content of pages in application program |
CN105955723A (en) * | 2016-04-21 | 2016-09-21 | 人人行科技股份有限公司 | Method and device for processing cross-platform application of mobile terminal |
US20170329746A1 (en) * | 2016-05-12 | 2017-11-16 | Alibaba Group Holding Limited | Page component dynamic layout |
CN106528601A (en) * | 2016-09-23 | 2017-03-22 | 北京五八信息技术有限公司 | Method and device for dynamically configuring module |
CN108121539A (en) * | 2016-11-28 | 2018-06-05 | 北京国双科技有限公司 | Component processing method and device |
CN106843850A (en) * | 2016-12-28 | 2017-06-13 | 北京五八信息技术有限公司 | A kind of method and apparatus that native objects are transmitted between React Native components |
CN107391114A (en) * | 2017-06-27 | 2017-11-24 | 阿里巴巴集团控股有限公司 | The page visualizes rendering intent and device |
Non-Patent Citations (1)
Title |
---|
ZHAOXINGYA: "《https://www.cnblogs.com/xingyazhao/p/7762261.html》", 《VUE组件PROPS选项-实现父子组件动态数据绑定》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109683884A (en) * | 2018-12-25 | 2019-04-26 | 福建南威软件有限公司 | A kind of cloud application modular assembly method |
WO2022017473A1 (en) * | 2020-07-23 | 2022-01-27 | 杭州海康威视数字技术股份有限公司 | Application program interface display method and apparatus, and computer device |
CN112667263A (en) * | 2021-01-05 | 2021-04-16 | 北京城市网邻信息技术有限公司 | Dynamic updating method and device of Flutter component, electronic equipment and storage medium |
CN114385733A (en) * | 2021-12-31 | 2022-04-22 | 上海柯林布瑞信息技术有限公司 | Method and device for uniformly creating data model in ETL (extract transform and load) process |
Also Published As
Publication number | Publication date |
---|---|
CN108804197B (en) | 2022-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108804197A (en) | A kind of dynamic assembly implementation method, device, equipment and storage medium | |
CN102576354B (en) | Support that difference disposes the extensible framework of framework | |
CN102103497B (en) | Finite state machine actuating device and method, and method for establishing and using finite state machine | |
CN102236709B (en) | Flex-based monitoring page display method and system | |
CN106371825A (en) | Dynamic form generation method and apparatus for mobile end application interface | |
CA2539460A1 (en) | System and method for dynamic version management of applications | |
CN108563517A (en) | The call method and device of system interface | |
CN106302442A (en) | A kind of network communication packet analytic method based on Java language | |
CN109144615A (en) | A kind of information issuing method, device, equipment and storage medium | |
CN101635645B (en) | Method and device for managing network topology | |
CN102902576B (en) | Method, server and system for rendering webpages | |
CN103699633A (en) | Method and system for utilizing xml to realize generalization data exchange | |
CN110096685A (en) | A kind of device identification generation method and device | |
CN103077068B (en) | A kind of high-performance simulation system based on shared drive realizes method | |
US8615729B2 (en) | Extending existing model-to-model transformations | |
CN108416568A (en) | Government affairs business data processing method, device and terminal device | |
CN114610475A (en) | Training method of intelligent resource arrangement model | |
CN103473106B (en) | Method and system for generating page | |
CN109324731A (en) | Information display method and device | |
CN113591448B (en) | Report generation method, device and storage medium | |
CN102999329B (en) | The Active Directory interface exploitation method of configuration is mapped based on extend markup language | |
CN103365709A (en) | Recipe management method and system and semiconductor device control system | |
CN106856441A (en) | VIM systems of selection and device in NFVO | |
WO2024164559A1 (en) | System upgrading method and apparatus, and device and storage medium | |
CN109885816A (en) | Production method, device and the storage medium of PowerPoint |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |