CN103902271A - Method for unified displaying of form interface in client side and browser - Google Patents

Method for unified displaying of form interface in client side and browser Download PDF

Info

Publication number
CN103902271A
CN103902271A CN201210581751.8A CN201210581751A CN103902271A CN 103902271 A CN103902271 A CN 103902271A CN 201210581751 A CN201210581751 A CN 201210581751A CN 103902271 A CN103902271 A CN 103902271A
Authority
CN
China
Prior art keywords
browser
interface
client
byte
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201210581751.8A
Other languages
Chinese (zh)
Other versions
CN103902271B (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.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN201210581751.8A priority Critical patent/CN103902271B/en
Publication of CN103902271A publication Critical patent/CN103902271A/en
Application granted granted Critical
Publication of CN103902271B publication Critical patent/CN103902271B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for unified displaying of a form interface in a client side and a browser. The method includes the following steps: S1, in an integrated software development tool, planning and designing the form interface according to a software mode of the client side, and generating an original interface description file; S2, according to the software mode of the client side, performing citing and first-time encapsulating on the original interface description file, and generating an interface program set which can be displayed and called by the client side; S3, adopting component object model technology to perform second-time encapsulating on the original interface description file, and generating a component which can be called by the browser; S4, registering the component generated in the S3; S5, compiling a component calling script in the browser, displaying the component generated in the S3, and realizing mutual calling between the browser script and a component interface. By the method, complexity of system development is effectively lowered. An authorization and authentication mechanism is included in the method, so that illegal calling of a program file can be prevented.

Description

The method of unified display window body interface in client and browser
Technical field
The present invention relates to Developing Technology of Applied Software field, particularly need the network application software field of compatibility " client/server " and " browser/server " two kinds of patterns.
Background technology
The unified method of user interface under " client/server " and " browser/server " two kinds of patterns that realizes at present mainly contains following two kinds:
1. first user carries out the definition of user interface according to " client/server " pattern; Then by semantic parser, the forms that define are resolved to the XML data of predetermined format; Finally by browser interface generation module, these XML data are resolved, obtain the user interface that browser can move.
2. first user carries out the definition of user interface in customed environment, generates the interface logic data of description irrelevant with the form of expression; After data of description being resolved by Web maker, obtain Web forms, after by client maker, data of description being resolved, obtain client forms.
The technological core of such scheme is self-defining window interfaces resolver, and it is mainly realized between user's window interfaces and unified interface description language conversion mutually and generates, thereby realizes once design, the various modes operation of window interfaces; Main realization approach is to set up all understandable descriptive languages of a kind of both sides between client and two kinds of display modes of browser.But, in above-mentioned two kinds of solutions, also exist some shortcomings, comprising: in client and browser, may have control type one to one, distortion while causing interface conversion; Need independent development interface forms resolver, need to spend the plenty of time, and can not guarantee the support to all controls; Although and support two kinds of patterns to show, browser and the displaying interface form of client exist very large different, it is also not equal that user experiences.
Therefore, existing client software program cannot facilitate, be transformed in browser and move efficiently, more and more seriously restricting to system user experience lifting and the reduction to system maintenance work amount.How can, keeping look & feel constant and guarantee that the window interfaces of realizing browser and client under prerequisite necessary mutual between interface and container shares, become the key factor that client software is changed to browser.
Summary of the invention
The object of the invention is to solve in prior art between client software and browser cannot perfect compatible problem, provide a kind of in client and browser the method for unified display window body interface.
For reaching above-mentioned purpose, the present invention proposes a kind of method of unifying display window body interface in client and browser, comprises the following steps:
S1: in software Integrated Development Tool, carry out layout and the design of window interfaces according to client software pattern, and generate original interface description file;
S2: according to client software pattern, described original interface description file is quoted and encapsulation for the first time to the interface program collection that generation can show and call for client;
S3: adopt COM, described original interface file is encapsulated for the second time, the assembly that generation can be called for browser;
S4: the assembly generating in step S3 is registered;
S5: write component call script in browser, the assembly generating in step S3 is shown, and realize mutually calling between browser script and component interface.
The method of unified display window body interface in client and browser that the present invention proposes, wherein, described in step S3 taked the AES cryptographic algorithm in conjunction with the dynamic check factor in encapsulation for the second time.
The method of unifying display window body interface in client and browser that the present invention proposes, wherein, in described AES cryptographic algorithm, the generative process of authority checking information is as follows:
A1: callee is set the byte arrays sequence of authorizing;
A2: described byte arrays sequence is carried out to MD5 Hash, obtain 16 byte hashed values;
A3: described 16 byte hashed values are carried out to Base64 coding, obtain 24 byte characters, more described 24 byte characters are carried out to Unicode coding obtain 48 byte arrays;
A4: the key using front 32 bytes of described 48 byte arrays as aes algorithm, rear 16 bytes of described 48 byte arrays are as the initialization vector of aes algorithm;
A5: obtain current system clock, clock character string is carried out to AES encryption, thus authorized authorization information.
The method of unifying display window body interface in client and browser that the present invention proposes, wherein, in described AES cryptographic algorithm, the confirmation process of authority checking information is as follows:
B1: carry out successively above-mentioned A1-A4 step;
B2: the authority checking information receiving is carried out to AES deciphering;
B3: if successful decryption, and the mistiming of clock and system present clock after deciphering in the scope of setting, represent that authority checking passes through; Otherwise represent authority checking failure.
Compared with prior art, beneficial effect of the present invention is:
(1) the present invention adopts encapsulation, rather than the mode of resolver, and original interface description has been carried out to secondary utilization, has reduced development amount, has also guaranteed the reliability of interface description data.
(2) the present invention utilizes COM, has guaranteed the complete unity of client and browser median surface display styles and user's impression, has also avoided control distortion.
(3) the present invention adopts the Design Mode towards interface, has reduced to the full extent the coupling between the Component Object Model and browser invoke script.By anti-transfer mouth, the internal state that browser can Real-time Obtaining the Component Object Model.
(4) the present invention adopts dynamic factor authentication mechanism, has guaranteed the security of original interface description file, and unauthorized secondary encapsulation is kept outside of the door.
Accompanying drawing explanation
Fig. 1 is building-block of logic of the present invention;
Fig. 2 is the original interface description file attribute in the specific embodiment of the invention;
Fig. 3 is the client executing interface in the specific embodiment of the invention;
Fig. 4 is the Component Object Model setup of attribute in the specific embodiment of the invention;
Fig. 5 is 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 above-mentioned technical characterictic and the advantage with other of the present invention is described further.
The method of unified display window body interface in client and browser that the present invention proposes, employing be that window interfaces is once write, the thinking of various modes operation.Utilize COM, the present invention has realized the unification of window interfaces look & feel under two kinds of clients and browser display pattern and the unification of user's impression, avoid because of the different interface distortions that cause of display mode, be particularly suitable for supporting client and two kinds of operational modes of browser simultaneously, or need to be switched to from client mode fast the occasion of browser model.
Fig. 1 is main building-block of logic of the present invention.As shown in Figure 1, the scheme that the present invention proposes is mainly made up of original interface description file, client end interface wrapper and browser interface wrapper three parts.
Original interface description file is generated by client software developing instrument, the information such as attribute and event that has comprised forms and intrinsic control thereof, and this file is irrelevant with operational mode;
Client end interface wrapper is responsible for original interface description file to be packaged into the forms that can call in client software, and it increases the entrance that forms are carried out on the basis of original interface description file;
Browser interface wrapper is responsible for original interface description file to be packaged into the Component Object Model that can call in browser, and it has increased essential attribute, event and the registration classification of the Component Object Model on the basis of original interface description file.
The method of unifying display window body interface in client and browser proposing according to the present invention, if the software of client form has been installed in computing machine, only need to install and register in addition the Component Object Model generating through browser interface wrapper, corresponding interface just can be called in browser, and guarantee in full accord in its interface form and client software, realize sharing original interface description file.In the time that original interface description file is modified, the interface in client software and browser can synchronously be upgraded, and has realized once design, the various modes operation at interface.
If the software of client form is not installed in computing machine, if desired carry out the demonstration in browser and call, the Component Object Model that original interface description file and registration generate through browser interface wrapper only need to be installed.
By a specific embodiment, specific implementation process of the present invention is described below.
One, construct original interface description file
Take Visual Stidio2008 development environment as example, first add respectively three attributes (label label, a text input frame textbox and a button button) and an event (button click event button_Click) for window interfaces.Attribute is responsible for showing forms status information and is received Event origin; Event is responsible for by the content presentation of attribute (text input frame) out.
For preventing illegal secondary encapsulation, the accessibility rank of forms default constructor can be made as to inside (internal), only can call in this procedure set inside.For the requirement of authorizing secondary encapsulation of support program collection outside, need to increase the public constructed fuction with authority checking information for forms simultaneously.
Generator program collection file ClassLibrary.dll after program compilation, file attribute information as shown in Figure 2, original interface description file is generated by client software developing instrument, the information such as attribute and event that has comprised forms and intrinsic control thereof, and this file is irrelevant with operational mode.
Two, client encapsulation
Next by client end interface wrapper, above-mentioned window interfaces is encapsulated.Client end interface wrapper is responsible for original interface description file to be packaged into the forms that can call in client software, it increases the entrance that forms are carried out on the basis of original interface description file, for example: forms are carried out in the time that master routine is carried out to initialization and demonstration.
Concrete grammar is, newly-built Windows window application project, and add quoting assembly file ClassLibrary.dll.Owing to the accessibility rank of forms default constructor being made as to inside above, therefore need to, adding after the calling of forms, generate the authority checking information of secondary encapsulation, call the secondary encapsulation constructed fuction of forms.
After the compiling of application project, the exe program that generation can directly move, carries out interface as shown in Figure 3.
The process that wherein generates authority checking information is as follows:
A1: callee is set the byte arrays sequence of authorizing;
A2: described byte arrays sequence is carried out to MD5 Hash, obtain 16 byte hashed values;
A3: described 16 byte hashed values are carried out to Base64 coding, obtain 24 byte characters, more described 24 byte characters are carried out to Unicode coding obtain 48 byte arrays;
A4: the key using front 32 bytes of described 48 byte arrays as aes algorithm, rear 16 bytes of described 48 byte arrays are as the initialization vector of aes algorithm;
A5: obtain current system clock, clock character string is carried out to AES encryption, thus authorized authorization information.
The confirmation process of authority checking information meanwhile, is as follows:
B1: carry out successively above-mentioned A1-A4 step;
B2: the authority checking information receiving is carried out to AES deciphering;
B3: if successful decryption, and the mistiming of clock and system present clock after deciphering in the scope of setting, represent that authority checking passes through; Otherwise represent authority checking failure.
Three, browser interface encapsulation
By browser interface wrapper, above-mentioned forms are carried out to browser interface encapsulation, formation component object model.
Browser interface wrapper is responsible for original interface description file to be packaged into the Component Object Model that can call in browser, and it has increased essential attribute, event and the registration classification of the Component Object Model on the basis of original interface description file.
Concrete grammar is that new project class libraries ActiveX, is packaged into the Component Object Model for realizing by class libraries, to reach the object of calling in browser, need middle selection " for the registration of COM interoperability " be set at item attribute, as shown in Figure 4.
Wherein, in browser, being to be undertaken by the common interface of component definition to calling of the Component Object Model, need to be the Component Object Model statement two common interfaces: window interfaces initialization display interface StartShow () and form properties assignment interface PropertyName.
In addition, for can unique recognizer component object model when the component registration, need to specify unique GUID mark for assembly; In order to make the dispatch interface of type open from trend the Component Object Model client, needing to specify the type of the class interface that will generate is AutoDispatch.
For realizing the reverse calling of the Component Object Model to script function in browser, need to make assembly can obtain browser script container, to realize calling browser script function.Comprise: system component by reference, the interface of definition securing component information of container is also obtained container relevant interface information; By system component and the interface definition thereof quoted, realize specifying calling of function name and input parameter value in browser script.
Realize the defined common interface calling for browser of the Component Object Model.After forms have shown, by reverse calling browser script function, realize the current state to browser notification component.
Finally, compile after this project class libraries, obtain assembly file ActiveX.dll and corresponding supporting paper ActiveX.tlb thereof, as shown in Figure 5.
Four, component registration object model
The Component Object Model generating need to be registered in current operation system, and the script in just can viewed device calls.Assembly after registration, can also provide the service of calling for other third party's program outside browser.In system command is capable, move RegAsm.exe, the Component Object Model is registered in system, as shown in Figure 6.
Five, browser calls registered the Component Object Model
After the Component Object Model is registered to system, can identify the initialization of searching the line correlation of going forward side by side by unique GUID.In browser, use the label of specifying to quote and initialization the Component Object Model.After the viewed device initialization of the Component Object Model, just can as calling general object, carry out method and attribute calls.By defining and realizing declared reverse calling function backCall in component object, can in browser, obtain the current state of assembly in script.
Particularly, after the viewed device of the page is opened, complete the initialization to the Component Object Model by above-mentioned Object label.Can realize the loading of window interfaces by the execution of script function StartShow.Count backCall and can obtain the status information of the Component Object Model by anti-letter of transfer.Window interfaces loads and moves as shown in Figure 7,8.
In the time that browser cuts out, automatically realize unloading to the Component Object Model and the resource of window interfaces discharges by operating system and browser.
More than explanation is just illustrative for the purpose of the present invention, and nonrestrictive, those of ordinary skills understand; in the case of not departing from the spirit and scope that following claims limit, can make many modifications, change; or equivalence, but all will fall within the scope of protection of the present invention.

Claims (4)

1. a method for unified display window body interface in client and browser, is characterized in that, comprises the following steps:
S1: in software Integrated Development Tool, carry out layout and the design of window interfaces according to client software pattern, and generate original interface description file;
S2: according to client software pattern, described original interface description file is quoted and encapsulation for the first time to the interface program collection that generation can show and call for client;
S3: adopt COM, described original interface file is encapsulated for the second time, the assembly that generation can be called for browser;
S4: the assembly generating in step S3 is registered;
S5: write component call script in browser, the assembly generating in step S3 is shown, and realize mutually calling between browser script and component interface.
According to claim 1 in client and browser the method for unified display window body interface, it is characterized in that, described in step S3 taked the AES cryptographic algorithm in conjunction with the dynamic check factor in encapsulation for the second time.
3. the method for unifying display window body interface in client and browser according to claim 2, is characterized in that, in described AES cryptographic algorithm, the generative process of authority checking information is as follows:
A1: callee is set the byte arrays sequence of authorizing;
A2: described byte arrays sequence is carried out to MD5 Hash, obtain 16 byte hashed values;
A3: described 16 byte hashed values are carried out to Base64 coding, obtain 24 byte characters, more described 24 byte characters are carried out to Unicode coding obtain 48 byte arrays;
A4: the key using front 32 bytes of described 48 byte arrays as aes algorithm, rear 16 bytes of described 48 byte arrays are as the initialization vector of aes algorithm;
A5: obtain current system clock, clock character string is carried out to AES encryption, thus authorized authorization information.
4. the method for unifying display window body interface in client and browser according to claim 3, is characterized in that, in described AES cryptographic algorithm, the confirmation process of authority checking information is as follows:
B1: carry out successively above-mentioned A1-A4 step;
B2: the authority checking information receiving is carried out to AES deciphering;
B3: if successful decryption, and the mistiming of clock and system present clock after deciphering in the scope of setting, represent that authority checking passes through; Otherwise represent authority checking failure.
CN201210581751.8A 2012-12-27 2012-12-27 The unified method for showing window interfaces in client and browser Active CN103902271B (en)

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 true CN103902271A (en) 2014-07-02
CN103902271B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105610774A (en) * 2015-09-17 2016-05-25 成都索贝数码科技股份有限公司 Network safety system based on encryption algorithm and safety box
CN106293658A (en) * 2015-05-20 2017-01-04 腾讯科技(深圳)有限公司 A kind of interface assembly generates method and equipment thereof
CN107025124A (en) * 2015-06-24 2017-08-08 上海中信信息发展股份有限公司 Web technologies develop the system architecture of desktop
CN112732818A (en) * 2021-01-19 2021-04-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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
张军波: "利用DLL在UG16.0微机版中构造用户界面", 《计算机工程》 *
肖敏: "基于COM与JNI技术的C/S到B/S模式转换的研究", 《万方数据库》 *
高慧: "C/S到B/S模式转换的技术研究", 《万方数据库》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293658A (en) * 2015-05-20 2017-01-04 腾讯科技(深圳)有限公司 A kind of interface assembly generates method and equipment thereof
CN106293658B (en) * 2015-05-20 2020-11-27 腾讯科技(深圳)有限公司 Interface component generation method and equipment
CN107025124A (en) * 2015-06-24 2017-08-08 上海中信信息发展股份有限公司 Web technologies develop the system architecture of desktop
CN105610774A (en) * 2015-09-17 2016-05-25 成都索贝数码科技股份有限公司 Network safety system based on encryption algorithm and safety box
CN112732818A (en) * 2021-01-19 2021-04-30 坤昱(山东)健康科技有限公司 C/S system-based docking method, device, medium and equipment
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

Also Published As

Publication number Publication date
CN103902271B (en) 2017-10-17

Similar Documents

Publication Publication Date Title
CN110825362B (en) Low-code application software development system and method
CN104854561B (en) Application program for application management framework encapsulates
CN101192216B (en) Static state page control and WEB server interaction accomplishing method and the WEB server
EP2530583B1 (en) Computer-implemented method, system and computer program product for displaying a user interface component
US7565647B2 (en) Markup compiler that outputs MIDlets
CN103902271A (en) Method for unified displaying of form interface in client side and browser
CN110069246A (en) The plateform system and its application that a kind of Java Web application is quickly developed
WO2019091016A1 (en) Method and device for customizing data acquisition toolkit, terminal, and storage medium
CN105512304A (en) Method for generating internet applications on line, system integration method and supporting platform
JP2016534419A (en) Computer-aided development of native mobile application code
CN103179166A (en) Method of providing service in client and the client
CN107092473A (en) Desktop application development approach and equipment
CN108681470A (en) A kind of configuration of automotive electronics basic software and code generating system based on WEB technologies
WO2023103712A1 (en) Ecu upgrade method and device, and readable storage medium
CN104699518A (en) Multi-purpose meter reading machine adapter based on microkernel plug-in and realization method thereof
Darvas et al. PLCverif re-engineered: An open platform for the formal analysis of PLC programs
CN107391118A (en) A kind of Web applications Consumer's Experience plateform system
CN103593188B (en) System and method for managing what-you-see-is-what-you-get menus of instrument
Di Pierro web2py
CN106502977B (en) A kind of sheet disposal method and form system based on B/S framework
KR20090002032A (en) Executing module for playing ui plug-in in universal web browser, ui plug-in development apparatus and method thereof
Kuhn et al. FAME, a polyglot library for metamodeling at runtime
US11803786B2 (en) Enterprise integration platform
US8972927B2 (en) Method and system for providing modeled components
CN113050927A (en) Permission control method and device based on user-defined instruction and computer equipment

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