CN108804100A - Create method, apparatus, storage medium and the mobile terminal of interface element - Google Patents
Create method, apparatus, storage medium and the mobile terminal of interface element Download PDFInfo
- Publication number
- CN108804100A CN108804100A CN201810504133.0A CN201810504133A CN108804100A CN 108804100 A CN108804100 A CN 108804100A CN 201810504133 A CN201810504133 A CN 201810504133A CN 108804100 A CN108804100 A CN 108804100A
- Authority
- CN
- China
- Prior art keywords
- interface element
- primary language
- scheduled
- service logic
- primary
- 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
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Abstract
The invention discloses a kind of method, apparatus, storage medium and mobile terminal creating interface element, method includes:Scheduled application receives the business data packet from server, wherein business data packet includes:Configuration file and the service logic data being arranged by the first scheduled instruction;Scheduled application generates predetermined resolver by the way that the corresponding primary interface element of configuration file to be packaged;The primary language component of scheduled application parses configuration file by predetermined resolver;Service logic data are carried out logical transition by the first scheduled instruction component of scheduled application according to primary language, and transformed service logic data and the corresponding power function index of transformed service logic data are sent to primary language component by scheduled transmission channel;Primary language component passes sequentially through power function according to the corresponding flow of transformed service logic data and indexes invoking performance function, and creates interface element according to power function and configuration parameter based on reflection build mechanism.
Description
Technical field
The present invention relates to data processing fields, more particularly to a kind of method, apparatus creating interface element, storage medium
And mobile terminal.
Background technology
Primary (i.e. Native) exploitation is that the most familiar of application software of developer (Application, referred to as APP) is opened
Hair pattern.Primary exploitation can be functional with the institute in access equipment, the speed of service faster, performance higher, and can enabling
Outstanding processed offline and storage capacity etc. provide best user experience, top quality user interface, most magnificent interaction.
Primary developer is numerous, and development environment is ripe, there are many library of increasing income developer be provided call, can facilitate realize it is various
Design effect.But one interface (i.e. Activity) of primary often exploitation is required for being registered in advance, and otherwise using should
It can cause the collapse of APP when Activity.
Therefore, when the interface element (i.e. View) of Activity in APP is modified, the prior art uses two kinds
Method, one is APP to access ReactNative frames (a kind of Development Framework) and does business more again on primary exploitation basis
New iteration, another kind are that local dynamic station is realized at the certain interfaces App developed with Html5.Wherein, ReactNative be can be with
Realize that newly-increased and content the update at interface, Html5 can only realize the update of its interface content.
Although the prior art can realize the change of interface element, which kind of above-mentioned method no matter is used, is all only existed
The change carried out in the APP of primary language is required for registering the interface of change, is in until issuing the new version of APP
User is now given, the interface element in the interfaces APP can not be modified in the case where not issuing new version APP, user experience
It is poor.
Invention content
The embodiment of the present invention provides a kind of method, apparatus, storage medium and mobile terminal creating interface element, to solve
The certainly following problem of the prior art:The interface element in the interfaces APP can not be carried out more in the case where not issuing new version APP
Change, user experience is poor.
In order to solve the above technical problems, on the one hand, the embodiment of the present invention provides a kind of method creating interface element, packet
It includes:Scheduled application receives the business data packet from server, wherein business data packet includes:Configuration file and pass through first
The service logic data of scheduled instruction setting, moreover, the first scheduled instruction is different from the primary language of scheduled application;Scheduled application
By the way that the corresponding primary interface element of configuration file to be packaged, predetermined resolver is generated;The primary group of languages of scheduled application
Part parses configuration file by predetermined resolver, and the configuration parameter that parsing obtains is stored in default memory space
In;Service logic data are carried out logical transition by the first scheduled instruction component of scheduled application according to primary language, and will conversion
The corresponding power function index of service logic data and transformed service logic data afterwards is sent by scheduled transmission channel
To primary language component;Primary language component passes sequentially through power function according to the corresponding flow of transformed service logic data
Invoking performance function is indexed, and interface element is created according to power function and configuration parameter based on reflection build mechanism.
Optionally, it is based on reflection build mechanism and creates interface element according to power function and configuration parameter, including:Primary language
It says that component obtains the interface element title in configuration parameter, initial interface element is built according to reflection build mechanism;Primary language
The interface element ID of initial interface element is assigned a value of default unique ID in configuration parameter by component;Primary language component is pressed successively
It is the initial interface element setting interface element parameter after interface element ID assignment according to the parameter in configuration parameter, to create interface
Element.
Optionally, primary language component passes sequentially through power function according to the corresponding flow of transformed service logic data
After indexing invoking performance function, further include:Primary language component obtains default unique ID of the interface element in configuration parameter,
And the system identifier of interface element is determined according to default unique ID;Primary language component detecting system ID whether there is the boundary created
Surface element;In the case where the interface element created is not present in system identifier, primary language component is based on reflection build mechanism and presses
Interface element is created according to power function and configuration parameter.
Optionally, after primary language component detecting system ID whether there is the interface element created, further include:It is being
In the case that system ID has the interface element created, the corresponding Interface Element of interface element created is changed according to configuration parameter
Plain parameter, to update the interface element created.
Optionally, after being based on reflection build mechanism according to power function and configuration parameter establishment interface element, further include:
The interface element created is added in the corresponding father node interface element of interface element by primary language component, to be answered predetermined
Interface element is presented in predetermined interface.
On the other hand, the embodiment of the present invention also provides a kind of device creating interface element, including:Receiving module is used for
Receive the business data packet from server, wherein business data packet includes:Configuration file and pass through the first scheduled instruction be arranged
Service logic data, moreover, the first scheduled instruction is different from the primary language of scheduled application;Resolver generation module, is used for
The corresponding primary interface element of configuration file is packaged by scheduled application, generates predetermined resolver;Parsing module is used for
The configuration that configuration file is parsed by the predetermined resolver in the primary language component of scheduled application, and parsing is obtained
Parameter is stored in default memory space;Processing module, for being patrolled business by the first scheduled instruction component of scheduled application
Volume data carry out logical transition according to primary language, and by transformed service logic data and transformed service logic data
Corresponding power function index is sent to primary language component by scheduled transmission channel;Calling module, for passing through primary language
Speech component passes sequentially through power function according to the corresponding flow of transformed service logic data and indexes invoking performance function;It creates
Module creates interface element for being based on reflection build mechanism by primary language component according to power function and configuration parameter.
Optionally, creation module includes:Construction unit, for obtaining the interface in configuration parameter by primary language component
Element term builds initial interface element according to reflection build mechanism;First setting unit, being used for will by primary language component
The interface element ID of initial interface element is assigned a value of default unique ID in configuration parameter;Second setting unit, for passing through original
Raw language component is the initial interface element setting Interface Element after interface element ID assignment according to the parameter in configuration parameter successively
Plain parameter, to create interface element.
Optionally, further include:Determining module, for obtaining the interface element in configuration parameter by primary language component
Unique ID is preset, and determines the system identifier of interface element according to default unique ID;Detection module, for passing through primary language component
Detecting system ID whether there is the interface element created;Creation module is additionally operable to that the interface created is not present in system identifier
In the case of element, reflection build mechanism is based on by primary language component and creates Interface Element according to power function and configuration parameter
Element.
Optionally, creation module is additionally operable to, in the case where system identifier has the interface element created, according to configuration join
The corresponding interface element parameter of interface element that number modification has created, to update the interface element created.
Optionally, further include:Add module, for the interface element created to be added to boundary by primary language component
In the corresponding father node interface element of surface element, interface element to be presented in the predetermined interface of scheduled application.
On the other hand, the embodiment of the present invention also provides a kind of storage medium, is stored with computer program, computer program quilt
The step of processor realizes the method for above-mentioned establishment interface element when executing.
On the other hand, the embodiment of the present invention also provides a kind of mobile terminal, includes at least memory, processor, memory
On be stored with computer program, processor realizes the side of above-mentioned establishment interface element in the computer program on executing memory
The step of method.
In embodiments of the present invention, the predetermined resolver pair that scheduled application is generated by the encapsulated primary interface element
It is parsed from the service logic data of server dynamic access, and combines the configuration file from server dynamic access, realized
Create interface element by reflecting build mechanism, meanwhile, also achieve the primary interface element in conjunction with scheduled application complete it is pre-
Surely the interface update applied, and the experience effect with native system is allowed users to, and so that scheduled application is in dynamic
The selection type of interface element is some more when changing update.Wherein, the first scheduled instruction is the language different from primary language,
Can dynamically issue, thus scheduled application can receive at any time include service logic data and configuration file business datum
Packet, and then the predetermined resolver that can be generated at any time in conjunction with the encapsulated primary interface element are realized and use business data packet
In service logic data and configuration parameter come by reflect build mechanism create interface element.
In addition, the present embodiment can receive business data packet at any time, and generated in conjunction with the encapsulated primary interface element
Predetermined resolver realize it is dynamic create interface element, the APP for needing not wait for publication new version can change Interface Element
Element, better user experience are also relatively suitble to business promotion, solve the problems, such as the as follows of the prior art:Do not issuing new version APP's
In the case of the interface element in the interfaces APP can not be modified, user experience is poor.
Description of the drawings
Fig. 1 is the flow chart for the method that interface element is created in first embodiment of the invention;
Fig. 2 is the flow chart for the method that interface element is created in second embodiment of the invention;
Fig. 3 is the flow chart for the method that interface element is created in third embodiment of the invention;
Fig. 4 is the flow chart for the method that interface element is created in fourth embodiment of the invention;
Fig. 5 is the structural schematic diagram for the device that interface element is created in fifth embodiment of the invention;
Fig. 6 is the structural schematic diagram for the device that interface element is created in sixth embodiment of the invention;
Fig. 7 is the structural schematic diagram for the device that interface element is created in seventh embodiment of the invention;
Fig. 8 is the structural schematic diagram for the device that interface element is created in eighth embodiment of the invention;
Fig. 9 is the sides Native of DU frames in the embodiment of the present invention and the schematic diagram that the sides JS interact;
Figure 10 is the relation schematic diagram of predetermined resolver, primary interface element and XML file in the embodiment of the present invention.
Specific implementation mode
In order to solve the problems, such as the as follows of the prior art:It can not be in the interfaces APP in the case where not issuing new version APP
Interface element is modified, and user experience is poor;The present invention provides a kind of method, apparatus creating interface element, storages to be situated between
Matter and mobile terminal, below in conjunction with attached drawing and embodiment, the present invention will be described in further detail.It should be appreciated that herein
Described specific embodiment is only used to explain the present invention, does not limit the present invention.
First embodiment of the invention provides a kind of method creating interface element, and the flow of this method is as shown in Figure 1, packet
Include step S101 to S105:
S101, scheduled application receive the business data packet from server, wherein business data packet includes:Configuration file
And the service logic data being arranged by the first scheduled instruction, moreover, the first scheduled instruction and the primary language of scheduled application are not
Together;
The embodiment of the present invention in order to allow the interface element of scheduled application median surface to be changed automatically, therefore in server side
One business data packet can be set, and the business data packet is sent to scheduled application.When specific implementation, which is
It needs to be issued by server dynamic, and scheduled application enable to realize that the newer mobilism of mobilism more new frame receives this
The business data packet that dynamic issues, should be therefore, in the data that business data packet includes containing the language that can dynamically issue
The data write.Since configuration file is usually all write using XML, it is not have dynamic to issue ability, therefore, is setting
When setting, it is the language that can dynamically issue to need the first scheduled instruction, such as:JavaScript.
After scheduled application receives the business data packet, so that it may to utilize the service logic data in the business data packet
With configuration file.
S102, scheduled application generate predetermined resolver by the way that the corresponding primary interface element of configuration file to be packaged;
Scheduled application is by the way that the corresponding primary interface element of configuration file to be packaged, to generate predetermined resolver,
In, the predetermined resolver and mobilism update adaptation so that the predetermined resolver can be to from server dynamic access
Configuration file is parsed;
Wherein, which is that the scheduled application is generated by edition upgrading.
The primary language component of S103, scheduled application parse configuration file by predetermined resolver, and will parsing
Obtained configuration parameter is stored in default memory space.
After receiving business data packet, scheduled application can be by predetermined resolver in the business data packet
Configuration file parse, and then obtains the configuration parameter of interface element.It is not at once after getting the configuration parameter
Using all parameters got, but these parameters are placed into a container, that is, is stored in default memory space, it should
Default memory space can be used as a class object example to exist when program is arranged.
The configuration parameter parsed is typically that can build all information of interface element, for example, at least include title,
Attribute set, child node, father node, default unique ID, system identifier etc..Developer be arranged program when, usually can also with
It includes the power function index that can generate interface element to set file, more easily to create interface element.
Service logic data are carried out logic according to primary language and turned by S104, the first scheduled instruction component of scheduled application
It changes, and transformed service logic data and the corresponding power function index of transformed service logic data is passed by predetermined
Defeated channel is sent to primary language component.
Since service logic data are write by the first scheduled instruction, identify the industry in primary language component
Be engaged in logical data when and None- identified, therefore, the first scheduled instruction component can be after receiving business data packet, by industry
Logical data be engaged according to primary language progress logical transition, so as to which corresponding transformed service logic is informed primary language
Say component so that primary language component can also identify the service logic data.
S105, primary language component pass sequentially through power function rope according to the corresponding flow of transformed service logic data
Draw invoking performance function, and interface element is created according to power function and configuration parameter based on reflection build mechanism.
After service logic data carry out logical transition, primary language component can then identify that the transformed business is patrolled
Volume, and then corresponding power function can be called according to the logic to realize the function of creating interface element, when specific implementation, often
The power function that one flow is related to all logically calls, can be according to power function when calling the power function
Corresponding function obtains corresponding configuration parameter, and then according to reflection build mechanism step by step according to required for configuration parameter establishment
Interface element.The process of above-mentioned establishment interface element can be updated to existing interface element and create interface element,
Can also be to there is no interface element carry out establishment process.
In embodiments of the present invention, the predetermined resolver pair that scheduled application is generated by the encapsulated primary interface element
It is parsed from the service logic data of server dynamic access, and combines the configuration file from server dynamic access, realized
Create interface element by reflecting build mechanism, meanwhile, also achieve the primary interface element in conjunction with scheduled application complete it is pre-
Surely the interface update applied, and the experience effect with native system is allowed users to, and so that scheduled application is in dynamic
The selection type of interface element is some more when changing update.Wherein, the first scheduled instruction is the language different from primary language,
Can dynamically issue, thus scheduled application can receive at any time include service logic data and configuration file business datum
Packet, and then the predetermined resolver that can be generated at any time in conjunction with the encapsulated primary interface element are realized and use business data packet
In service logic data and configuration parameter come by reflect build mechanism create interface element.
In addition, the present embodiment can receive business data packet at any time, and generated in conjunction with the encapsulated primary interface element
Predetermined resolver realize it is dynamic create interface element, the APP for needing not wait for publication new version can change Interface Element
Element, better user experience are also relatively suitble to business promotion.
Second embodiment of the invention provides a kind of method creating interface element, and the flow of this method is as shown in Fig. 2, packet
Include step S201 to S208:
S201, scheduled application receive the business data packet from server, wherein business data packet includes:Configuration file
And the service logic data being arranged by the first scheduled instruction, moreover, the first scheduled instruction and the primary language of scheduled application are not
Together;
The embodiment of the present invention in order to allow the interface element of scheduled application median surface to be changed automatically, therefore in server side
One business data packet can be set, and the business data packet is sent to scheduled application.When specific implementation, which is
It needs to be issued by server dynamic, and predetermined mobilism more new frame can receive the business data packet dynamically issued, because
This comprising data in should be the data write containing the language that can dynamically issue.Since configuration file is usually all
It is write using XML, is not have dynamic to issue ability, therefore, in setting, needing the first scheduled instruction to be can dynamic
The language issued, such as can be JavaScript.
After scheduled application receives the business data packet, so that it may to utilize the service logic data in the business data packet
With configuration file.
S202, scheduled application generate predetermined resolver by the way that the corresponding primary interface element of configuration file to be packaged;
Scheduled application is by the way that the corresponding primary interface element of configuration file to be packaged, to generate predetermined resolver,
In, the predetermined resolver and mobilism update adaptation so that the predetermined resolver can be to from server dynamic access
Configuration file is parsed;
Wherein, which is that the scheduled application is generated by edition upgrading.
The primary language component of S203, scheduled application parse configuration file by predetermined resolver, and will parsing
Obtained configuration parameter is stored in default memory space;
After receiving business data packet, scheduled application can be by predetermined resolver in the business data packet
Configuration file parse, and then obtains the configuration parameter of interface element.It is not at once after getting the configuration parameter
Using all parameters got, but these parameters are placed into a container, that is, is stored in default memory space, it should
Default memory space can be used as a class object example to exist when program is arranged.
The configuration parameter parsed is typically that can build all information of interface element, for example, at least include title,
Attribute set, child node, father node, default unique ID, system identifier etc..Developer be arranged program when, usually can also with
It includes the power function index that can generate interface element to set file, more easily to create interface element.
Service logic data are carried out logic according to primary language and turned by S204, the first scheduled instruction component of scheduled application
It changes, and transformed service logic data and the corresponding power function index of transformed service logic data is passed by predetermined
Defeated channel is sent to primary language component;
Since service logic data are write by the first scheduled instruction, identify the industry in primary language component
Be engaged in logical data when and None- identified, therefore, the first scheduled instruction component can be after receiving business data packet, by industry
Logical data be engaged according to primary language progress logical transition, so as to which corresponding transformed service logic is informed primary language
Say component so that primary language component can also identify the service logic data.
S205, primary language component pass sequentially through power function rope according to the corresponding flow of transformed service logic data
Draw invoking performance function;
S206, primary language component obtain the interface element title in configuration parameter, just according to reflection build mechanism structure
Beginning interface element;
The initial interface element is equivalent to only builds an interface element according to a name, but interface element is specifically assorted
Sample does not know also.
The interface element ID of initial interface element is assigned a value of default unique in configuration parameter by S207, primary language component
ID;
After presetting unique ID for initial interface element assignment, which is just provided with an identification number, is
The interface element subsequently created, which provides, searches basis.
S208, primary language component are the initial interface after interface element ID assignment according to the parameter in configuration parameter successively
Interface element parameter is arranged in element, to create interface element.
Above-mentioned S206 to S208 is to create interface element according to power function and configuration parameter based on reflection build mechanism
Process.
In the above process, after service logic data carry out logical transition, the primary primary language component of LISP program LISP then may be used
To identify the service logic, and then corresponding power function can be called according to the logic to realize the work(for creating interface element
Can, when specific implementation, the power function that each flow is related to logically calls, when calling the power function,
Corresponding configuration parameter can be obtained according to the corresponding function of power function, and then basis is matched step by step according to reflection build mechanism
It sets parameter and creates required interface element.The process of above-mentioned establishment interface element can be updated to having interface element
And create interface element, can also be to there is no interface element carry out establishment process.
In embodiments of the present invention, the predetermined resolver pair that scheduled application is generated by the encapsulated primary interface element
It is parsed from the service logic data of server dynamic access, and combines the configuration file from server dynamic access, realized
Create interface element by reflecting build mechanism, meanwhile, also achieve the primary interface element in conjunction with scheduled application complete it is pre-
Surely the interface update applied, and the experience effect with native system is allowed users to, and so that scheduled application is in dynamic
The selection type of interface element is some more when changing update.Wherein, the first scheduled instruction is the language different from primary language,
It can dynamically be issued, thus scheduled application can receive at any time include service logic data and configuration file business number
According to packet, and then the predetermined resolver that can be generated at any time in conjunction with the encapsulated primary interface element, it realizes and uses business datum
Service logic data and configuration parameter in packet to create interface element by reflecting build mechanism.
In addition, the present embodiment can receive business data packet at any time, and generated in conjunction with the encapsulated primary interface element
Predetermined resolver realize it is dynamic create interface element, the APP for needing not wait for publication new version can change Interface Element
Element, better user experience are also relatively suitble to business promotion.
Third embodiment of the invention provides a kind of method creating interface element, and the flow of this method is as shown in figure 3, packet
Include step S301 to S309:
S301, scheduled application receive the business data packet from server, wherein business data packet includes:Configuration file
And the service logic data being arranged by the first scheduled instruction, moreover, the first scheduled instruction and the primary language of scheduled application are not
Together;
The embodiment of the present invention in order to allow the interface element of scheduled application median surface to be changed automatically, therefore in server side
One business data packet can be set, and the business data packet is sent to scheduled application.When specific implementation, which is
It needs to be issued by server dynamic, and predetermined mobilism more new frame can receive the business data packet dynamically issued, because
This comprising data in should be the data write containing the language that can dynamically issue.Since configuration file is usually all
It is write using XML, is not have dynamic to issue ability, therefore, in setting, needing the first scheduled instruction to be can dynamic
The language issued, such as can be JavaScript.
After scheduled application receives the business data packet, so that it may to utilize the service logic data in the business data packet
With configuration file.
S302, scheduled application generate predetermined resolver by the way that the corresponding primary interface element of configuration file to be packaged;
Scheduled application is by the way that the corresponding primary interface element of configuration file to be packaged, to generate predetermined resolver,
In, the predetermined resolver and mobilism update adaptation so that the predetermined resolver can be to from server dynamic access
Configuration file is parsed;
The primary language component of S303, scheduled application parse configuration file by predetermined resolver, and will parsing
Obtained configuration parameter is stored in default memory space;
After receiving business data packet, scheduled application can be by predetermined resolver in the business data packet
Configuration file parse, and then obtains the configuration parameter of interface element.It is not at once after getting the configuration parameter
Using all parameters got, but these parameters are placed into a container, that is, is stored in default memory space, it should
Default memory space can be used as a class object example to exist when program is arranged.
The configuration parameter parsed is typically that can build all information of interface element, for example, at least include title,
Attribute set, child node, father node, default unique ID, system identifier etc..Developer be arranged program when, usually can also with
It includes the power function index that can generate interface element to set file, more easily to create interface element.
Service logic data are carried out logic according to primary language and turned by S304, the first scheduled instruction component of scheduled application
It changes, and transformed service logic data and the corresponding power function index of transformed service logic data is passed by predetermined
Defeated channel is sent to primary language component;
Since service logic data are write by the first scheduled instruction, identify the industry in primary language component
Be engaged in logical data when and None- identified, therefore, the first scheduled instruction component can be after receiving business data packet, by industry
Logical data be engaged according to primary language progress logical transition, so as to which corresponding transformed service logic is informed primary language
Say component so that primary language component can also identify the service logic data.
S305, primary language component pass sequentially through power function rope according to the corresponding flow of transformed service logic data
Draw invoking performance function.
S306, primary language component obtain default unique ID of the interface element in configuration parameter, and according to default unique
ID determines the system identifier of interface element;
S307, primary language component detecting system ID whether there is the interface element created.If it does not exist, then executing
Otherwise S307 executes S308.The process, which determines, whether there is the corresponding interface created of the system identifier in scheduled application
Element.Detect whether that the process that there is the interface element created can more quickly execute system flow by system identifier,
Operating process is more quick;
S308, in the case where the interface element created is not present in system identifier, primary language component is based on reflection and builds
Mechanism creates interface element according to power function and configuration parameter;
S309 changes the boundary created in the case where system identifier has the interface element created according to configuration parameter
The corresponding interface element parameter of surface element, to update the interface element created.
When the above process is realized, after service logic data carry out logical transition, primary language component can then identify this
Service logic, and then corresponding power function can be called according to the logic to realize the function of creating interface element, specifically in fact
Now, the power function that each flow is related to logically calls, can be according to work(when calling the power function
The corresponding function of energy function obtains corresponding configuration parameter, and then is created step by step according to configuration parameter according to reflection build mechanism
Required interface element.
In embodiments of the present invention, the predetermined resolver pair that scheduled application is generated by the encapsulated primary interface element
It is parsed from the service logic data of server dynamic access, and combines the configuration file from server dynamic access, realized
Create interface element by reflecting build mechanism, meanwhile, also achieve the primary interface element in conjunction with scheduled application complete it is pre-
Surely the interface update applied, and the experience effect with native system is allowed users to, and so that scheduled application is in dynamic
The selection type of interface element is some more when changing update.Wherein, the first scheduled instruction is the language different from primary language,
It can dynamically be issued, thus scheduled application can receive at any time include service logic data and configuration file business number
According to packet, and then the predetermined resolver that can be generated at any time in conjunction with the encapsulated primary interface element, it realizes and uses business datum
Service logic data and configuration parameter in packet to create interface element by reflecting build mechanism.
In addition, the present embodiment can receive business data packet at any time, and generated in conjunction with the encapsulated primary interface element
Predetermined resolver realize it is dynamic create interface element, the APP for needing not wait for publication new version can change Interface Element
Element, better user experience are also relatively suitble to business promotion.
Fourth embodiment of the invention provides a kind of method creating interface element, and the flow of this method is as shown in figure 4, packet
Include step S401 to S406:
S401, scheduled application receive the business data packet from server, wherein business data packet includes:Configuration file
And the service logic data being arranged by the first scheduled instruction, moreover, the first scheduled instruction and the primary language of scheduled application are not
Together;
The embodiment of the present invention in order to allow the interface element of scheduled application median surface to be changed automatically, therefore in server side
One business data packet can be set, and the business data packet is sent to scheduled application.When specific implementation, which is
It needs to be issued by server dynamic, and predetermined mobilism more new frame can receive the business data packet dynamically issued, because
This comprising data in should be the data write containing the language that can dynamically issue.Since configuration file is usually all
It is write using XML, is not have dynamic to issue ability, therefore, in setting, needing the first scheduled instruction to be can dynamic
The language issued, such as can be JavaScript.
After scheduled application receives the business data packet, so that it may to utilize the service logic data in the business data packet
With configuration file.
S402, scheduled application generate predetermined resolver by the way that the corresponding primary interface element of configuration file to be packaged;
Scheduled application is by the way that the corresponding primary interface element of configuration file to be packaged, to generate predetermined resolver,
In, the predetermined resolver and mobilism update adaptation so that the predetermined resolver can be to from server dynamic access
Configuration file is parsed;
The primary language component of S403, scheduled application parse configuration file by predetermined resolver, and will parsing
Obtained configuration parameter is stored in default memory space;
After receiving business data packet, scheduled application can be by predetermined resolver in the business data packet
Configuration file parse, and then obtains the configuration parameter of interface element.It is not at once after getting the configuration parameter
Using all parameters got, but these parameters are placed into a container, that is, is stored in default memory space, it should
Default memory space can be used as a class object example to exist when program is arranged.
The configuration parameter parsed is typically that can build all information of interface element, for example, at least include title,
Attribute set, child node, father node, default unique ID, system identifier etc..Developer be arranged program when, usually can also with
It includes the power function index that can generate interface element to set file, more easily to create interface element.
Service logic data are carried out logic according to primary language and turned by S404, the first scheduled instruction component of scheduled application
It changes, and transformed service logic data and the corresponding power function index of transformed service logic data is passed by predetermined
Defeated channel is sent to primary language component;
Since service logic data are write by the first scheduled instruction, identify the industry in primary language component
Be engaged in logical data when and None- identified, therefore, the first scheduled instruction component can be after receiving business data packet, by industry
Logical data be engaged according to primary language progress logical transition, so as to which corresponding transformed service logic is informed primary language
Say component so that primary language component can also identify the service logic data.
S405, primary language component pass sequentially through power function rope according to the corresponding flow of transformed service logic data
Draw invoking performance function, and interface element is created according to power function and configuration parameter based on reflection build mechanism;
After service logic data carry out logical transition, primary language component can then identify the service logic, Jin Erke
The function of creating interface element, when specific implementation, each flow are realized to call corresponding power function according to the logic
The power function being related to all logically calls, can be according to the corresponding work(of power function when calling the power function
Corresponding configuration parameter can be obtained, and then required Interface Element is created according to configuration parameter step by step according to reflection build mechanism
Element.The process of above-mentioned establishment interface element can be updated to existing interface element and create interface element, can also be
To there is no interface element carry out establishment process.
The interface element created is added to the corresponding father node interface element of interface element by S406, primary language component
In, interface element to be presented in the predetermined interface of scheduled application.
So far, interface element, which creates, completes, and can be presented on interface and can be used normally.
In embodiments of the present invention, the predetermined resolver pair that scheduled application is generated by the encapsulated primary interface element
It is parsed from the service logic data of server dynamic access, and combines the configuration file from server dynamic access, realized
Create interface element by reflecting build mechanism, meanwhile, also achieve the primary interface element in conjunction with scheduled application complete it is pre-
Surely the interface update applied, and the experience effect with native system is allowed users to, and so that scheduled application is in dynamic
The selection type of interface element is some more when changing update.Wherein, the first scheduled instruction is the language different from primary language,
It can dynamically be issued, thus scheduled application can receive at any time include service logic data and configuration file business number
According to packet, and then the predetermined resolver that can be generated at any time in conjunction with the encapsulated primary interface element, it realizes and uses business datum
Service logic data and configuration parameter in packet to create interface element by reflecting build mechanism.
In addition, the present embodiment can receive business data packet at any time, and generated in conjunction with the encapsulated primary interface element
Predetermined resolver realize it is dynamic create interface element, the APP for needing not wait for publication new version can change Interface Element
Element, better user experience are also relatively suitble to business promotion.
Fifth embodiment of the invention provides a kind of device creating interface element, structural representation such as Fig. 5 institutes of the device
Show, including:
Receiving module 10, for receiving the business data packet from server, wherein business data packet includes:Configuration text
Part and the service logic data being arranged by the first scheduled instruction, moreover, the primary language of the first scheduled instruction and scheduled application
It is different;The corresponding primary interface element of configuration file is packaged by resolver generation module 101 for passing through scheduled application,
Generate predetermined resolver;Parsing module 20 is coupled with receiving module 10, for by the primary language component of scheduled application
Predetermined resolver parses configuration file, and the configuration parameter that parsing obtains is stored in default memory space;Processing
Module 30 is coupled with parsing module 20, for by the first scheduled instruction component of scheduled application by service logic data according to
Primary language carries out logical transition, and by transformed service logic data and the corresponding function of transformed service logic data
Index functions are sent to primary language component by scheduled transmission channel;Calling module 40 is coupled with processing module 30, for leading to
It crosses primary language component and passes sequentially through power function index calling work(according to the corresponding flow of service logic data after conversion
It can function;Creation module 50 is coupled with calling module 40, for being based on reflection build mechanism according to work(by primary language component
It can function and configuration parameter establishment interface element.
The embodiment of the present invention in order to allow the interface element of scheduled application median surface to be changed automatically, therefore in server side
One business data packet can be set, and the business data packet is sent to scheduled application.When specific implementation, which is
Need dynamic to issue, therefore comprising data in should be the data write containing the language that can dynamically issue.Due to
Configuration file is usually all write using XML, is not have dynamic to issue ability, therefore, in setting, needs first pre-
Attribute speech is the language that can dynamically issue, such as can be JavaScript.
After receiving module 10 receives the business data packet, so that it may to utilize the service logic number in the business data packet
According to configuration file.
And the predetermined resolver in primary language component, be by scheduled application by primary interface element encapsulate to mobilism
It updates adaptation and generates.After receiving business data packet, parsing module 20 can pass through the resolver logarithm
According to parse, and then obtain the configuration parameter of interface element.It is not that use at once obtains after getting the configuration parameter
All parameters got, but these parameters are placed into a container, that is, it is stored in default memory space, this is preset and deposits
Storing up space can be used as a class object example to exist when program is arranged.
The configuration parameter parsed is typically that can build all information of interface element, for example, at least include title,
Attribute set, child node, father node, default unique ID, system identifier etc..Developer be arranged program when, usually can also with
It includes the power function index that can generate interface element to set file, more easily to create interface element.
Since service logic data are write by the first scheduled instruction, identify the industry in primary language component
Be engaged in logical data when and None- identified, therefore, the first scheduled instruction component can be handled after receiving business data packet
Service logic data can be carried out logical transition by module 30 by the first scheduled instruction component according to primary language, so as to will
Service logic after corresponding conversion informs primary language component so that primary language component can also identify after the conversion
Service logic data.
After service logic data carry out logical transition, primary language component can then identify that the transformed business is patrolled
Volume, and then calling module 40 can call corresponding power function according to the logic so that creation module 50 creates boundary to realize
The function of surface element.When specific implementation, the power function that each flow is related to logically calls, and calls the work(
When energy function, corresponding configuration parameter can be obtained according to the corresponding function of power function, and then according to reflection build mechanism one
Required interface element is created according to configuration parameter step by step.The process of above-mentioned establishment interface element can be to having Interface Element
Element is updated and creates interface element, can also be to there is no interface element carry out establishment process.
In embodiments of the present invention, the predetermined resolver pair that scheduled application is generated by the encapsulated primary interface element
It is parsed from the service logic data of server dynamic access, and combines the configuration file from server dynamic access, realized
Create interface element by reflecting build mechanism, meanwhile, also achieve the primary interface element in conjunction with scheduled application complete it is pre-
Surely the interface update applied, and the experience effect with native system is allowed users to, and so that scheduled application is in dynamic
The selection type of interface element is some more when changing update.Wherein, the first scheduled instruction is the language different from primary language,
It can dynamically be issued, thus scheduled application can receive at any time include service logic data and configuration file business number
According to packet, and then the predetermined resolver that can be generated at any time in conjunction with the encapsulated primary interface element, it realizes and uses business datum
Service logic data and configuration parameter in packet to create interface element by reflecting build mechanism.
In addition, the present embodiment can receive business data packet at any time, and generated in conjunction with the encapsulated primary interface element
Predetermined resolver realize it is dynamic create interface element, the APP for needing not wait for publication new version can change Interface Element
Element, better user experience are also relatively suitble to business promotion.
Sixth embodiment of the invention provides a kind of device creating interface element, structural representation such as Fig. 6 institutes of the device
Show, including:
Receiving module 10, for receiving the business data packet from server, wherein business data packet includes:Configuration text
Part and the service logic data being arranged by the first scheduled instruction, moreover, the primary language of the first scheduled instruction and scheduled application
It is different;The corresponding primary interface element of configuration file is packaged by resolver generation module 101 for passing through scheduled application,
Generate predetermined resolver;Parsing module 20 is coupled with receiving module 10, for by the primary language component of scheduled application
Predetermined resolver parses configuration file, and the configuration parameter that parsing obtains is stored in default memory space;Processing
Module 30 is coupled with parsing module 20, for by the first scheduled instruction component of scheduled application by service logic data according to
Primary language carries out logical transition, and by transformed service logic data and the corresponding function of transformed service logic data
Index functions are sent to primary language component by scheduled transmission channel;Calling module 40 is coupled with processing module 30, for leading to
It crosses primary language component and passes sequentially through power function index calling function according to the corresponding flow of transformed service logic data
Function;Creation module 50 is coupled with calling module 40, for being based on reflection build mechanism according to function by primary language component
Function and configuration parameter create interface element;Wherein, creation module 50 includes:Construction unit 501, for passing through primary group of languages
Part obtains the interface element title in configuration parameter, and initial interface element is built according to reflection build mechanism;First setting unit
502, it is coupled with construction unit 501, for being assigned a value of matching by the interface element ID of initial interface element by primary language component
Set default unique ID in parameter;Second setting unit 503 is coupled with the first setting unit 502, for passing through primary group of languages
Part is the initial interface element setting interface element parameter after interface element ID assignment according to the parameter in configuration parameter successively, with
Create interface element.
The embodiment of the present invention in order to allow the interface element of scheduled application median surface to be changed automatically, therefore in server side
One business data packet can be set, and the business data packet is sent to scheduled application.When specific implementation, which is
Need dynamic to issue, therefore comprising data in should be the data write containing the language that can dynamically issue.Due to
Configuration file is usually all write using XML, is not have dynamic to issue ability, therefore, in setting, needs first pre-
Attribute speech is the language that can dynamically issue, such as can be JavaScript.
After receiving module 10 receives the business data packet, so that it may to utilize the service logic number in the business data packet
According to configuration file.
And the predetermined resolver in primary language component, be by scheduled application by primary interface element encapsulate to mobilism
It updates adaptation and generates.After receiving business data packet, parsing module 20 can pass through the resolver logarithm
According to parse, and then obtain the configuration parameter of interface element.It is not that use at once obtains after getting the configuration parameter
All parameters got, but these parameters are placed into a container, that is, it is stored in default memory space, this is preset and deposits
Storing up space can be used as a class object example to exist when program is arranged.
The configuration parameter parsed is typically that can build all information of interface element, for example, at least include title,
Attribute set, child node, father node, default unique ID, system identifier etc..Developer be arranged program when, usually can also with
It includes the power function index that can generate interface element to set file, more easily to create interface element.
Since service logic data are write by the first scheduled instruction, identify the industry in primary language component
Be engaged in logical data when and None- identified, therefore, the first scheduled instruction component can be handled after receiving business data packet
Service logic data can be carried out logical transition by module 30 by the first scheduled instruction component according to primary language, so as to will
Service logic after corresponding conversion informs primary language component so that primary language component can also identify after the conversion
Service logic data.
After service logic data carry out logical transition, primary language component can then identify that the transformed business is patrolled
Volume, and then calling module 40 can call corresponding power function according to the logic so that creation module 50 creates boundary to realize
The function of surface element.When specific implementation, the power function that each flow is related to logically calls, and calls the work(
When energy function, corresponding configuration parameter can be obtained according to the corresponding function of power function, and then according to reflection build mechanism one
Required interface element is created according to configuration parameter step by step.The process of above-mentioned establishment interface element can be to having Interface Element
Element is updated and creates interface element, can also be to there is no interface element carry out establishment process.
In embodiments of the present invention, the predetermined resolver pair that scheduled application is generated by the encapsulated primary interface element
It is parsed from the service logic data of server dynamic access, and combines the configuration file from server dynamic access, realized
Create interface element by reflecting build mechanism, meanwhile, also achieve the primary interface element in conjunction with scheduled application complete it is pre-
Surely the interface update applied, and the experience effect with native system is allowed users to, and so that scheduled application is in dynamic
The selection type of interface element is some more when changing update.Wherein, the first scheduled instruction is the language different from primary language,
It can dynamically be issued, thus scheduled application can receive at any time include service logic data and configuration file business number
According to packet, and then the predetermined resolver that can be generated at any time in conjunction with the encapsulated primary interface element, it realizes and uses business datum
Service logic data and configuration parameter in packet to create interface element by reflecting build mechanism.
In addition, the present embodiment can receive business data packet at any time, and generated in conjunction with the encapsulated primary interface element
Predetermined resolver realize it is dynamic create interface element, the APP for needing not wait for publication new version can change Interface Element
Element, better user experience are also relatively suitble to business promotion.
Seventh embodiment of the invention provides a kind of device creating interface element, structural representation such as Fig. 7 institutes of the device
Show, including:
Receiving module 10, for receiving the business data packet from server, wherein business data packet includes:Configuration text
Part and the service logic data being arranged by the first scheduled instruction, moreover, the primary language of the first scheduled instruction and scheduled application
It is different;The corresponding primary interface element of configuration file is packaged by resolver generation module 101 for passing through scheduled application,
Generate predetermined resolver;Parsing module 20 is coupled with receiving module 10, for by the primary language component of scheduled application
Predetermined resolver parses configuration file, and the configuration parameter that parsing obtains is stored in default memory space;Processing
Module 30 is coupled with parsing module 20, for by the first scheduled instruction component of scheduled application by service logic data according to
Primary language carries out logical transition, and by transformed service logic data and its corresponding power function rope of service logic data
Draw and primary language component is sent to by scheduled transmission channel;Calling module 40 is coupled with processing module 30, for by primary
Language component passes sequentially through power function according to the corresponding flow of service logic data and indexes invoking performance function;Determining module
60, it is coupled with calling module 40, default unique ID for obtaining the interface element in configuration parameter by primary language component,
And the system identifier of interface element is determined according to default unique ID;Detection module 70 is coupled with determining module 60, for by primary
Language component detecting system ID whether there is the interface element created;Creation module 50 is coupled with detection module 70, is used for
In the case that the interface element created is not present in system identifier, reflection build mechanism is based on according to function by primary language component
Function and configuration parameter create interface element;Be additionally operable to system identifier exist created interface element in the case of, according to
It sets parameter and changes the corresponding interface element parameter of interface element created, to update the interface element created.
The embodiment of the present invention in order to allow the interface element of scheduled application median surface to be changed automatically, therefore in server side
One business data packet can be set, and the business data packet is sent to scheduled application.When specific implementation, which is
Need dynamic to issue, therefore comprising data in should be the data write containing the language that can dynamically issue.Due to
Configuration file is usually all write using XML, is not have dynamic to issue ability, therefore, in setting, needs first pre-
Attribute speech is the language that can dynamically issue, such as can be JavaScript.
After receiving module 10 receives the business data packet, so that it may to utilize the service logic number in the business data packet
According to configuration file.
And the predetermined resolver in primary language component, be by scheduled application by primary interface element encapsulate to mobilism
It updates adaptation and generates.After receiving business data packet, parsing module 20 can pass through the resolver logarithm
According to parse, and then obtain the configuration parameter of interface element.It is not that use at once obtains after getting the configuration parameter
All parameters got, but these parameters are placed into a container, that is, it is stored in default memory space, this is preset and deposits
Storing up space can be used as a class object example to exist when program is arranged.
The configuration parameter parsed is typically that can build all information of interface element, for example, at least include title,
Attribute set, child node, father node, default unique ID, system identifier etc..Developer be arranged program when, usually can also with
It includes the power function index that can generate interface element to set file, more easily to create interface element.
Since service logic data are write by the first scheduled instruction, identify the industry in primary language component
Be engaged in logical data when and None- identified, therefore, the first scheduled instruction component can be handled after receiving business data packet
Service logic data can be carried out logical transition by module 30 by the first scheduled instruction component according to primary language, so as to will
Service logic after conversion informs primary language component so that primary language component can also identify the service logic data.
After service logic data carry out logical transition, primary language component can then identify that the business after the conversion is patrolled
Volume, and then calling module 40 can call corresponding power function according to the logic so that creation module 50 creates boundary to realize
The function of surface element.When specific implementation, the power function that each flow is related to logically calls, and calls the work(
When energy function, corresponding configuration parameter can be obtained according to the corresponding function of power function, and then according to reflection build mechanism one
Required interface element is created according to configuration parameter step by step.The process of above-mentioned establishment interface element can be to having Interface Element
Element is updated and creates interface element, can also be to there is no interface element carry out establishment process.
In embodiments of the present invention, the predetermined resolver pair that scheduled application is generated by the encapsulated primary interface element
It is parsed from the service logic data of server dynamic access, and combines the configuration file from server dynamic access, realized
Create interface element by reflecting build mechanism, meanwhile, also achieve the primary interface element in conjunction with scheduled application complete it is pre-
Surely the interface update applied, and the experience effect with native system is allowed users to, and so that scheduled application is in dynamic
The selection type of interface element is some more when changing update.Wherein, the first scheduled instruction is the language different from primary language,
It can dynamically be issued, thus scheduled application can receive at any time include service logic data and configuration file business number
According to packet, and then the predetermined resolver that can be generated at any time in conjunction with the encapsulated primary interface element, it realizes and uses business datum
Service logic data and configuration parameter in packet to create interface element by reflecting build mechanism.
In addition, the present embodiment can receive business data packet at any time, and generated in conjunction with the encapsulated primary interface element
Predetermined resolver realize it is dynamic create interface element, the APP for needing not wait for publication new version can change Interface Element
Element, better user experience are also relatively suitble to business promotion.
Eighth embodiment of the invention provides a kind of device creating interface element, structural representation such as Fig. 8 institutes of the device
Show, including:
Receiving module 10, for receiving the business data packet from server, wherein business data packet includes:Configuration text
Part and the service logic data being arranged by the first scheduled instruction, moreover, the primary language of the first scheduled instruction and scheduled application
It is different;The corresponding primary interface element of configuration file is packaged by resolver generation module 101 for passing through scheduled application,
Generate predetermined resolver;Parsing module 20 is coupled with receiving module 10, for by the primary language component of scheduled application
Predetermined resolver parses configuration file, and the configuration parameter that parsing obtains is stored in default memory space;Processing
Module 30 is coupled with parsing module 20, for by the first scheduled instruction component of scheduled application by service logic data according to
Primary language carries out logical transition, and by transformed service logic data and its corresponding power function rope of service logic data
Draw and primary language component is sent to by scheduled transmission channel;Calling module 40 is coupled with processing module 30, for by primary
Language component passes sequentially through power function according to the corresponding flow of service logic data and indexes invoking performance function;Creation module
50, it couples with calling module 40, joins according to power function and configuration for being based on reflection build mechanism by primary language component
Number creates interface element;Add module 80 is coupled with creation module 50, the interface for will be created by primary language component
Element is added in the corresponding father node interface element of interface element, Interface Element to be presented in the predetermined interface of scheduled application
Element.
The embodiment of the present invention in order to allow the interface element of scheduled application median surface to be changed automatically, therefore in server side
One business data packet can be set, and the business data packet is sent to scheduled application.When specific implementation, which is
Need dynamic to issue, therefore comprising data in should be the data write containing the language that can dynamically issue.Due to
Configuration file is usually all write using XML, is not have dynamic to issue ability, therefore, in setting, needs first pre-
Attribute speech is the language that can dynamically issue, such as can be JavaScript.
After receiving module 10 receives the business data packet, so that it may to utilize the service logic number in the business data packet
According to configuration file.
And the predetermined resolver in primary language component, be by scheduled application by primary interface element encapsulate to mobilism
It updates adaptation and generates.After receiving business data packet, parsing module 20 can pass through the resolver logarithm
According to parse, and then obtain the configuration parameter of interface element.It is not that use at once obtains after getting the configuration parameter
All parameters got, but these parameters are placed into a container, that is, it is stored in default memory space, this is preset and deposits
Storing up space can be used as a class object example to exist when program is arranged.
The configuration parameter parsed is typically that can build all information of interface element, for example, at least include title,
Attribute set, child node, father node, default unique ID, system identifier etc..Developer be arranged program when, usually can also with
It includes the power function index that can generate interface element to set file, more easily to create interface element.
Since service logic data are write by the first scheduled instruction, identify the industry in primary language component
Be engaged in logical data when and None- identified, therefore, the first scheduled instruction component can be handled after receiving business data packet
Service logic data can be carried out logical transition by module 30 by the first scheduled instruction component according to primary language, so as to will
Service logic after corresponding conversion informs primary language component so that primary language component can also identify after the conversion
Service logic data.
After service logic data carry out logical transition, primary language component can then identify the service logic, and then adjust
Corresponding power function can be called with module 40 according to the logic so that creation module 50 creates the work(of interface element to realize
Energy.When specific implementation, the power function that each flow is related to logically calls, when calling the power function,
Corresponding configuration parameter can be obtained according to the corresponding function of power function, and then basis is matched step by step according to reflection build mechanism
It sets parameter and creates required interface element.The process of above-mentioned establishment interface element can be updated to having interface element
And create interface element, can also be to there is no interface element carry out establishment process.
In embodiments of the present invention, the predetermined resolver pair that scheduled application is generated by the encapsulated primary interface element
It is parsed from the service logic data of server dynamic access, and combines the configuration file from server dynamic access, realized
Create interface element by reflecting build mechanism, meanwhile, also achieve the primary interface element in conjunction with scheduled application complete it is pre-
Surely the interface update applied, and the experience effect with native system is allowed users to, and so that scheduled application is in dynamic
The selection type of interface element is some more when changing update.Wherein, the first scheduled instruction is the language different from primary language,
It can dynamically be issued, thus scheduled application can receive at any time include service logic data and configuration file business number
According to packet, and then the predetermined resolver that can be generated at any time in conjunction with the encapsulated primary interface element, it realizes and uses business datum
Service logic data and configuration parameter in packet to create interface element by reflecting build mechanism.
In addition, the present embodiment can receive business data packet at any time, and generated in conjunction with the encapsulated primary interface element
Predetermined resolver realize it is dynamic create interface element, the APP for needing not wait for publication new version can change Interface Element
Element, better user experience are also relatively suitble to business promotion.
Ninth embodiment of the invention provides a kind of storage medium, is stored with computer program, and computer program is handled
Device realizes that following steps, those skilled in the art can write corresponding program code according to following steps when executing.
S11, scheduled application receive the business data packet from server, wherein business data packet includes:Configuration file and
The service logic data being arranged by the first scheduled instruction, moreover, the first scheduled instruction is different from the primary language of scheduled application;
The primary language component of S13, scheduled application parse configuration file by predetermined resolver, and will parse
To configuration parameter be stored in default memory space;
Service logic data are carried out logical transition by the first scheduled instruction component of S14, scheduled application according to primary language,
And transformed service logic data and the corresponding power function index of transformed service logic data are passed through into scheduled transmission
Channel is sent to primary language component;
S15, primary language component pass sequentially through power function rope according to the corresponding flow of transformed service logic data
Draw invoking performance function;
S16 creates interface element based on reflection build mechanism according to power function and configuration parameter.
The embodiment of the present invention in order to allow the interface element of scheduled application median surface to be changed automatically, therefore in server side
One business data packet can be set, and the business data packet is sent to scheduled application.When specific implementation, which is
It needs to be issued by server dynamic, and predetermined mobilism more new frame can receive the business data packet dynamically issued, because
This comprising data in should be the data write containing the language that can dynamically issue.Since configuration file is usually all
It is write using XML, is not have dynamic to issue ability, therefore, in setting, needing the first scheduled instruction to be can dynamic
The language issued, such as can be JavaScript.
After scheduled application receives the business data packet, so that it may to utilize the service logic data in the business data packet
With configuration file.
And the predetermined resolver in primary language component, be by scheduled application by primary interface element encapsulate to mobilism
It updates adaptation and generates.After receiving business data packet, so that it may to the data parse, and then obtain
The configuration parameter of interface element.It is not all parameters that use is got at once after getting the configuration parameter, but will
These parameters are placed into a container, that is, are stored in default memory space, which can when program is arranged
To exist as a class object example.
The configuration parameter parsed is typically that can build all information of interface element, for example, at least include title,
Attribute set, child node, father node, default unique ID, system identifier etc..Developer be arranged program when, usually can also with
It includes the power function index that can generate interface element to set file, more easily to create interface element.
Since service logic data are write by the first scheduled instruction, identify the industry in primary language component
Be engaged in logical data when and None- identified, therefore, the first scheduled instruction component can be after receiving business data packet, by industry
Logical data be engaged according to primary language progress logical transition, so as to corresponding service logic is informed into primary language component,
So that primary language component can also identify the service logic data after the conversion.
After service logic data carry out logical transition, primary language component can then identify that the business after the conversion is patrolled
Volume, and then corresponding power function can be called according to the logic to realize the function of creating interface element, when specific implementation, often
The power function that one flow is related to all logically calls, can be according to power function when calling the power function
Corresponding function obtains corresponding configuration parameter, and then according to reflection build mechanism step by step according to required for configuration parameter establishment
Interface element.The process of above-mentioned establishment interface element can be updated to existing interface element and create interface element,
Can also be to there is no interface element carry out establishment process.
Computer program is being executed by processor based on reflection build mechanism according to power function and configuration parameter establishment circle
When the step of surface element, it is implemented as follows step:Primary language component obtains the interface element title in configuration parameter, according to
It reflects build mechanism and builds initial interface element;The interface element ID of initial interface element is assigned a value of configuring by primary language component
Default unique ID in parameter;Primary language component is successively first after interface element ID assignment according to the parameter in configuration parameter
Interface element parameter is arranged in beginning interface element, to create interface element.
Computer program leads to according to the corresponding flow of service logic data successively being executed by processor primary language component
After the step of crossing power function index invoking performance function, it is also executed by processor following steps:Primary language component obtains
Default unique ID of the interface element in parameter is configured, and determines the system identifier of interface element according to default unique ID;Primary language
Speech component detection system identifier whether there is the interface element created;The case where the interface element created is not present in system identifier
Under, primary language component is based on reflection build mechanism and creates interface element according to power function and configuration parameter.
Computer program is being executed by processor primary language component detecting system ID with the presence or absence of the Interface Element created
After the step of element, it is also executed by processor following steps:In the case where there is the interface element created in system identifier, according to
Configuration parameter changes the corresponding interface element parameter of interface element created, to update the interface element created.
Computer program is being executed by processor based on reflection build mechanism according to power function and configuration parameter establishment circle
After the step of surface element, it is also executed by processor following steps:The interface element created is added to by primary language component
In the corresponding father node interface element of interface element, interface element to be presented in the predetermined interface of scheduled application.
With reference to involved in a programming process to specific example the above process is illustrated, but not to above-mentioned
Embodiment, which is constituted, to be limited.
Prior art realization is one to the update of content in Activity (interface element) without application version update
A problem, and if realizing that the dynamic increase of Activity can be relatively difficult using primary exploitation, therefore, using DU frames
Dynamic control when increase Activity to the element at its interface is carried out, is present embodiments provided a kind of similar
The primary middle technologies for XML configurations being mapped to interface View of Android, are implemented as follows.
The embodiment of the present invention uses DU frames, and DU frames are the similar hot more new frames with React-Native,
React-Native is that all exploitations have been placed in JS (abbreviation of JavaScript).DU frames are also similar design,
Fig. 9 is the schematic diagram that the sides Native are interacted with the sides JS in DU frames.According to Fig.9, DU frames are by one group of agreement
It realizes the communication of JS and Native, is controlled by JS (being equivalent to the first above-mentioned scheduled instruction component) to reach
The component interaction of Native (being equivalent to above-mentioned primary language component).Wherein, which includes:Protocol agreements, moreover,
JS is used only to do logic control, and the still Native that shows for being related to View (i.e. interface element) is being done.Considering View's
During realization, the embodiment of the present invention first by interface layout write-in XML (being equivalent to above-mentioned configuration file), then exists
XML file (being equivalent to above-mentioned configuration file) path is carried out in Activity in onCreate methods (power function) to set
Set, then in onCreate methods to XML file content carry out parsing production view View be then added to Activity with
It is laid out in View.Equally we realize the production and addition of View using similar method, but during realization, because
The difference of DU frames and primary essence.The present embodiment is converted into the solution of View being related to a whole set of custom profile
There is many and primary difference.
(1) load of topology file XML.
In the primary development processes of Android, we only need office's XML file under res/layout catalogues in R files
The id generated is transmitted to as parameter in onCreate methods.But in DU frames, XML file under asset catalogues not
It can quickly be searched in such a way that R files are using id as index.So the present embodiment transmits when starting primary Activity
Be the XML file being buffered in after server dynamic under asset catalogues path address, notice will start this Activity pairs
The path for the Activity.JS files answered passes to primary Activity, there is interface and business logic processing in this way
Activity just calculate with it is primary identical.
(2) XML file maps out View.
The process that XML file maps out View is also the primary designs of imitative Android.It designs through this embodiment
The parseLayoutXML methods (changing the corresponding function of program) of LayoutParser classes (one section of program) are by the XML of transmission
File where file path is found, and using through predetermined resolver Proxy obtained from being packaged primary interface element
XML file is parsed, to parse the View in each XML file.Wherein, the corresponding predetermined resolver Proxy and XML file
ID having the same.Moreover, during parsing, the content in entire XML file can be generated one
TemplateViewVo class objects example (being equivalent to default memory space) stores the configuration parameter in XML file.Next,
All View node traverses in the TemplateViewVo class object examples generated in XML file are gone out by recursive mode
Come, convenient operation of the service logic to interface element later.
Wherein, which is the newer scheduled application of carry out mobilism by by primary interface element
It is packaged generation.
Figure 10 is the relation schematic diagram of predetermined resolver, primary interface element and XML file.As shown in Figure 10, make a reservation for answer
With by being packaged to primary interface element, to be adapted to DU frames, to generate corresponding predetermined resolver Proxy, and it is somebody's turn to do
Proxy pairs of predetermined resolver is parsed with XML files of the predetermined resolver Proxy with identical ID, corresponding to obtain
VIEW。
All it is that the phase of View seeds is found according to the id generated in R files to the operation of View in the primary exploitations of Android
View with id nodes is operated.The present embodiment also has similar id convenient in order to view when Design view operates
Operation.When the predetermined resolver Proxy resolvers of previous step often parse a node, it will be opened from 0x30000000
Begin to construct a ViewId attribute being assigned to from the id values increased in current TemplateViewVo class objects example.Thus
It can be mapped according to the TemplateViewVo class object examples of the id and all View of View and operate each View.
We are stored in TemplateViewVo class object examples and suffer the information of each View, so in next step
It is to construct all View.Gone out pair by the name attribute value reflective constructs stored in TemplateViewVo class object examples
Then the View answered gives the id assignment ViewId of View again.It in next step, will be in all TemplateViewVo class object examples
Attribute tags and the parsing of corresponding value, and be assigned to the corresponding each attributes of View.It is corresponding to create View for final step
Proxy classes (i.e. proxy class is one section of program, ultimately constructed View can be presented on interface), these proxy class and
The correspondence of View classes we in XML file it is stated that, so can also be according to TemplateViewVo classes pair
It is assigned to TemplateViewVo class object examples as the name attribute values reflection of example obtains corresponding Proxy classes instance objects
BaseProxy attributes, and it is bound with View is changed, reality can be inherited at Proxy layer according to the level that View is inherited
Attribute parsings and assignment all existing View.Whenever View construction finish we all can on the root View of add to the View,
The current root View initially transmitted is the contentView of Activity.The View of all statements of interface XML file entire in this way
Element is all just illustrated in Activity and suffers.
Finally, corresponding View is found according to ViewIdString (character string) for convenience, we will
ViewIdString is as key (key value), using corresponding TemplateViewVo class objects example as value (index value)
It is stored in the Map (set) of a current Activity example.
(3) all View elements of the ends JS operation Native productions.
The corresponding ID of View are not known when the ends JS are developed, so we can only be according to current Activity's
The corresponding ViewIdString of View do relationship map to try every possible means with primary View in XML file interface.The present embodiment can
With by Protocol agreements using current primary Activity cachings will be corresponding using ViewIdString as key
The data set Map that TemplateViewVo class objects example is stored as value therefrom obtains all letters of corresponding View
Breath, the parameter name and parameter list then passed over according to the ends JS carry out reflection calling to the method for View.
The present embodiment is converted into the implementation method of system view file using this custom profile in DU frames,
The performance of the application product of exploitation can be made, which to experience, to be had similar to primary effect, and can enable Android developer very
In the present project of fast access and skilled left-hand seat develops new demand.
When realization, above-mentioned storage medium can be arranged in the terminal, the whole as mobile terminal memory or portion
Divide and exist, those skilled in the art can be configured according to actual demand.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to:USB flash disk, read-only memory (ROM,
Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), mobile hard disk, magnetic disc or CD
Etc. the various media that can store program code.Optionally, in the present embodiment, processor is according to stored in storage medium
Program code executes the method and step of above-described embodiment record.Optionally, the specific example in the present embodiment can refer to above-mentioned
Example described in embodiment and optional embodiment, details are not described herein for the present embodiment.Obviously, those skilled in the art
It should be understood that each module of the above invention or each step can be realized with general computing device, they can be concentrated
It on single computing device, or is distributed on network constituted by multiple computing devices, optionally, they can use and calculate
Device executable program code is realized, is performed by computing device it is thus possible to be stored in storage device, and
And in some cases, can be with the steps shown or described are performed in an order that is different from the one herein, or they are made respectively
Be made each integrated circuit modules, or by them multiple modules or step be fabricated to single integrated circuit module come it is real
It is existing.In this way, the present invention is not limited to any specific hardware and softwares to combine.
Although being example purpose, the preferred embodiment of the present invention is had been disclosed for, those skilled in the art will recognize
Various improvement, increase and substitution are also possible, and therefore, the scope of the present invention should be not limited to the above embodiments.
Claims (12)
1. a kind of method creating interface element, which is characterized in that including:
Scheduled application receives the business data packet from server, wherein the business data packet includes:Configuration file and pass through
The service logic data of first scheduled instruction setting, moreover, the primary language of first scheduled instruction and the scheduled application
It is different;
The scheduled application generates predetermined resolver by the way that the corresponding primary interface element of the configuration file to be packaged;
The primary language component of the scheduled application parses the configuration file by the predetermined resolver, and will solution
Obtained configuration parameter is analysed to be stored in default memory space;
The service logic data are carried out logical transition by the first scheduled instruction component of the scheduled application according to primary language,
And transformed service logic data and the corresponding power function index of the transformed service logic data are passed through predetermined
Transmission channel is sent to the primary language component;
The primary language component passes sequentially through power function rope according to the corresponding flow of the transformed service logic data
Draw invoking performance function, and the Interface Element is created according to the power function and the configuration parameter based on reflection build mechanism
Element.
2. the method as described in claim 1, which is characterized in that based on reflection build mechanism according to the power function and described
It configures parameter and creates the interface element, including:
The primary language component obtains the interface element title in the configuration parameter, initial according to reflection build mechanism structure
Interface element;
The interface element ID of the initial interface element is assigned a value of default in the configuration parameter by the primary language component
Unique ID;
The primary language component is successively described initial after interface element ID assignment according to the parameter in the configuration parameter
Interface element parameter is arranged in interface element, to create the interface element.
3. the method as described in claim 1, which is characterized in that the primary language component is patrolled according to the transformed business
After volume corresponding flow of data passes sequentially through power function index invoking performance function, further include:
The primary language component obtains default unique ID of the interface element in the configuration parameter, and according to described pre-
If unique ID determines the system identifier of the interface element;
The primary language component detects the system identifier and whether there is the interface element created;
In the case where the interface element created is not present in the system identifier, the primary language component is based on reflection structure machine
System creates the interface element according to the power function and the configuration parameter.
4. method as claimed in claim 3, which is characterized in that the primary language component detects the system identifier and whether there is
After the interface element created, further include:
In the case of the interface element created described in the system identifier exists, created according to described in configuration parameter modification
The corresponding interface element parameter of interface element built, to update the interface element created.
5. method according to any one of claims 1 to 4, which is characterized in that based on reflection build mechanism according to the work(
After energy function and the configuration parameter create the interface element, further include:
The interface element created is added to the corresponding father node interface of the interface element by the primary language component
In element, the interface element to be presented in the predetermined interface of the scheduled application.
6. a kind of device creating interface element, which is characterized in that including:
Receiving module, for receiving the business data packet from server, wherein the business data packet includes:Configuration file
And the service logic data being arranged by the first scheduled instruction, moreover, the original of first scheduled instruction and the scheduled application
Raw language is different;
Resolver generation module, for being sealed the corresponding primary interface element of the configuration file by the scheduled application
Dress generates predetermined resolver;
Parsing module, for literary to the configuration by the predetermined resolver in the primary language component of the scheduled application
Part is parsed, and the configuration parameter that parsing obtains is stored in default memory space;
Processing module, for the first scheduled instruction component by the scheduled application by the service logic data according to primary
Language carries out logical transition, and by transformed service logic data and the corresponding function of the transformed service logic data
Index functions are sent to the primary language component by scheduled transmission channel;
Calling module, for by the primary language component according to the corresponding flow of the transformed service logic data according to
It is secondary that invoking performance function is indexed by power function;
Creation module, for being based on reflection build mechanism according to the power function by the primary language component and described matching
It sets parameter and creates the interface element.
7. device as claimed in claim 6, which is characterized in that the creation module includes:
Construction unit, for obtaining the interface element title in the configuration parameter by the primary language component, according to anti-
Penetrate build mechanism structure initial interface element;
First setting unit, for being assigned a value of the interface element ID of the initial interface element by the primary language component
Default unique ID in the configuration parameter;
Second setting unit, for being successively Interface Element according to the parameter in the configuration parameter by the primary language component
Interface element parameter is arranged in the initial interface element after plain ID assignment, to create the interface element.
8. device as claimed in claim 6, which is characterized in that further include:
Determining module, for by the primary language component obtain it is described configuration parameter in the interface element it is default only
One ID, and according to the system identifier preset unique ID and determine the interface element;
Detection module whether there is the interface element created for detecting the system identifier by the primary language component;
The creation module is additionally operable to, in the case where the interface element created is not present in the system identifier, pass through the original
Raw language component is based on reflection build mechanism and creates the interface element according to the power function and the configuration parameter.
9. device as claimed in claim 8, which is characterized in that
The creation module, in the case of being additionally operable to the interface element created described in the system identifier exists, according to described
The corresponding interface element parameter of interface element created described in configuration parameter modification, to update the interface created
Element.
10. the device as described in any one of claim 6 to 9, which is characterized in that further include:
Add module, for the interface element created to be added to the interface element by the primary language component
In corresponding father node interface element, the interface element to be presented in the predetermined interface of the scheduled application.
11. a kind of storage medium, is stored with computer program, which is characterized in that when the computer program is executed by processor
The step of realizing the method for any one of claim 1 to 5 establishment interface element.
12. a kind of mobile terminal includes at least memory, processor, computer program, feature is stored on the memory
It is, the processor realizes any one of claim 1 to 5 wound in the computer program on executing the memory
The step of building the method for interface element.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810504133.0A CN108804100B (en) | 2018-05-23 | 2018-05-23 | Method and device for creating interface element, storage medium and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810504133.0A CN108804100B (en) | 2018-05-23 | 2018-05-23 | Method and device for creating interface element, storage medium and mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108804100A true CN108804100A (en) | 2018-11-13 |
CN108804100B CN108804100B (en) | 2022-11-04 |
Family
ID=64091537
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810504133.0A Active CN108804100B (en) | 2018-05-23 | 2018-05-23 | Method and device for creating interface element, storage medium and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108804100B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109783559A (en) * | 2018-12-30 | 2019-05-21 | 贝壳技术有限公司 | Acquisition methods, device, electronic equipment and the storage medium of house prosperity transaction data |
CN110389754A (en) * | 2019-06-18 | 2019-10-29 | 北京奇艺世纪科技有限公司 | Method for processing business, system, server, terminal, electronic equipment and storage medium |
CN112527422A (en) * | 2019-09-17 | 2021-03-19 | 腾讯科技(深圳)有限公司 | View updating method, device, equipment and storage medium |
CN113986380A (en) * | 2021-10-27 | 2022-01-28 | 北京百度网讯科技有限公司 | Data processing method, device and system, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105354014A (en) * | 2014-08-18 | 2016-02-24 | 阿里巴巴集团控股有限公司 | Application interface rendering display method and apparatus |
CN106686200A (en) * | 2015-11-09 | 2017-05-17 | 五八同城信息技术有限公司 | Mobile application program updating method, mobile terminal and updating system |
CN107391169A (en) * | 2017-06-09 | 2017-11-24 | 口碑控股有限公司 | The dynamic updating method and device of the Android page |
-
2018
- 2018-05-23 CN CN201810504133.0A patent/CN108804100B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105354014A (en) * | 2014-08-18 | 2016-02-24 | 阿里巴巴集团控股有限公司 | Application interface rendering display method and apparatus |
CN106686200A (en) * | 2015-11-09 | 2017-05-17 | 五八同城信息技术有限公司 | Mobile application program updating method, mobile terminal and updating system |
CN107391169A (en) * | 2017-06-09 | 2017-11-24 | 口碑控股有限公司 | The dynamic updating method and device of the Android page |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109783559A (en) * | 2018-12-30 | 2019-05-21 | 贝壳技术有限公司 | Acquisition methods, device, electronic equipment and the storage medium of house prosperity transaction data |
CN110389754A (en) * | 2019-06-18 | 2019-10-29 | 北京奇艺世纪科技有限公司 | Method for processing business, system, server, terminal, electronic equipment and storage medium |
CN110389754B (en) * | 2019-06-18 | 2023-12-15 | 北京奇艺世纪科技有限公司 | Service processing method, system, server, terminal, electronic equipment and storage medium |
CN112527422A (en) * | 2019-09-17 | 2021-03-19 | 腾讯科技(深圳)有限公司 | View updating method, device, equipment and storage medium |
CN112527422B (en) * | 2019-09-17 | 2024-03-22 | 腾讯科技(深圳)有限公司 | View updating method, device, equipment and storage medium |
CN113986380A (en) * | 2021-10-27 | 2022-01-28 | 北京百度网讯科技有限公司 | Data processing method, device and system, electronic equipment and storage medium |
CN113986380B (en) * | 2021-10-27 | 2024-02-06 | 北京百度网讯科技有限公司 | Data processing method, device and system, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108804100B (en) | 2022-11-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108762769B (en) | Microservice application arranging and deploying method and device and computer terminal | |
CN108279932B (en) | Method and device for dynamically configuring user interface of mobile terminal | |
CN108804100A (en) | Create method, apparatus, storage medium and the mobile terminal of interface element | |
US9619122B2 (en) | Method and apparatus for automatic device program generation | |
CN109065054A (en) | Speech recognition error correction method, device, electronic equipment and readable storage medium storing program for executing | |
CN109634598A (en) | A kind of page display method, device, equipment and storage medium | |
US8756407B2 (en) | Configuration rule prototyping tool | |
CN110704749B (en) | Recommendation engine customization system, recommendation method, recommendation system and electronic equipment | |
CN109754072B (en) | Processing method of network offline model, artificial intelligence processing device and related products | |
CN108279882B (en) | Framework generation method, device, equipment and computer readable medium | |
CN108415698A (en) | The method that control is added in the technical ability of voice dialogue platform | |
JPWO2017033441A1 (en) | System construction support system, method, and storage medium | |
US10999369B2 (en) | Network topology templates for internal states of management and control planes | |
JP2022505231A (en) | Systems and methods for autocomplete ICS flow with artificial intelligence / machine learning | |
CN116436936B (en) | Data storage system, method, storage medium and electronic equipment | |
CN110347454A (en) | Application program theme setting method, terminal equipment control method and device, terminal device and computer readable storage medium | |
CN108536447B (en) | Operation and maintenance management method | |
US20230019933A1 (en) | User interface controls for visual software modification | |
CN116028062A (en) | Target code generation method, NPU instruction display method and device | |
CN110362317A (en) | A kind of code conversion method, device and storage medium | |
CN108804088A (en) | Protocol processes method and apparatus | |
CN108804101A (en) | Create method, apparatus, storage medium and the mobile terminal of interface element | |
KR20150069987A (en) | Instant Web App composition system applied web app composition meta model | |
WO2022252040A1 (en) | Configuration data packet and file generating method, processing method, device, and medium | |
CN116595284B (en) | Webpage system operation method, device, equipment, storage medium and program |
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 |