CN103902271B - The unified method for showing window interfaces in client and browser - Google Patents
The unified method for showing window interfaces in client and browser Download PDFInfo
- Publication number
- CN103902271B CN103902271B CN201210581751.8A CN201210581751A CN103902271B CN 103902271 B CN103902271 B CN 103902271B CN 201210581751 A CN201210581751 A CN 201210581751A CN 103902271 B CN103902271 B CN 103902271B
- Authority
- CN
- China
- Prior art keywords
- browser
- client
- interface
- component
- byte
- 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
Landscapes
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
Abstract
The present invention discloses a kind of method for showing window interfaces unified in client and browser, comprises the following steps:S1:In Integrated Simulation developing instrument, the layout and design of window interfaces are carried out according to client software pattern, and generates original interface describing file;S2:According to client software pattern, file is described to the original interface and quote and encapsulates for the first time, generation is available for the interface program collection that client shows and called;S3:Using COM, second is carried out to the original interface file and is encapsulated, generation is available for the component that browser is called;S4:The component generated in step S3 is registered;S5:Component call script is write in a browser, the component generated in step S3 is shown, and realize mutually calling between browser script and component interface.The present invention effectively reduces the complexity of system development, while also including authority checking mechanism in the present invention, can prevent from calling the illegal of program file.
Description
Technical field
The present invention relates to Developing Technology of Applied Software field, more particularly to need compatible " client/server " and " browse
The network application software field of device/server " both of which.
Background technology
The unified method of user interface under " client/server " and " browser/server " both of which is realized at present
Mainly have following two:
1. user is first according to the definition that " client/server " pattern carries out user interface;Then semanteme parsing is passed through
The forms defined are parsed into the XML data of predetermined format by device;Finally by browser interface generation module to the XML data
Parsed, obtain the user interface that browser can be run.
2. user carries out the definition of user interface first in customed environment, the interface unrelated with the form of expression is generated
Logical description data;By Web makers to describing to obtain Web forms after data are parsed, by client maker to description
Data obtain client forms after being parsed.
The technological core of such scheme is customized window interfaces resolver, it mainly realize user's window interfaces and
Mutually conversion and generation between unified interface description language, so as to realize a secondary design of window interfaces, various modes operation;It is main
It is to set up a kind of both sides between two kinds of display patterns of client and browser to may be appreciated description language to want realization approach.
However, there is also some shortcomings in above two solution, including:There may be in client and browser can not be one by one
Corresponding control type, distortion when causing critical transition;Independent development interface forms resolver is needed, it is necessary to when spending a large amount of
Between, and it cannot be guaranteed that support to all controls;And although support both of which is shown, the interface of browser and client
Show form and there is very big difference, user's impression is not also equal.
Therefore, existing client software program can not conveniently and efficiently be transformed into browser and run, increasingly severe
Ground governs the lifting experienced to system user and the reduction to system maintenance work amount.How look & feel is being kept not
Become and ensure between interface and container it is necessary interact on the premise of realize that the window interfaces of browser and client are shared, into
The key factor changed for client software to browser.
The content of the invention
It is an object of the invention to solve perfect compatible not asking between client software and browser in the prior art
There is provided a kind of method for showing window interfaces unified in client and browser for topic.
For up to above-mentioned purpose, the present invention proposes a kind of method for showing window interfaces unified in client and browser,
Comprise the following steps:
S1:In Integrated Simulation developing instrument, the layout and design of window interfaces are carried out according to client software pattern, and
Generation original interface describes file;
S2:According to client software pattern, file is described to the original interface and quote and encapsulates for the first time, generation
It is available for the interface program collection that client shows and called;
S3:Using COM, second is carried out to the original interface file and is encapsulated, generation is available for browsing
The component that device is called;
S4:The component generated in step S3 is registered;
S5:Component call script is write in a browser, and the component generated in step S3 is shown, and realization is browsed
Mutually calling between device script and component interface.
The method for showing window interfaces unified in client and browser proposed by the present invention, wherein, in step S3
The AES encryption algorithm with reference to the dynamic check factor is taken in second of encapsulation.
The method for showing window interfaces unified in client and browser proposed by the present invention, wherein, the AES encryption
The generating process of authority checking information is as follows in algorithm:
A1:The byte arrays sequence that callee setting is authorized;
A2:MD5 Hash is carried out to the byte arrays sequence, 16 byte hashed values are obtained;
A3:Base64 codings are carried out to the 16 byte hashed value, 24 byte characters are obtained, then to 24 byte character
Carry out Unicode codings and obtain 48 byte arrays;
A4:Using 32 bytes before 48 byte arrays as the key of aes algorithm, rear 16 word of 48 byte arrays
Save the initialization vector as aes algorithm;
A5:Current system time clock is obtained, AES encryption is carried out to clock character string, so that authorized checking information.
The method for showing window interfaces unified in client and browser proposed by the present invention, wherein, the AES encryption
The confirmation process of authority checking information is as follows in algorithm:
B1:Above-mentioned A1-A4 steps are performed successively;
B2:Authority checking information to reception carries out AES decryption;
B3:If the time difference of the clock and system present clock after successful decryption, and decryption is in the range of setting, then table
Show that authority checking passes through;Otherwise authority checking failure is represented.
Compared with prior art, the beneficial effects of the present invention are:
(1) present invention has carried out secondary utilization, i.e., using the mode of encapsulation, rather than resolver to original interface description
Development amount is reduced, the reliability of interface description data is also ensure that.
(2) present invention utilizes COM, it is ensured that client and browser median surface display styles and use
The complete unity of family impression, it also avoid control distortion.
(3) present invention reduces The Component Object Model and browser to the full extent using the design pattern towards interface
Call the coupling between script.Adjust interface by counter, browser can securing component object model in real time internal state.
(4) present invention uses dynamic factor authentication mechanism, it is ensured that original interface describes the security of file, to unauthorized
Secondary encapsulation keep outside of the door.
Brief description of the drawings
Fig. 1 is building-block of logic of the invention;
Fig. 2 is that the original interface in the specific embodiment of the invention describes file attribute;
Fig. 3 is the client executing interface in the specific embodiment of the invention;
Fig. 4 is that the The Component Object Model attribute in the specific embodiment of the invention is set;
Fig. 5 is the The Component Object Model associated documents in the specific embodiment of the invention;
Fig. 6 is the component registration object model in the specific embodiment of the invention;
Fig. 7 is the browser loaded window interface in the specific embodiment of the invention;
Fig. 8 is the browser execution window interfaces in the specific embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing, just the above-mentioned and other technical characteristic of the present invention and advantage are described further.
The method for showing window interfaces unified in client and browser proposed by the present invention, uses window interfaces
Once write, various modes operation thinking.Using COM, the present invention realizes window interfaces in two kinds of visitors
The unification of the unification of look & feel and user's impression under family end and browser display pattern, it is to avoid draw because display pattern is different
The interface distortion risen, is particularly suitable for needing while supporting two kinds of operational modes of client and browser, or need quick from client
Pattern switching is held to the occasion of browser model.
Fig. 1 is main logic structure chart of the invention.As shown in figure 1, scheme proposed by the present invention is main by original interface
File, client end interface wrapper and the part of browser interface wrapper three composition are described.
Original interface describes file and generated by client software developing instrument, contains the attribute of forms and its intrinsic control
With the information such as event, this document is unrelated with operational mode;
Client end interface wrapper is responsible for original interface describing Document encapsulation into the window that can be called in client software
Body, it increases the entrance of forms execution on the basis of original interface describes file;
Browser interface wrapper is responsible for original interface describing Document encapsulation into the component pair that can be called in browser
As model, its attribute, event and registration class necessary to The Component Object Model is added on the basis of original interface describes file
Not.
According to the method for showing window interfaces unified in client and browser proposed by the present invention, if in computer
Be mounted with the software of client form, it is only necessary to it is additionally mounted and register by browser interface wrapper generate component pair
As model, then corresponding interface can just be called in a browser, and ensure its interface form with it is complete in client software
It is complete consistent, realize and file is described to original interface shared.When original interface, which describes file, to be changed, client software and
Interface meeting synchronized update in browser, realizes a secondary design, the various modes operation at interface.
If being fitted without the software of client form in computer, if desired carry out the display in browser and call,
Then only need to that The Component Object Model of the original interface description file and registration by the generation of browser interface wrapper is installed.
Illustrate that the present invention's implements process below by way of a specific embodiment.
First, construction original interface describes file
By taking Visual Stidio2008 development environments as an example, three attributes (mark is added respectively for window interfaces first
Sign label, a Text Entry textbox and a button button) and an event (button click event button_
Click).Attribute is responsible for display forms status information and receives Event origin;Event is responsible for the interior of attribute (Text Entry)
Appearance is tipped out.
To prevent illegal secondary encapsulation, the accessibility rank of forms default constructor can be set to internal
(internal), it can be only called inside this procedure set.Simultaneously for the secondary envelope of mandate outside support program collection
The requirement of dress is, it is necessary to increase the public constructed fuction with authority checking information for forms.
Original interface describes file and generated by client software developing instrument, contains the attribute of forms and its intrinsic control
With the information such as event, this document is unrelated with operational mode.
2nd, client is encapsulated
The window interfaces described followed by client end interface wrapper to above-mentioned original interface in file are packaged.
Client end interface wrapper is responsible for original interface describing Document encapsulation into the forms that can be called in client software, and it is in original
Increase the entrance that forms are performed on the basis of beginning interface description file, for example:Forms are initialized when main program is performed
And display.
Assembly file ClassLibrary.dll is generated after program compiling, file attribute information is as shown in Figure 2.
Specific method is, newly-built Windows window applications project, and adds to assembly file
ClassLibrary.dll reference.Due to the accessibility rank of forms default constructor is set into internal above, therefore
Need after addition is to the calling of forms, generate the authority checking information of secondary encapsulation, call the secondary encapsulation of forms to construct letter
Number.
After the compiling of application project, the exe programs that can directly run are generated, interface are performed as shown in Figure 3.
The process of wherein generation authority checking information is as follows:
A1:The byte arrays sequence that callee setting is authorized;
A2:MD5 Hash is carried out to the byte arrays sequence, 16 byte hashed values are obtained;
A3:Base64 codings are carried out to the 16 byte hashed value, 24 byte characters are obtained, then to 24 byte character
Carry out Unicode codings and obtain 48 byte arrays;
A4:Using 32 bytes before 48 byte arrays as the key of aes algorithm, rear 16 word of 48 byte arrays
Save the initialization vector as aes algorithm;
A5:Current system time clock is obtained, AES encryption is carried out to clock character string, so that authorized checking information.
Meanwhile, the confirmation process of authority checking information is as follows:
B1:Above-mentioned A1-A4 steps are performed successively;
B2:Authority checking information to reception carries out AES decryption;
B3:If the time difference of the clock and system present clock after successful decryption, and decryption is in the range of setting, then table
Show that authority checking passes through;Otherwise authority checking failure is represented.
3rd, browser interface is encapsulated
Browser interface encapsulation, formation component object model are carried out to above-mentioned forms by browser interface wrapper.
Browser interface wrapper is responsible for original interface describing Document encapsulation into the component pair that can be called in browser
As model, its attribute, event and registration class necessary to The Component Object Model is added on the basis of original interface describes file
Not.
Specific method is that class libraries is packaged into The Component Object Model, to reach by grassroot project class libraries ActiveX to realize
The purpose called in a browser, need to be selected " interoperate and register for COM ", as shown in Figure 4 in item attribute setting.
Wherein, in browser to The Component Object Model call be by the common interface of component definition carry out, it is necessary to
Two common interfaces are stated for The Component Object Model:Window interfaces initialization display interface StartShow () and form properties are assigned
It is worth interface PropertyName.
In addition, in order in component registration can unique identification The Component Object Model, it is necessary to specify unique for component
GUID is identified;In order that the dispatch interface of type is disclosed from trend The Component Object Model client, it is necessary to specify the class to be generated
The type of interface is AutoDispatch.
To realize The Component Object Model to the reverse calling of script function in browser, it is necessary to be browsed component
Device script container, is called with realizing to browser script function.Including:By cited system component, define securing component and hold
The interface of device information simultaneously obtains container relevant interface information;Defined, realized to clear by the system component and its interface quoted
Look in device script and specify calling for function name and input parameter value.
Realize the defined common interface for being available for browser to call of The Component Object Model.After the completion of forms are shown, lead to
Reverse calling browser script function is crossed, the current state to browser notification component is realized.
Finally, compile after this project class libraries, obtain assembly file ActiveX.dll and its corresponding supporting paper
ActiveX.tlb, as shown in Figure 5.
4th, component registration object model
The The Component Object Model of generation needs to be registered in current operation system, just can be by the script in browser
Call.Component after registration, can also for browser outside other third party's programs provide and call service.In same command line
RegAsm.exe is run, The Component Object Model is registered in system, as shown in Figure 6.
5th, browser calls registered The Component Object Model
After The Component Object Model is registered to system, by unique GUID identifier lookups and the first of correlation can be carried out
Beginningization.In a browser, The Component Object Model is quoted and initialized using the label specified.The Component Object Model is clear
After device of looking at initialization, it just can carry out method as calling general object and attribute is called.By defined in script and
Declared reverse calling function backCall in component object is realized, the current state of component can be obtained in a browser.
Specifically, after the page is opened by browser, completed by above-mentioned Object labels to The Component Object Model
Initialization.The loading of window interfaces can be achieved by script function StartShow execution.Can by anti-letter of transfer number backCall
To obtain the status information of The Component Object Model.Window interfaces are loaded and run as shown in Figure 7,8.
When browser is closed, unloading and forms circle to The Component Object Model are realized automatically by operating system and browser
The resource release in face.
It is described above to be merely exemplary for the purpose of the present invention, and it is nonrestrictive, and those of ordinary skill in the art understand,
In the case where not departing from the spirit and scope that claims appended below is limited, many modifications can be made, are changed, or wait
Effect, but fall within protection scope of the present invention.
Claims (4)
1. a kind of method for showing window interfaces unified in client and browser, it is characterised in that comprise the following steps:
S1:In Integrated Simulation developing instrument, the layout and design of window interfaces are carried out according to client software pattern, and is generated
Original interface describes file;
S2:According to client software pattern, file is described to the original interface and quote and encapsulates for the first time, generation is available for
The interface program collection that client shows and called;
S3:Using COM, file is described to the original interface and carries out second of encapsulation, generation is available for browsing
The component that device is called;
S4:The component generated in step S3 is registered;
S5:Component call script is write in a browser, the component generated in step S3 is shown, and realize browser pin
This mutually calling between component interface.
2. the method for showing window interfaces unified in client and browser according to claim 1, it is characterised in that
The AES encryption algorithm with reference to the dynamic check factor is taken in second of encapsulation in step S3.
3. the method for showing window interfaces unified in client and browser according to claim 2, it is characterised in that
The generating process of authority checking information is as follows in the AES encryption algorithm:
A1:The byte arrays sequence that callee setting is authorized;
A2:MD5 Hash is carried out to the byte arrays sequence, 16 byte hashed values are obtained;
A3:Base64 codings are carried out to the 16 byte hashed value, 24 byte characters are obtained, then 24 byte character is carried out
Unicode codings obtain 48 byte arrays;
A4:Using 32 bytes before 48 byte arrays as the key of aes algorithm, rear 16 byte of 48 byte arrays is made
For the initialization vector of aes algorithm;
A5:Current system time clock is obtained, AES encryption is carried out to clock character string, so that authorized checking information.
4. the method for showing window interfaces unified in client and browser according to claim 3, it is characterised in that
The confirmation process of authority checking information is as follows in the AES encryption algorithm:
B1:Above-mentioned A1-A4 steps are performed successively;
B2:Authority checking information to reception carries out AES decryption;
B3:If the time difference of the clock and system present clock after successful decryption, and decryption is in the range of setting, then it represents that award
Power is verified;Otherwise authority checking failure is represented.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210581751.8A CN103902271B (en) | 2012-12-27 | 2012-12-27 | The unified method for showing window interfaces in client and browser |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210581751.8A CN103902271B (en) | 2012-12-27 | 2012-12-27 | The unified method for showing window interfaces in client and browser |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103902271A CN103902271A (en) | 2014-07-02 |
CN103902271B true CN103902271B (en) | 2017-10-17 |
Family
ID=50993615
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210581751.8A Active CN103902271B (en) | 2012-12-27 | 2012-12-27 | The unified method for showing window interfaces in client and browser |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103902271B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106293658B (en) * | 2015-05-20 | 2020-11-27 | 腾讯科技(深圳)有限公司 | Interface component generation method and equipment |
CN107025124B (en) * | 2015-06-24 | 2021-02-19 | 上海信联信息发展股份有限公司 | System architecture for developing single-machine software by web page technology |
CN105610774B (en) * | 2015-09-17 | 2018-11-20 | 成都索贝数码科技股份有限公司 | A kind of network safety system and secure box based on Encryption Algorithm |
CN112732818B (en) * | 2021-01-19 | 2022-08-30 | 坤昱(山东)健康科技有限公司 | C/S system-based docking method, device, medium and equipment |
CN115118704A (en) * | 2022-05-18 | 2022-09-27 | 青岛国实科技集团有限公司 | Method for realizing function linkage of same platform heterogeneous system in marine application |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6920461B2 (en) * | 2001-07-10 | 2005-07-19 | Microsoft Corp. | Application program interface for network software platform |
CN1696896A (en) * | 2004-05-10 | 2005-11-16 | 华为技术有限公司 | Method and system for unifying users'interface |
CN1983958A (en) * | 2006-04-23 | 2007-06-20 | 华为技术有限公司 | Method for generating two set of network administration systems |
CN101996093A (en) * | 2009-08-10 | 2011-03-30 | 日电(中国)有限公司 | Method and system for converting desktop application to network application |
-
2012
- 2012-12-27 CN CN201210581751.8A patent/CN103902271B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6920461B2 (en) * | 2001-07-10 | 2005-07-19 | Microsoft Corp. | Application program interface for network software platform |
CN1696896A (en) * | 2004-05-10 | 2005-11-16 | 华为技术有限公司 | Method and system for unifying users'interface |
CN1983958A (en) * | 2006-04-23 | 2007-06-20 | 华为技术有限公司 | Method for generating two set of network administration systems |
CN101996093A (en) * | 2009-08-10 | 2011-03-30 | 日电(中国)有限公司 | Method and system for converting desktop application to network application |
Non-Patent Citations (3)
Title |
---|
C/S到B/S模式转换的技术研究;高慧;《万方数据库》;20110630;全文 * |
利用DLL在UG16.0微机版中构造用户界面;张军波;《计算机工程》;20011231;第46-48页 * |
基于COM与JNI技术的C/S到B/S模式转换的研究;肖敏;《万方数据库》;20060918;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN103902271A (en) | 2014-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103902271B (en) | The unified method for showing window interfaces in client and browser | |
CN104854561B (en) | Application program for application management framework encapsulates | |
CN104714828B (en) | Using installation, operation method and device | |
CN103927163B (en) | Plugin frame processing device and plugin system | |
CN101192216B (en) | Static state page control and WEB server interaction accomplishing method and the WEB server | |
WO2010091623A1 (en) | Apparatus and method for dynamically generating application program interface | |
CN103179166A (en) | Method of providing service in client and the client | |
KR101145476B1 (en) | Method and system for creating and providing a multi-tier networked service | |
JP2016534419A (en) | Computer-aided development of native mobile application code | |
CN108073435A (en) | A kind of multi information integrative display method and system | |
CN110618847A (en) | User interface display method and terminal equipment | |
CN107656750A (en) | Update of plug-in method and device | |
CN104699518A (en) | Multi-purpose meter reading machine adapter based on microkernel plug-in and realization method thereof | |
CN103858097A (en) | Credential provider that encapsulates other credential providers | |
CN107391118A (en) | A kind of Web applications Consumer's Experience plateform system | |
CN116431200A (en) | Configuration method, device, equipment and storage medium for application data configuration information | |
US8972927B2 (en) | Method and system for providing modeled components | |
CN116149639A (en) | Method and device for developing components, electronic equipment and storage medium | |
Goodwill | Pure JSP--Java Server Pages: A Code-Intensive Premium Reference | |
CN102137037A (en) | Webpage block synchronic browsing method based on community platform and system thereof | |
TWI792626B (en) | Method for developing android tv hybrid application | |
CN106775776A (en) | The optimization method and system at a kind of software installation interface | |
Genev | Vnc-interface for java x86-emulator dioscuri | |
Li et al. | Advantages analysis of JSF technology based on J2EE | |
CN104602038A (en) | Method and system for controlling port |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |