CN100433013C - Method and system for demonstrating data by tree-mode structure - Google Patents

Method and system for demonstrating data by tree-mode structure Download PDF

Info

Publication number
CN100433013C
CN100433013C CNB2006100606426A CN200610060642A CN100433013C CN 100433013 C CN100433013 C CN 100433013C CN B2006100606426 A CNB2006100606426 A CN B2006100606426A CN 200610060642 A CN200610060642 A CN 200610060642A CN 100433013 C CN100433013 C CN 100433013C
Authority
CN
China
Prior art keywords
data
tree
request
demonstrating
browser
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
CNB2006100606426A
Other languages
Chinese (zh)
Other versions
CN1983257A (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.)
XFusion Digital Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2006100606426A priority Critical patent/CN100433013C/en
Publication of CN1983257A publication Critical patent/CN1983257A/en
Application granted granted Critical
Publication of CN100433013C publication Critical patent/CN100433013C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method for presenting data on tree structure includes converting original data to be expression data being suitable to be presented on tree structure, generating presentation control command corresponding to data presentation request by receiving said request sent by user through browser, converting expression data corresponding to said request to be tree structure view according to presentation control command then displaying said tree structure view onto user through browser.

Description

A kind of method and system by the tree demonstrating data
Technical field
The invention belongs to computer application field, relate in particular to a kind of method by the tree demonstrating data.
Background technology
Tree often is used as a kind of mode of demonstrating data.The data class that tree represents seemingly, presentation style, control and mode of operation are also similar, for example operations such as expanding node, increase or deletion of node.At traditional client end/server end (Client/Server, C/S) in the program of structure, mainly finish above function by tree control, and at browser end/server end (Browser/Server, B/S) in the application program of structure, because there is not this type of control, need to use multiple technologies to realize.
In a kind of implementation of prior art, server is according to required data presented and the pattern that represents, generation is used for HTML (the HyperText Markup Language that browser end shows, HTML (Hypertext Markup Language))/XHTML (eXtensible Hyper Text Markup Language, extensible HyperText Markup Language) code, be used to control mutual JavaScript (a kind of object-based client script language at server end at every kind of different form of expression adding, on user's browser end, move), directly present to the user.Browser end returns to server process with the result of user's response by list (Form) form.
In this scheme at different application scenarioss, the programmer need directly write code at server end and generate different HTML/XHTML codes and show and represent pattern accordingly, and generating corresponding JavaScript according to different patterns, to be used for control mutual, so than higher, and the reusability of code is also very poor to programmer's requirement.This in addition mode of utilizing server end language compilation code to generate the browser end code makes server-side code and browser end code mix, if desired the level or the presentation style of video data are revised, then need to make a large amount of modifications, cause the modification and the debug difficulties of code.Simultaneously tree represent a large amount of HTML/XHTML code of needs, this directly generate the mode of HTML/XHTML code at server end can be because each data be all different, browser end can't buffer memory and reduce the speed of server, wastes the network bandwidth.
Summary of the invention
The object of the present invention is to provide a kind of method by the tree demonstrating data, be intended to solve in the prior art by the tree demonstrating data time, code generates complicated, and reusability is poor, and modification and problem difficult in maintenance.
Another object of the present invention is to provide a kind of system by the tree demonstrating data.
The object of the present invention is achieved like this, and a kind of method by the tree demonstrating data is characterized in that described method comprises the steps:
A. raw data is converted to the expression data that suitable tree represents, comprises primary data information (pdi) in the described expression data, and description corresponding with the node of tree and control information;
B. receive the data exhibiting request that the user submits to by browser, generate the steering order that represents corresponding with described data exhibiting request;
C. according to the described steering order that represents the expression data corresponding with described data exhibiting request is converted to the tree view, described tree view is shown to the user by browser.
Described method further comprises the steps:
D. receive the data operation request that the user submits to by browser, upgrade raw data according to described data operation request.
The described steering order that represents generates by JavaScript.
Described expression data is the XML data.
Described tree view generates the XML data-switching by extendible style sheet language conversion XSLT or by the DOM Document Object Model DOM among the JavaScript XML data-switching is generated.
Described tree view is HTML/XHTML, Flash or Applet form.
A kind of system by the tree demonstrating data, described system comprises:
The data representation processing unit is used for raw data is converted to the expression data that suitable tree represents, and comprises primary data information (pdi) in the described expression data, and description corresponding with the node of tree and control information;
Mutual control module is used to receive the data exhibiting request that the user submits to by browser, generates the represent steering order corresponding with described data exhibiting request; And
The data presentation converting unit is used for according to the described steering order that represents the expression data corresponding with described data exhibiting request being converted to the tree view, by browser described tree view is shown to the user.
Described data representation processing unit comprises:
The original data storage administration module is used to obtain raw data to be represented; And
The data representation module is used for raw data described to be represented is converted to the expression data that suitable tree represents.
Described data representation processing unit further comprises:
User's request processing module is used to receive the data operation request that the user submits to by browser, upgrades raw data according to described data operation request.
The described steering order that represents generates by JavaScript.
Described expression data is the XML data.
Described tree view generates the XML data-switching by extendible style sheet language conversion XSLT or by the DOM Document Object Model DOM among the JavaScript XML data-switching is generated.
Described tree view is HTML/XHTML, Flash or Applet form.
The present invention is divided into data division, display part and control section with the tree of demonstrating data and carries out independent realization, the reusability of code and the dirigibility of modification and maintenance have been improved, provide data by server end simultaneously, the mode of browser end generation tree demonstrating data code has reduced the volume of transmitted data of server end and browser end, improve the speed of server end, saved the network bandwidth.
Description of drawings
Fig. 1 is a MVC structure of models schematic diagram;
Fig. 2 is the realization of tree provided by the invention and the corresponding relation synoptic diagram between the MVC model;
Fig. 3 is the realization schematic diagram by the tree demonstrating data provided by the invention;
Fig. 4 is the realization flow figure by the tree demonstrating data provided by the invention;
Fig. 5 is the structural drawing by tree demonstrating data system provided by the invention.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The present invention is according to MVC (Model-View-Controller, model-view-controller) modular concept, the tree of demonstrating data is divided into data, demonstration and controls the independent respectively realization of three parts, thereby increase to realize the reusability of tree code, improved the dirigibility of code revision, maintenance.
Fig. 1 shows MVC structure of models principle, and wherein, view (View) is that the user sees and mutual with it interface.Concerning web application, view is exactly by HTML, Macromedia Flash and the interface formed as elements such as some identifiable languages such as XHTML, XML/XSL or WML and Web services.Model (Model) provides data for a plurality of views.Because the code that is applied to model only need be write once and just can be reused by a plurality of views, so reduced the repeatability of code.Controller (Controller) is accepted user's input and is called model and view goes to finish user's demand.When data are handled, at first controller receives user's request, and determine that call which model handles, model comes the request and the return data of process user with service logic then, last controller formats the data that model returns with corresponding view, and presents to the user by presentation layer.
The MVC model is as a kind of INTERFACE DESIGN pattern of maturation, in the industry cycle be extensive use of, use the reusability that this Design Mode can improve code, reduce the degree of coupling of data representation, data description and referencing operation, improve maintainability, extensibility, dirigibility and the encapsulation property of software simultaneously.The present invention uses the tree demonstrating data according to the MVC modular concept in the WEB page.
Fig. 2 shows the realization of tree in the B/S structure provided by the invention and the corresponding relation of MVC model, and server end is realized the Model part in the MVC pattern, and browser end is realized View and the Controller part in the MVC pattern.
Fig. 3 shows the realization principle that data is represented by tree provided by the invention:
At server end, at first the raw data that needs are represented is preserved, and can leave in database, the memory object, also can directly obtain from other position.Generally all be level or tabulation relation between the data item of the raw data that these are saved, can use the mode of tree to present., can be information such as device id, title, IP and state for example for equipment.
Secondly, raw data is converted to the expression data that suitable tree represents, conveniently to show and to handle.As one embodiment of the present of invention, adopt XML (eXtensible Markup Language, extend markup language) to describe the raw data among the Model, the required information that represents can be described effectively, make things convenient for processing, conversion and the expansion of program.The XML data that generate also comprise associated description, the control information of the node of tree except that comprising primary data information (pdi), for example specify each node of tree all to comprise a check box etc.At last, the list of server end by user's operating result resolved user's request, revises raw data and makes the data sync of server end and browser end.
At browser end, when user's open any browser, browser is downloaded the JavaScript file from server end, and this JavaScript file represents request according to the user and generates the data exhibiting steering order.When the tree initialization shows, browser end obtains with the user from server end according to the data exhibiting steering order and asks corresponding XML data, select to download relevant XSLT (the eXtensible Stylesheet LanguageTransformations that represents form, extendible style sheet language conversion) file, by XSLT the XML data-switching is become HTML/XHTML, HTML/XHTML is shown to the user with the form of tree view by browser end.Once more, the state that shows by JavaScript document change tree is with response user's operation, and for example the user launches the node of tree, then shows the child node of this node and changes the state of father node.At last, if the user changes the raw data of server end to the action need of tree, then the operating result of user's operation is submitted to server-side processes by Form or XMLHTTP mode, server end is resolved user's request, change raw data, make the data sync of server end and browser end.
Fig. 4 shows the realization flow by the tree demonstrating data provided by the invention, and details are as follows:
In step S401, browser end comprises the page of tree according to user's operation initialization, prepares to carry out next step data presentation, downloads the JavaScript file from server end, to data represent and user's request is controlled.
In step S402, browser end, is downloaded from server end by browser end to the corresponding XML data of server end request and select corresponding XSLT file according to the tree type of appointment in the page and parameter;
Server end can generate the XML data with all raw data in advance in the present invention, when browser end request XML data, directly returns XML data to browser through end.Also can generate the XML data, return to browser end again according to the request of browser end;
In step S403, browser end uses XSLT that the XML data are converted to HTML/XHTML, presents to the user with the tree view;
Can not use XSLT to change in one embodiment of this invention and generate HTML/XHTML, but in the JavaScript of browser end, directly use DOM (DOM Document Object Model) analyzing XML to generate HTML/XHTML.But can lose dirigibility and the ease for maintenance of using XSLT like this, because DOM resolves this mode and the rule of conversion need be write in the source code of browser end, if the representing then need to revise source code of change tree to change transformation rule, and the conversion of using XSLT to carry out the XML data only need select the corresponding XSLT file of download to get final product from server end according to the form that will represent, and prerequisite is that the XSLT file has been designed and be kept at server end by the developer certainly.
In step S404, the JavaScript of browser end response user operation changes the tree internal data, for example launch tree node, change node state etc.;
In step S405, if the user then submits to server-side processes by Form or XMLHTTP mode with user's operating result to the raw data on the action need change server end of tree.
In one embodiment of this invention, the JavaScript, XSLT file that download to browser end can viewed device end buffer memorys, server only needs to send the XML data at every turn, and do not need to send all data that produce HTML/XHTML, thereby significantly reduced data transmission, save bandwidth, improved the speed of customer access network.
Fig. 5 shows the structure of passing through the system 100 of tree demonstrating data provided by the invention, and 101 pairs of raw data that represent by tree of data processing unit are stored and conversion process, generates to be suitable for the expression data that tree represents.Original data storage administration module 1012 is used to preserve or obtain raw data to be represented from exterior storage medium.Data representation module 1011 is converted to raw data and is fit to the expression data that tree represents, conveniently to represent and to handle.As one embodiment of the present of invention, adopt XML to describe raw data.
Data presentation converting unit 102 becomes the HTML/XHTML code with the XML data-switching, is represented to the user by the mode of browser end with the tree view.Mutual representing of 103 pairs of data of control module controlled, represent request according to user's data and generate the data exhibiting steering order, and the response user is to the operation of tree view, when the user changes the raw data of server end to the action need of tree view, mutual control module 103 is submitted to user's request processing module 1013 with user's operation requests with Form or XML HTTP mode, user's request processing module 1013 is revised corresponding raw data according to this operation requests, makes the data sync of server end and browser end.
Need to prove that the present invention is not limited to HTML/XHTML by the form of tree demonstrating data, can also be Flash (the mutual cartoon making instrument of a kind of webpage) or Applet (a kind of Java Applet that is embedded in the html file), promptly by XSLT with the XML data-switching or directly offer tree control among Flash or the Applet.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (13)

1, a kind of method by the tree demonstrating data is characterized in that described method comprises the steps:
A. raw data is converted to the expression data that suitable tree represents, comprises primary data information (pdi) in the described expression data, and description corresponding with the node of tree and control information;
B. receive the data exhibiting request that the user submits to by browser, generate the steering order that represents corresponding with described data exhibiting request;
C. according to the described steering order that represents the expression data corresponding with described data exhibiting request is converted to the tree view, described tree view is shown to the user by browser.
2, the method by the tree demonstrating data as claimed in claim 1 is characterized in that described method further comprises the steps:
D. receive the data operation request that the user submits to by browser, upgrade raw data according to described data operation request.
3, the method by the tree demonstrating data as claimed in claim 1 is characterized in that the described steering order that represents generates by JavaScript.
4, the method by the tree demonstrating data as claimed in claim 1 is characterized in that described expression data is the XML data.
5, the method by the tree demonstrating data as claimed in claim 4, it is characterized in that described tree view generates the XML data-switching by extendible style sheet language conversion XSLT or by the DOM Document Object Model DOM among the JavaScript XML data-switching generated.
6, the method by the tree demonstrating data as claimed in claim 1 is characterized in that described tree view is HTML/XHTML, Flash or Applet form.
7, a kind of system by the tree demonstrating data is characterized in that described system comprises:
The data representation processing unit is used for raw data is converted to the expression data that suitable tree represents, and comprises primary data information (pdi) in the described expression data, and description corresponding with the node of tree and control information;
Mutual control module is used to receive the data exhibiting request that the user submits to by browser, generates the represent steering order corresponding with described data exhibiting request; And
The data presentation converting unit is used for according to the described steering order that represents the expression data corresponding with described data exhibiting request being converted to the tree view, by browser described tree view is shown to the user.
8, the system by the tree demonstrating data as claimed in claim 7 is characterized in that described data representation processing unit comprises:
The original data storage administration module is used to obtain raw data to be represented; And
The data representation module is used for raw data described to be represented is converted to the expression data that suitable tree represents.
9, the system by the tree demonstrating data as claimed in claim 7 is characterized in that described data representation processing unit further comprises:
User's request processing module is used to receive the data operation request that the user submits to by browser, upgrades raw data according to described data operation request.
10, the system by the tree demonstrating data as claimed in claim 7 is characterized in that the described steering order that represents generates by JavaScript.
11, the system by the tree demonstrating data as claimed in claim 7 is characterized in that described expression data is the XML data.
12, the system by the tree demonstrating data as claimed in claim 11, it is characterized in that described tree view generates the XML data-switching by extendible style sheet language conversion XSLT or by the DOM Document Object Model DOM among the JavaScript XML data-switching generated.
13, the system by the tree demonstrating data as claimed in claim 7 is characterized in that described tree view is HTML/XHTML, Flash or Applet form.
CNB2006100606426A 2006-05-11 2006-05-11 Method and system for demonstrating data by tree-mode structure Active CN100433013C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100606426A CN100433013C (en) 2006-05-11 2006-05-11 Method and system for demonstrating data by tree-mode structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100606426A CN100433013C (en) 2006-05-11 2006-05-11 Method and system for demonstrating data by tree-mode structure

Publications (2)

Publication Number Publication Date
CN1983257A CN1983257A (en) 2007-06-20
CN100433013C true CN100433013C (en) 2008-11-12

Family

ID=38165797

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100606426A Active CN100433013C (en) 2006-05-11 2006-05-11 Method and system for demonstrating data by tree-mode structure

Country Status (1)

Country Link
CN (1) CN100433013C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451103A (en) * 2016-03-31 2017-12-08 阿里巴巴集团控股有限公司 Template for displaying and amending method and equipment

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706717B (en) * 2009-10-12 2012-07-04 南京联创科技集团股份有限公司 Method for processing acquisition index dynamic image
CN101763423B (en) * 2010-01-21 2014-02-19 中兴通讯股份有限公司南京分公司 Method for realizing presentation of tree-structure data in World Wide Web page as well as system and device therefor
CN102385593B (en) * 2010-09-03 2013-05-08 金蝶软件(中国)有限公司 Method and device as well as operation system for operating utility tree
CN102467535B (en) * 2010-11-12 2014-07-09 金蝶软件(中国)有限公司 Method, device and system for acquiring tree data output coordinate
CN103345522B (en) * 2013-07-18 2018-10-19 北京润通丰华科技有限公司 Displaying processing, methods of exhibiting and the device of data
CN103473304A (en) * 2013-09-10 2013-12-25 北京思特奇信息技术股份有限公司 Service request tree displaying method and system based on extensible markup language (XML) file caching technology
CN103473647A (en) * 2013-09-13 2013-12-25 上海安捷力信息系统有限公司 Marketing channel flow direction management system
CN103729410A (en) * 2013-12-10 2014-04-16 桂林长海科技有限责任公司 Check-box-provided tree structure catalogue construction method and device based on Flash technology
CN105389315B (en) * 2014-09-04 2019-04-12 阿里巴巴集团控股有限公司 A kind of dynamic web page update method and device
CN106126249B (en) * 2016-06-29 2019-06-04 武汉斗鱼网络科技有限公司 It is a kind of to realize behavior, data, the method and system of view linkage in front end
CN108846075B (en) * 2018-06-08 2021-09-21 成都深思科技有限公司 Intelligent layout presentation method based on organization structure tree

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020107892A1 (en) * 2000-12-12 2002-08-08 Oracle Corporation Dynamic tree control system
US20030229850A1 (en) * 2002-06-07 2003-12-11 Calvin Lue Web browser
US6868423B2 (en) * 2001-07-18 2005-03-15 Hitachi, Ltd. Production and preprocessing system for data mining
CN1614927A (en) * 2004-11-18 2005-05-11 北京锐安科技有限公司 Method for realizing tree-shaped structure in B/S structure
WO2006001641A1 (en) * 2004-06-24 2006-01-05 Heeseob Park Methods and the program-recording medium for creating, editing and trading home page components to assemble a home page and a personal portal site directly in wysiwyg on web browser

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020107892A1 (en) * 2000-12-12 2002-08-08 Oracle Corporation Dynamic tree control system
US6868423B2 (en) * 2001-07-18 2005-03-15 Hitachi, Ltd. Production and preprocessing system for data mining
US20030229850A1 (en) * 2002-06-07 2003-12-11 Calvin Lue Web browser
WO2006001641A1 (en) * 2004-06-24 2006-01-05 Heeseob Park Methods and the program-recording medium for creating, editing and trading home page components to assemble a home page and a personal portal site directly in wysiwyg on web browser
CN1614927A (en) * 2004-11-18 2005-05-11 北京锐安科技有限公司 Method for realizing tree-shaped structure in B/S structure

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451103A (en) * 2016-03-31 2017-12-08 阿里巴巴集团控股有限公司 Template for displaying and amending method and equipment
CN107451103B (en) * 2016-03-31 2022-04-22 阿里巴巴集团控股有限公司 Template display and modification method and device

Also Published As

Publication number Publication date
CN1983257A (en) 2007-06-20

Similar Documents

Publication Publication Date Title
CN100433013C (en) Method and system for demonstrating data by tree-mode structure
US7827494B1 (en) Layout management using data-descriptive meta language documents
US7873668B2 (en) Application data binding
CN101849228B (en) Method and system for creating it-oriented server-based web applications
CN110806863A (en) Interface document generation method and device, electronic equipment and storage medium
US7954107B2 (en) Method and system for integrating the existing web-based system
US9122650B1 (en) Web server based on the same paradigms as web clients
CN110502212B (en) Multi-language-oriented high concurrency online development supporting method
US9646103B2 (en) Client-side template engine and method for constructing a nested DOM module for a website
CN101714133A (en) WEB-based mathematical formula editing system and method
CN101122921A (en) Method forming tree-shaped display structure based on ajax and html
WO2001057652A2 (en) Method and system for building internet-based applications
US20160012144A1 (en) Javascript-based, client-side template driver system
US20160012147A1 (en) Asynchronous Initialization of Document Object Model (DOM) Modules
US8566807B1 (en) System and method for accessibility of document object model and JavaScript by other platforms
EP1821219A1 (en) Document processing device and document processing method
JP2009524132A (en) Method and system for integrating computing and presentation techniques
CA2538561C (en) System and method for conversion of web services applications into component based applications for devices
WO2007132568A1 (en) Data processing server and data processing method
WO2016005886A2 (en) Self-referencing of running script elements in asychronously loaded dom modules
US20020107917A1 (en) Rapid development in a distributed application environment
US10244020B1 (en) System and method for auto-generating meta-proxies
US20070234200A1 (en) Model view controller modeling language
US20160012146A1 (en) Client Web Browser and Method for Constructing a Website DOM Module With Client-Side Functional Code
WO2010097688A1 (en) System and method for the generation of applications by means of a computer network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20211228

Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province

Patentee after: xFusion Digital Technologies Co., Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right