CN109445783B - Method and device for constructing dynamic configuration application driven by service - Google Patents

Method and device for constructing dynamic configuration application driven by service Download PDF

Info

Publication number
CN109445783B
CN109445783B CN201811113791.3A CN201811113791A CN109445783B CN 109445783 B CN109445783 B CN 109445783B CN 201811113791 A CN201811113791 A CN 201811113791A CN 109445783 B CN109445783 B CN 109445783B
Authority
CN
China
Prior art keywords
interface
component
service
template
server
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.)
Active
Application number
CN201811113791.3A
Other languages
Chinese (zh)
Other versions
CN109445783A (en
Inventor
梁少勇
刘光辉
徐颖
陈锦彬
甘建峰
黄鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou China Dci Co ltd
Original Assignee
Guangzhou China Dci Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou China Dci Co ltd filed Critical Guangzhou China Dci Co ltd
Priority to CN201811113791.3A priority Critical patent/CN109445783B/en
Publication of CN109445783A publication Critical patent/CN109445783A/en
Application granted granted Critical
Publication of CN109445783B publication Critical patent/CN109445783B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a construction method of dynamic configuration application driven by service, which realizes the separation of interface rendering and business logic by dynamically adapting an application interface based on a preset general component library and an interface template, can adapt to the differentiated and personalized user requirements by utilizing the same business logic, greatly reduces the workload of later maintenance, and realizes the efficient development and rapid iteration of mobile application. The invention also discloses corresponding electronic equipment and a storage medium.

Description

Method and device for constructing dynamic configuration application driven by service
Technical Field
The present invention relates to the field of mobile application development, and in particular, to a method for constructing a service-driven dynamic configuration application, an electronic device, and a storage medium.
Background
The existing android development generally defines and describes an interface through an XML configuration file and corresponding data resources, solidifies the relationship between interface elements and service logic, causes any tiny adjustment of a user interface, needs developers to modify codes and reissue an application program package, and cannot achieve efficient development and rapid iteration of mobile application. The traditional land mobile application also adopts the development mode to realize the functions of approval, supply, patrol, supervision and the like of land resources. However, due to the difference of policies and management methods existing in different provinces and cities, different display requirements can be provided for applications with the same core service, and the existing development methods cannot meet the requirements of regionalized and personalized users, and have the following problems:
(1) the reusability of service logic is poor, and for personalized user requirements, the code is modified by developers, so that the rapid iteration of application cannot be realized, and the development, operation and maintenance cost is increased;
(2) when the application is updated and upgraded, the APK needs to be packaged and released again, so that the development efficiency is influenced; moreover, when the user uses the system, the user needs to frequently download updates, so that the use experience is influenced;
(3) the relationship between the interface elements and the service logic is solidified, and the universality of the system is reduced.
Disclosure of Invention
In order to overcome the defects of the prior art, one of the purposes of the invention is to provide a construction method of dynamic configuration application driven by service, which can realize the separation of interface elements and business logic, shorten the development period, quickly respond to the requirement change, and solve the problems of poor code reusability, large post-maintenance workload and the like in mobile development.
The second purpose of the present invention is to provide an electronic device, which can realize the separation of interface elements and business logic, shorten the development period, quickly respond to the change of demand, and solve the problems of poor code reusability, large workload of post-maintenance, etc. existing in mobile development.
The invention also aims to provide a computer readable storage medium, which can realize the separation of interface elements and business logic, shorten the development period, quickly respond to the requirement change and solve the problems of poor code reusability, large later maintenance workload and the like in mobile development.
One of the purposes of the invention is realized by adopting the following technical scheme:
the construction method of the dynamic configuration application driven by the service comprises the following steps:
a requirement acquisition step: obtaining the integral interface structure of the application according to the service requirement;
a template generation step: acquiring an interface component from the general component library, and generating an interface template according to the service requirement and the interface component;
an instantiation step: sending the interface template and the integral interface structure to the server, and further enabling the server to generate an interface instance according to the interface template and the integral interface structure;
a request step: a page display request is sent to the server, and a corresponding interface instance returned by the server is received;
a rendering step: and obtaining one or more interface components from the interface example, identifying each interface component according to the general component library, and rendering in real time according to each interface component to obtain a corresponding user interface.
Further, the specific process of generating the interface template according to the service requirement and the interface component includes: firstly, interface layout is configured according to business requirements, and then corresponding data and events are bound for each interface component in the interface layout.
Further, the step of generating, by the server, the interface instance according to the interface template and the overall interface structure specifically includes: and generating one or more interface instances according to the whole interface structure and the interface template, and configuring corresponding basic data and jump logic between the interface instances for each interface instance.
Further, the jumping step: when a user clicks an event bound by the interface component, the interface instance to be jumped is obtained according to the jump logic between the interface instances, and the sending step and the rendering step are sequentially executed to obtain the user interface to be jumped.
Further, the template generating step further comprises: judging whether the interface components in the general component library can meet the service requirements, if so, executing an instantiation step; if not, executing the component expansion step;
and (3) component extension step: and expanding the new interface component according to the business requirement, storing the new interface component in a general component library, and then executing an instantiation step.
Further, the base data is stored in a JSON format.
The second purpose of the invention is realized by adopting the following technical scheme:
an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of building a service-driven dynamically configurable application according to one of the objects of the invention when executing said program.
The third purpose of the invention is realized by adopting the following technical scheme:
a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of building a dynamically configured application driven by a service according to one of the objects of the invention.
Compared with the prior art, the invention has the beneficial effects that:
the invention dynamically adapts the mobile interface and the application based on the preset general component library and the interface template, carries out interface layout by a data configuration mode instead of a code compiling mode, has high response speed and low technical difficulty, utilizes the same set of business logic to meet the requirements of differentiated and personalized users, and greatly reduces the workload of later maintenance.
Drawings
FIG. 1 is a flow chart of a method for constructing a dynamically configurable application driven by a service according to the present invention;
fig. 2 is a schematic diagram of an interface jump process of a building system of a dynamic configuration application driven by a service according to the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
The core idea of the invention is to dynamically construct interface elements and response events thereof through an interface adapter, provide a new non-solidified application development mode, solve the problems of poor business logic reusability, large development and maintenance workload and the like in the traditional homeland mobile application, and be simultaneously suitable for other business management type applications without frequently updating a program framework.
The invention provides a construction method of dynamic configuration application driven by service, which specifically comprises the following steps as shown in figure 1:
step S1: and combing and organizing according to business requirements to obtain the integral interface structure of the application.
The concrete implementation process of the construction method provided by the invention is described by combining the business requirements of the homeland mobile law enforcement. For example, the service requirements are: the task list of the homeland mobile law enforcement needs to be used for displaying the law enforcement tasks to be transacted by the current user, including illegal information and illegal pictures, and after a certain task in the list is clicked, a task detail interface is skipped. It can therefore be known based on the above business requirements that it may involve two interface instances: a task list interface and a task detail interface; an interface jump process: and clicking a certain task in the task list to jump to the task details of the corresponding point. Through the method, the overall interface architecture of the application is firstly deduced according to the business requirements, namely, the application specifically comprises how many pages are needed.
Step S2: acquiring an interface component from the general component library, and judging whether the interface component can meet the service requirement, if so, executing a step S4; if not, go to step S3;
embodiments of the present invention relate to a variety of interface components, each having a unique identification code. The interface components are used as the basis for configuring the interface template and are stored in the general component library. That is, the interface component is a specific implementation for a single function, and complex function requirements of applications can be realized by combining a plurality of interface components. For example, Table 1 lists the types of interface components that a generic component library contains:
component name Component identification Function(s)
Text box for display FormElementText, Dynamically loading display characters
Editable text box FormElement, Inputting information
Digital text box FormNumberElement, Limiting input content to digital type
Drop-down menu FormElementSpinner Drop-down selection information
Complex dynamic drop down menu FormElementMultipleSpinner, Loading form styles in linkage according to selection information
Switch button FormElementSwitch, Controlling yes/no rights
Writing pad FormElementSignature, Hand-written signature
Map display FormElementMapButton, Display map thumbnail
Area selector FormAreaElement Selecting area
Date selector FormElementDate, Selecting a date
Address selector FormElementAddressButton, Selecting an address
Area selector FormElementAddressRXButton, Selecting administrative divisions
Picture manager FormElementImageMultipleView, Uploading and deleting of picture files
Picture display FormElementImageMultipleShowView Amplified display of picture files
Audio manager FormElementAudioMultipleView Uploading and deleting of audio files
Audio player FormElementAudioMultipleShowView Playback of audio files
Video manager FormElementVideoMultipleShowView Uploading and deleting of video files
Video player FormElementVideoMultipleView Playback of video files
TABLE 1
If the interface component in the generic component library cannot meet the service requirement, executing step S3: expanding and developing a new interface component, and then executing the step S4; if yes, go directly to step S4.
Step S3: and developing a new interface component according to the business requirement, and storing the new interface component in a general component library. When a new interface component is expanded, it is generally executed by a mobile terminal, but it is needless to say that the interface component may be expanded on another device terminal.
Step S4: and formulating an interface template according to the interface components of the universal component library and the service requirements.
The invention also provides a specific customization process of the interface template, which specifically comprises the following steps:
step S401: and configuring an interface template structure according to actual service requirements. For example, in the embodiment of the invention, the interface is described through the XML grammar based on the android native interface system, and the interface layout file is generated. The structure of the interface template includes the name, type, size, layout position, etc. of the interface component.
Step S402: and binding corresponding data for each interface component. Namely, the mobile terminal is pre-configured with the association ID of the interface component and the data, and generally adopts the acronym of functional Chinese names. Table 2 shows interface data of law enforcement task lists, wherein items 1-9 are the same and items 10-21 are different due to differences in business logic.
Serial number Component Chinese name Association ID
1 Name of illegal subject WFZTMC
2 Residential village SZCJ
3 Area of violation WFMJ
4 Case status AJZT
5 Time SJ
6 Picture address TPURL
TABLE 2
Step S403: and binding corresponding events for each interface component. Because the interface components are specifically realized for a single function, the event responded by each component is unique, the event can be directly bound for the components in the process of customizing the interface template without considering the response of business logic, and the mode avoids the influence of complex business behaviors on the multiplexing and the expansion of the interface components.
Further, for example, a law enforcement task list template is taken as an example to illustrate a specific generation process of the interface template in step S4:
Figure BDA0001809948870000061
Figure BDA0001809948870000071
wherein, SUBMITURL is a jump address; SUBMITTYPE is an interface access mode; FORMNAME is the name of the interface template; the formula is an interface template structure.
In addition, as table 3 shows the basic description information of the interface components:
logical name Name of physical field Whether or not it is empty
Component type elementType Whether or not
Label (R) label
Operability enable
Visibility visible
Reserved field handle
Whether or not to fill isMust
Prompt information tip
Validity check checkUrl
Default value def
Control identification key
TABLE 3
The component type (elementary type) is a non-indispensable item of the configuration interface template, and the filling type must be consistent with the component identification in the table 1 general component library, for example, the illegal main name is FormElementText, i.e. a display text box. In the interface template, other interface components are continuously configured according to needs, so that the complex interface requirements can be met.
Step S5: and sending the whole interface structure and the interface template to the server, so that the server generates an interface instance according to the whole interface structure and the interface template. Generally, an interface template may correspond to multiple interface instances, and a page template may be reusable, such as an interface template for a main page within a website may correspond to multiple page instances. The whole interface structure is obtained according to business requirements, namely, the number of page instances required in the requirements can be known, and then the page templates corresponding to the page instances are determined to be seen, and corresponding page instances are generated. In addition, when generating the interface instances, it is also necessary to configure corresponding basic data and jump logic between the interface instances for each interface instance.
The server accesses the database to inquire data, basic data of the interface instance needs to be organized according to the format of the interface template, the basic data are stored in a JSON format, and the basic data can be directly transmitted at the server and the mobile terminal. The jump logic between the interface instances refers to jump paths between the interfaces, for example, in an actual application process, the jump from one page to another page needs to be realized through the jump logic between the interface instances. In addition, the basic data of the configuration of each interface instance and the jump logic between the interface instances are stored in a corresponding database, which is called a data source. Therefore, the corresponding configuration data can be acquired from the data source in real time for dynamic matching during presentation.
Step S6: and sending a page display request to the server and receiving an interface instance returned by the server. When the page needs to be displayed, the interface instance returned by the server is received by sending a page display request to the server. The page display request may include the number, information, website, etc. of the page example to be displayed, and the specific data is set according to the actual requirement.
Step S7: and identifying each interface component in the analysis interface example according to the general component library, and dynamically adapting according to the basic data of each interface component so as to render the corresponding user interface in real time. Because each interface component has a unique identifier, each interface component can be obtained by analyzing the interface components in the interface examples and matching the interface components in the general component library, and then the user interface is rendered in real time according to the basic data of the interface examples.
Step S8: when the event bound by the user click interface component is obtained, the interface instance to be jumped is obtained according to the jump logic between the interface instances, and the step S6 and the step S7 are sequentially executed to render in real time to obtain the user interface corresponding to the interface instance to be jumped. When the page needs to be jumped, the interface component of the user can bind corresponding events, then the interface instances to be jumped are obtained according to the jump logic between the interface instances, then a display request is sent to the server side, the returned interface instances are analyzed, and then the corresponding user interface can be rendered in real time.
For example, fig. 2 describes the interface jump process: and when the user interacts with the interface to generate the event of the interface component, dynamically adapting a new interface instance and updating the rendering in real time according to the interface jump logic corresponding to the event of the interface component. The server is used for organizing the jump logic of the management interface.
That is, under the condition that the service requirement is changed and a new interface component does not need to be expanded, the method and the system can realize the upgrading and improvement of the interface and the service flow only by configuring the corresponding interface examples at the server end according to the requirement, such as basic data of the interface examples, interface layout, skip logic among the interface examples and the like, without modifying any code of the mobile end and without re-releasing the application, thereby meeting the change of the service requirement and greatly reducing the workload of developers.
The invention dynamically adapts the mobile interface and the application based on the preset general component library and the interface template, and the general component library is perfected by expansion to meet different service requirements; interface layout is carried out in a mode of interface template configuration instead of code development, and the technical difficulty is low; interface skipping is realized by using the service routing device, all service logics are controlled by the server, the workload of later development and maintenance is reduced, and the change of the demand can be responded quickly; on the premise of ensuring the flexibility and diversity of the user interface, the same set of service logic codes are used for dynamically adapting the interface elements, so that the frequency of downloading and updating the application is reduced, and the user perception is improved.
In addition, the present invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for constructing the dynamic configuration application driven by the service as described herein when executing the program.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of building a dynamically configurable application driven by a service as described herein.
The above embodiments are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby, and any insubstantial changes and substitutions made by those skilled in the art based on the present invention are within the protection scope of the present invention.

Claims (4)

1. The construction method of the dynamic configuration application driven by the service is characterized in that: the method comprises the following steps:
a requirement acquisition step: obtaining the integral interface structure of the application according to the service requirement;
a template generation step: acquiring an interface component from the general component library, and generating an interface template according to the service requirement and the interface component; the universal component library comprises a display text box, an editable text box, a digital text box, a pull-down menu, a complex dynamic pull-down menu, a switch button, a handwriting board, a map display, an area selector, a date selector, an address selector, an area selector, a picture manager, a picture display, an audio manager, an audio player, a video manager and a video player;
an instantiation step: sending the interface template and the integral interface structure to the server, and further enabling the server to generate an interface instance according to the interface template and the integral interface structure;
a request step: a page display request is sent to the server, and a corresponding interface instance returned by the server is received;
a rendering step: obtaining one or more interface components from the interface example, identifying each interface component according to the general component library, and rendering in real time according to each interface component to obtain a corresponding user interface; the step of generating the interface instance by the server according to the interface template and the integral interface structure specifically comprises the following steps: generating one or more interface instances according to the whole interface structure and the interface template, and configuring corresponding basic data and skip logic between the interface instances for each interface instance; skipping: when a user clicks an event bound by an interface component, acquiring an interface instance to be jumped according to a jump logic between the interface instances, and sequentially executing a sending step and a rendering step to obtain a user interface to be jumped; the specific process of generating the interface template according to the service requirement and the interface component comprises the following steps: firstly, configuring an interface layout according to business requirements, and then binding corresponding data and events for each interface component in the interface layout; the template generating step further comprises: judging whether the interface components in the general component library can meet the service requirements, if so, executing an instantiation step; if not, executing the component expansion step;
and (3) component extension step: and expanding the new interface component according to the business requirement, storing the new interface component in a general component library, and then executing an instantiation step.
2. The method of constructing a service-driven dynamically configurable application according to claim 1, wherein: the basic data is stored in a JSON format.
3. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein: the processor, when executing the program, implements the steps of the method of building a service driven dynamically configurable application as claimed in any of claims 1-2.
4. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program realizing the steps of the method of building a service driven dynamically configured application as claimed in any one of claims 1-2 when executed by a processor.
CN201811113791.3A 2018-09-25 2018-09-25 Method and device for constructing dynamic configuration application driven by service Active CN109445783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811113791.3A CN109445783B (en) 2018-09-25 2018-09-25 Method and device for constructing dynamic configuration application driven by service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811113791.3A CN109445783B (en) 2018-09-25 2018-09-25 Method and device for constructing dynamic configuration application driven by service

Publications (2)

Publication Number Publication Date
CN109445783A CN109445783A (en) 2019-03-08
CN109445783B true CN109445783B (en) 2022-04-29

Family

ID=65530659

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811113791.3A Active CN109445783B (en) 2018-09-25 2018-09-25 Method and device for constructing dynamic configuration application driven by service

Country Status (1)

Country Link
CN (1) CN109445783B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209967B (en) * 2019-04-17 2022-05-03 北京奇艺世纪科技有限公司 Page loading method and device, terminal equipment and computer readable medium
CN110569079A (en) * 2019-07-23 2019-12-13 镇江慧铄科技有限公司 Method and device for driving front end based on configuration
CN110414939A (en) * 2019-07-31 2019-11-05 浪潮软件集团有限公司 A method of list is rendered based on component element arrangements and saves form data
CN110851114A (en) * 2019-10-24 2020-02-28 山东中创软件工程股份有限公司 Business system development method and device, electronic equipment and storage medium
CN111045767B (en) * 2019-11-26 2024-01-26 北京金和网络股份有限公司 Method and system for displaying map labels on map based on flexible data configuration
CN111158684B (en) * 2019-12-30 2023-07-04 北京天融信网络安全技术有限公司 System creation method, device, electronic equipment and readable storage medium
CN111552467A (en) * 2020-03-06 2020-08-18 北京奇艺世纪科技有限公司 Dynamic page processing method, device and system and storage medium
CN111857658A (en) * 2020-06-19 2020-10-30 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for rendering dynamic component
CN112188292B (en) * 2020-08-28 2022-11-18 福州智象信息技术有限公司 Television desktop construction method based on android operating system
CN113703753B (en) * 2021-07-19 2023-06-09 青岛海尔科技有限公司 Method and device for product development and product development system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391169A (en) * 2017-06-09 2017-11-24 口碑控股有限公司 The dynamic updating method and device of the Android page
CN107729005A (en) * 2017-10-12 2018-02-23 福建富士通信息软件有限公司 A kind of visualization business interface Dynamic Configuration based on H5
CN107704243B (en) * 2017-10-19 2020-12-01 用友网络科技股份有限公司 Front-end interface construction method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109445783A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN109445783B (en) Method and device for constructing dynamic configuration application driven by service
CN111027921B (en) Service processing method and device, electronic equipment and storage medium
CN108154569B (en) Patrol acquisition method based on object modeling configuration
US8005930B2 (en) Add-ins dynamically extending display targets and business-logic programming model
US10552124B2 (en) Systems and methods for building applications using building blocks linkable with metadata
CN107391134B (en) Method and device for automatically generating and dynamically transforming universal mobile application interactive interface
CN104090749A (en) Processing method and system for updating and changing interface theme of WinCE product
CN104798036A (en) User interface control framework for stamping out controls using a declarative template
CN111068328A (en) Game advertisement configuration table generation method, terminal device and medium
CN108369514B (en) System and method for executable content and executable content stream creation
US20200125336A1 (en) System and method for enhancing component based development models with auto-wiring
CN105159670A (en) Universal cockpit display control system software development framework
CN114064024A (en) Method, apparatus, device, storage medium, and program product for developing micro-application
AU2011224001B2 (en) Content asset manager
CN113535165A (en) Interface generation method and device, electronic equipment and computer readable storage medium
CN114238808A (en) Page display method and device, computer equipment and storage medium
CN105468345B (en) Method for realizing remote change of mobile phone terminal visit operation in quick-elimination system
CN114461209A (en) Page configuration and switching method, device, equipment and storage medium
CN109905753B (en) Corner mark display method and device, storage medium and electronic device
CN113407561A (en) Configurable asset management method, apparatus, medium and computer program product
CN111831320A (en) Plug-in management method and device, electronic equipment and storage medium
CN113377346B (en) Integrated environment building method and device, electronic equipment and storage medium
CN115114280A (en) Report generation processing method, device and equipment
CN113807877A (en) Information delivery method, device and storage medium
CN108874476B (en) Method and system for prohibiting advertisement display

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