CN114398033B - Interface and data stripping design method - Google Patents
Interface and data stripping design method Download PDFInfo
- Publication number
- CN114398033B CN114398033B CN202111583232.0A CN202111583232A CN114398033B CN 114398033 B CN114398033 B CN 114398033B CN 202111583232 A CN202111583232 A CN 202111583232A CN 114398033 B CN114398033 B CN 114398033B
- Authority
- CN
- China
- Prior art keywords
- interface
- interface control
- data
- value
- background data
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000013461 design Methods 0.000 title claims abstract description 11
- 230000008275 binding mechanism Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
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/34—Graphical or visual programming
-
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a design method for interface and data stripping, which comprises the following steps of taking the presentation mode of an interface as the attribute of background data and storing the attribute into a database; reading background data from a database, and storing the background data in a key value pair mode; storing the position information of the background data in the key value pair into the tag attribute of the interface control; when background data is presented from a key value pair to a foreground interface, an interface control is found through an interface control tag attribute value, and the interface control is displayed on the foreground interface; when the interface control value is updated from the foreground interface to the key value pair, the position of the interface control value in the key value pair is found through the interface control tag attribute value, and the background data is updated. The interface and the background data can be stripped, so that the program has higher expandability and flexibility.
Description
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a design method for interface and data stripping.
Background
The stripping between the interface and the data is realized, and is the most important link in the UI software design. Many compiling environments, including android studio and WPF, provide a data binding mechanism between a data source and an interface control, which is quite convenient for value transfer between an interface and background data, but when background data needs to be updated frequently and foreground interface needs to be diversified and presented, the binding mechanism cannot meet the requirement. In addition, many other compilation platforms, such as winform, vb, etc., do not provide such specialized mechanisms for automatic transmission of interface and background data.
In summary, the flexibility between the interface control and the data source in the prior art is poor, and the data binding mechanism causes the problem of poor expansibility.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a design method for stripping the interface and the data, which can strip the interface from the background data, so that the program has higher expandability and flexibility.
In order to achieve the above purpose, the present invention provides the following technical solutions:
a design method for interface and data stripping comprises the following steps,
Taking the presentation mode of the interface as the attribute of background data and storing the attribute into a database;
reading background data from a database, and storing the background data in a key value pair mode; storing the position information of the background data in the key value pair into the tag attribute of the interface control; when background data is presented from a key value pair to a foreground interface, an interface control is found through an interface control tag attribute value, and the interface control is displayed on the foreground interface; when the interface control value is updated from the foreground interface to the key value pair, the position of the interface control value in the key value pair is found through the interface control tag attribute value, and the background data is updated.
Preferably, the specific process of displaying key-value pairs to the interface includes the steps of,
Step 1, reading a database, acquiring background data, and executing step 2 after finishing;
step 2, judging whether the state is an initial state, if so, executing the step 3; if not, executing the step 6;
Step 3, dynamically generating an interface control according to the attribute corresponding to the key value pair value, setting the tab attribute value of the interface control, and executing step 4 after the completion;
step 4, setting an interface control value, displaying through the interface control, and executing step 5 after finishing the display;
Step 5, judging whether the current key value pair is the last key value pair, if not, executing the step 3; if yes, executing the step 9;
Step 6, acquiring an interface control tag attribute value, and executing step 7 after finishing;
step7, setting an interface control value, displaying through the interface control, and executing step 8 after finishing the display;
Step 8, judging whether the current interface control is the last interface control, if not, executing the step 6; if yes, executing the step 9;
and 9, ending the updating.
Further, initially, setting an interface control tag attribute value by polling a key value pair, and initializing the interface control value.
Further, when the interface control value is polled, the key value pair position is positioned by acquiring the interface control tag attribute value set at the initial time, so that the background data is updated to the interface.
Preferably, the specific process of updating the interface-to-key value pairs includes the steps of,
Step 1, writing update data from an interface, and executing step 2 after finishing;
step 2, acquiring a tab value of an interface control, and executing the step 3 after finishing the tab value;
And step3, setting a value corresponding to the key value pair, and updating background data.
Preferably, the background data comprises a data type, a control type and a data range.
Preferably, the interface is presented in a manner including a text box, a drop-down box, or a combination of each other.
Preferably, the background data is dynamically imported through a sqlite database.
Compared with the prior art, the invention has the following beneficial technical effects:
The invention provides a design method for peeling an interface and data, which is characterized in that the presentation mode of the interface is used as the attribute of background data to be written into a database, the presentation mode of the background data and the foreground interface can be dynamically corresponding, and the data is presented to the foreground interface by adopting a key value pair, so that one-to-one interface to background data is realized. The invention can be used for any platform needing interface display and having a plurality of data information, and realizes the peeling of interfaces and data; not only can the development efficiency be improved, but also the expandability of the framework can be improved.
Furthermore, the information of the background data is dynamically imported through the sqlite database, and in this way, the modified data can be dynamically loaded in the running process of the software;
Drawings
FIG. 1 is a flow chart of key value pair-to-interface display in the present invention;
FIG. 2 is a diagram illustrating the updating of interface-to-key pairs according to the present invention.
Detailed Description
The invention will now be described in further detail with reference to specific examples, which are intended to illustrate, but not to limit, the invention.
The invention provides a design method for stripping the interface and the data, which strips the interface and the background data, so that the program has higher expandability and flexibility.
The invention relates to a design method for interface and data stripping, which comprises the following steps of taking the presentation mode of an interface as the attribute of background data and storing the attribute into a database;
reading background data from a database, and storing the background data in a key value pair mode; storing the position information of the background data in the key value pair into the tag attribute of the interface control; when background data is presented from a key value pair to a foreground interface, an interface control is found through an interface control tag attribute value, and the interface control is displayed on the foreground interface; when the interface control value is updated from the foreground interface to the key value pair, the position of the interface control value in the key value pair is found through the interface control tag attribute value, and the background data is updated.
In the invention, the information of the background data is dynamically imported through the sqlite database, and in this way, the modified data can be dynamically loaded in the running process of the software; the presentation mode of the interface may be diversified, such as a text box, a drop-down box, or a combination of each other, and in order to dynamically correspond the background data to the presentation mode of the foreground, the presentation mode of the interface may be written into the database as an attribute of the background data. Note that: when determining the attributes in the database table, the interface and the background data are stripped as far as possible through the attribute items, and meanwhile, the one-to-one correspondence is ensured, and the expandability of the code design is ensured as far as possible.
In the invention, the background data and the interface control are in one-to-one correspondence, so that the one-to-one correspondence of the data from the data to the interface and the interface to the data is realized. To achieve a one-to-one correspondence, the bridge between the two must be both common and unique. By taking C# wind as an example, it is found that all interface controls have a common attribute tag, and the type of the tag is object, the object is a base class of all types, and all classes in C# are inherited from the System. Thus, any type of value may be assigned to an Object type of variable. Can be used as a bridge.
As shown in fig. 1, the specific process of displaying key-value pairs to an interface in the present invention includes the steps of,
Step 1, reading a database, acquiring background data, and executing step 2 after finishing;
step 2, judging whether the state is an initial state, if so, executing the step 3; if not, executing the step 6;
Step 3, dynamically generating an interface control according to the attribute corresponding to the key value pair value, setting the tab attribute value of the interface control, and executing step 4 after the completion;
step 4, setting an interface control value, displaying through the interface control, and executing step 5 after finishing the display;
Step 5, judging whether the current key value pair is the last key value pair, if not, executing the step 3; if yes, executing the step 9;
Step 6, acquiring an interface control tag attribute value, and executing step 7 after finishing;
step7, setting an interface control value, displaying through the interface control, and executing step 8 after finishing the display;
Step 8, judging whether the current interface control is the last interface control, if not, executing the step 6; if yes, executing the step 9;
and 9, ending the updating.
In the step 3 to the step 5, initially, setting an interface control tag attribute value by polling a key value pair, and initializing the interface control value.
In the steps 6 to 8, when the interface control value is polled, the key value pair position is positioned by acquiring the interface control tag attribute value set at the initial time, so that the background data is updated to the interface.
In the invention, the interface presentation mode is as follows: the control type is used as one attribute in the background data information and is stored in a database; after the background data is imported from the database, the background data is stored in a key value pair mode; storing the position information of the background data in the key value pair into the tag attribute of the interface control; when the data is presented from the key value pair to the foreground interface, finding out the control of the interface through the interface control tag value; when the value is updated to the key value pair from the interface, the position of the control value in the key value pair is found out through the tab value of the interface control. Thereby achieving one-to-one interface to background data.
As shown in fig. 2, the specific process of updating the interface-to-key value pairs includes the steps of,
Step 1, writing update data from an interface, and executing step 2 after finishing;
step 2, acquiring a tab value of an interface control, and executing the step 3 after finishing the tab value;
And step3, setting a value corresponding to the key value pair, and updating background data.
The invention can be used for any platform needing interface display and having a lot of data information, and realizes the peeling of interfaces and data. Through the idea, the development efficiency can be improved, and the expandability of the framework can be improved.
The method comprises the steps of analyzing requirements, combining data characteristics required to be displayed on an interface, determining a mode (control type) of interface display, and taking the type, the control type, the data range and the like of data as attribute items of the data;
if the interface layout is the dynamic generation control, the tag value of the control can be dynamically set; if the layout is in the designer, the tag value needs to be modified manually.
And reading background data information in the database in the program, and creating key value pairs.
The polling key value pair and the interface update the interface value through the tag value of the interface control.
When the interface control value is changed, the data position in the corresponding key value pair is found through the tag value of the control, and the data position is updated.
Claims (7)
1. A design method for interface and data stripping is characterized by comprising the following steps,
Taking the presentation mode of the interface as the attribute of background data and storing the attribute into a database;
Reading background data from a database, and storing the background data in a key value pair mode; storing the position information of the background data in the key value pair into the tag attribute of the interface control; when background data is presented from a key value pair to a foreground interface, an interface control is found through an interface control tag attribute value, and the interface control is displayed on the foreground interface; when the interface control value is updated from the foreground interface to the key value pair, the position of the interface control value in the key value pair is found through the interface control tag attribute value, and background data is updated;
The interface control is found out through the tab attribute value of the interface control, and is displayed on the foreground interface through the interface control, which comprises the following steps,
Step 1, reading a database, acquiring background data, and executing step 2 after finishing;
step 2, judging whether the state is an initial state, if so, executing the step 3; if not, executing the step 6;
Step 3, dynamically generating an interface control according to the attribute corresponding to the key value pair value, setting the tab attribute value of the interface control, and executing step 4 after the completion;
step 4, setting an interface control value, displaying through the interface control, and executing step 5 after finishing the display;
Step 5, judging whether the current key value pair is the last key value pair, if not, executing the step 3; if yes, executing the step 9;
Step 6, acquiring an interface control tag attribute value, and executing step 7 after finishing;
step7, setting an interface control value, displaying through the interface control, and executing step 8 after finishing the display;
Step 8, judging whether the current interface control is the last interface control, if not, executing the step 6; if yes, executing the step 9;
and 9, ending the updating.
2. The method for designing interface and data stripping according to claim 1, wherein initially, the interface control tag attribute value is set by polling key value pairs, and the interface control value is initialized.
3. The method for designing interface and data stripping according to claim 1, wherein when the interface control value is polled, the key value pair position is positioned by acquiring the initially set interface control tag attribute value, so that the background data is updated to the interface.
4. The method for designing interface and data stripping according to claim 1, wherein the updating of interface-to-key value pairs comprises the steps of,
Step 1, writing update data from an interface, and executing step 2 after finishing;
step 2, acquiring a tab value of an interface control, and executing the step 3 after finishing the tab value;
And step3, setting a value corresponding to the key value pair, and updating background data.
5. The method for designing interface and data stripping according to claim 1, wherein the background data comprises a data type, a control type and a data range.
6. The method for designing interface and data stripping according to claim 1, wherein the interface is presented in a form of text box, drop-down box or combination of text box and drop-down box.
7. The method for designing interface and data stripping according to claim 1, wherein the background data is dynamically imported through a sqlite database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111583232.0A CN114398033B (en) | 2021-12-22 | 2021-12-22 | Interface and data stripping design method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111583232.0A CN114398033B (en) | 2021-12-22 | 2021-12-22 | Interface and data stripping design method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114398033A CN114398033A (en) | 2022-04-26 |
CN114398033B true CN114398033B (en) | 2024-05-14 |
Family
ID=81227451
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111583232.0A Active CN114398033B (en) | 2021-12-22 | 2021-12-22 | Interface and data stripping design method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114398033B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105511873A (en) * | 2015-12-02 | 2016-04-20 | 网易(杭州)网络有限公司 | User interface control display method and device |
CN107767010A (en) * | 2017-08-04 | 2018-03-06 | 平安科技(深圳)有限公司 | Range value data statistical method, electronic installation and computer-readable recording medium |
CN107766039A (en) * | 2017-10-30 | 2018-03-06 | 中国平安财产保险股份有限公司 | The method of access attribute value, server and storage medium from Java object |
WO2018080006A1 (en) * | 2016-05-01 | 2018-05-03 | ㈜이노프레소 | Electronic apparatus equipped with complex human interface and control method therefor |
CN108897779A (en) * | 2018-06-04 | 2018-11-27 | 广州环通信息技术有限公司 | A kind of quick obtaining list value and the method and system to list assignment |
CN111260305A (en) * | 2018-11-30 | 2020-06-09 | 塔塔顾问服务有限公司 | Generating an extensible and customizable location-independent agile delivery model |
CN113761304A (en) * | 2021-09-23 | 2021-12-07 | 北京航空航天大学青岛研究院 | Big data intelligent display configuration method based on dynamic parameters |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8185957B2 (en) * | 2006-10-30 | 2012-05-22 | Lexmark International, Inc. | Peripheral device |
-
2021
- 2021-12-22 CN CN202111583232.0A patent/CN114398033B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105511873A (en) * | 2015-12-02 | 2016-04-20 | 网易(杭州)网络有限公司 | User interface control display method and device |
WO2018080006A1 (en) * | 2016-05-01 | 2018-05-03 | ㈜이노프레소 | Electronic apparatus equipped with complex human interface and control method therefor |
CN107767010A (en) * | 2017-08-04 | 2018-03-06 | 平安科技(深圳)有限公司 | Range value data statistical method, electronic installation and computer-readable recording medium |
CN107766039A (en) * | 2017-10-30 | 2018-03-06 | 中国平安财产保险股份有限公司 | The method of access attribute value, server and storage medium from Java object |
CN108897779A (en) * | 2018-06-04 | 2018-11-27 | 广州环通信息技术有限公司 | A kind of quick obtaining list value and the method and system to list assignment |
CN111260305A (en) * | 2018-11-30 | 2020-06-09 | 塔塔顾问服务有限公司 | Generating an extensible and customizable location-independent agile delivery model |
CN113761304A (en) * | 2021-09-23 | 2021-12-07 | 北京航空航天大学青岛研究院 | Big data intelligent display configuration method based on dynamic parameters |
Non-Patent Citations (2)
Title |
---|
ForestDB: A Fast Key-Value Storage System for Variable-Length String Keys;J. -S. Ahn 等;《 IEEE Transactions on Computers》;20150520;第65卷(第03期);902-915 * |
基于分布式键值对存储技术的EMS数据库平台;闫湖 等;《电网技术》;20130105;第36卷(第09期);162-167 * |
Also Published As
Publication number | Publication date |
---|---|
CN114398033A (en) | 2022-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8302014B2 (en) | Merging modifications to user interface components while preserving user customizations | |
CN109739600B (en) | Data processing method, medium, device and computing equipment | |
US8554797B2 (en) | System and method for modular business applications | |
US20140143047A1 (en) | Methods and Apparatus for Automated Campaign Generation | |
US20080244562A1 (en) | Method of Identifying and Checking Software Installation Requirements | |
CN111068328A (en) | Game advertisement configuration table generation method, terminal device and medium | |
CN105700925A (en) | APP interface implementation method and apparatus | |
CN110837366A (en) | Form generation method, electronic device and computer readable storage medium | |
US10896109B2 (en) | Non-monotonic eventual convergence for desired state configuration | |
CN114257624B (en) | Configuration method, device and equipment of Internet of things equipment and storage medium | |
CN108920566B (en) | Method, device and equipment for operating SQLite database | |
CN114398033B (en) | Interface and data stripping design method | |
CN104133706A (en) | Firmware modifying method and device | |
EP2466461A2 (en) | System and method for modular business applications | |
JP2016009423A (en) | Information processing device, method for controlling information processing device, and program | |
CN116679912A (en) | Code generation method, apparatus, device, storage medium, and computer program | |
CN113971019B (en) | Data type creation method, device, server and medium | |
US20170139970A1 (en) | Method for updating a record in a database by a data- processing device | |
CN113887185A (en) | Electronic contract generation method and generation device | |
CN114356379A (en) | Backup-based service upgrading method, device, equipment and storage medium | |
CN109828755B (en) | Electric power graph display method | |
CN112416444A (en) | Board switching control method, device, equipment and medium | |
CN114265658B (en) | Page display method, device and equipment | |
CN106528183B (en) | Method and device for creating control and computer program | |
CN117850826A (en) | Server management method, device, equipment and computer readable storage medium |
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 |