CN102480510B - The implementation method of C/S and B/S mixed architecture and device - Google Patents

The implementation method of C/S and B/S mixed architecture and device Download PDF

Info

Publication number
CN102480510B
CN102480510B CN201010574588.3A CN201010574588A CN102480510B CN 102480510 B CN102480510 B CN 102480510B CN 201010574588 A CN201010574588 A CN 201010574588A CN 102480510 B CN102480510 B CN 102480510B
Authority
CN
China
Prior art keywords
list
list items
access mode
access
client
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
CN201010574588.3A
Other languages
Chinese (zh)
Other versions
CN102480510A (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.)
Hanwang Technology Co Ltd
Original Assignee
Hanwang Technology 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 Hanwang Technology Co Ltd filed Critical Hanwang Technology Co Ltd
Priority to CN201010574588.3A priority Critical patent/CN102480510B/en
Publication of CN102480510A publication Critical patent/CN102480510A/en
Application granted granted Critical
Publication of CN102480510B publication Critical patent/CN102480510B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a kind of implementation method and device of C/S and B/S mixed architecture, relate to computer application field, can automatically switch between C/S architecture mode and B/S architecture mode.The method comprises: set up C/S model client and B/S pattern client, the access mode of list is set, if list access mode is C/S model, then by extending mark language access services device, if list access mode is B/S pattern, then by browser access server; During browser access server, if the list items of list is accessed, then judge its access mode; When access mode is B/S pattern, by browser access server; Otherwise by extending mark language access services device.Be mainly used in software architecture.

Description

The implementation method of C/S and B/S mixed architecture and device
Technical field
The present invention relates to computer application field, particularly relate to implementation method and the device of C/S and B/S mixed architecture.
Background technology
The front end of C/S (Client/Server, client/server) architecture mode is client computer, and rear end is server, and client computer receives the request of user, and data are submitted to client, and data carry out calculating and result being presented to user by client.
The advantage of C/S architecture mode is the ability that can give full play to client PC, and server service data load is comparatively light, and the storage management function of data is comparatively transparent, but investment is large, and maintenance cost is high.
B/S (Browser/Server, browser/server) architecture mode does not need to install client software, on the browser that it operates in client.Browser is just as the instrument of data access, and under B/S architecture mode, browser processes any service logic hardly, and all service logics all complete at server end.The nearly all business data processing of server assumes.
B/S architecture mode has unified client, the core of functional realiey is focused on server, simplify the exploitation of system, maintenance and use procedure, and simplify client computer load, alleviate cost and the workload of system maintenance and upgrading, but the poor safety performance of database, application server service data load is heavier.
In order to adapt to the processing demands of different pieces of information, have developed the software systems based on C/S and B/S mixed architecture mode.But, based on the software systems of C/S and B/S mixed architecture mode in prior art, when processing different pieces of information, according to actual conditions application C/S architecture mode or B/S architecture mode, can not automatically according to demand can not switch between C/S architecture mode and B/S architecture mode.
Summary of the invention
Technical problem to be solved by this invention is to provide a kind of implementation method and device of C/S and B/S mixed architecture, can automatically switch between C/S architecture mode and B/S architecture mode.
For achieving the above object, embodiments of the invention adopt following technical scheme:
An implementation method for C/S and B/S mixed architecture, comprising:
Set up C/S model client and B/S pattern client;
The access mode of each list in C/S model client and B/S pattern client is set;
When described list is accessed, if the access mode of described list is C/S model, then by extending mark language access services device; If the access mode of described list is B/S pattern, then by browser access server;
During browser access server, if the list items in described list is accessed, then judge the access mode of described list items according to the default feature of described list items; When the access mode of described list items is B/S pattern, by browser access server; Otherwise by extending mark language access services device.
The invention also discloses a kind of implement device of C/S and B/S mixed architecture, comprising:
Set up unit, for setting up C/S model client and B/S pattern client;
Setting unit, for arranging the access mode of each list in C/S model client and B/S pattern client;
First addressed location, when described list is accessed, if the access mode of described list is C/S model, then by extending mark language access services device; If the access mode of described list is B/S pattern, then by browser access server;
Second addressed location, during browser access server, if the list items in described list is accessed, then judges the access mode of described list items according to the default feature of described list items; When the access mode of described list items is B/S pattern, by browser access server; Otherwise by extending mark language access services device.
The implementation method of C/S and B/S mixed architecture disclosed in this invention and device, establish C/S model client and B/S pattern client, and as required the access module of list is set, the access mode of the list items under B/S access module is also set as required simultaneously, make user when accessing list or list items, remove access services device according to corresponding access mode as required, automatically switch between C/S architecture mode and B/S architecture mode.Reduce the complexity of system architecture, facilitate maintenance and the deployment of system.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required for embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of the implementation method of C/S and B/S mixed architecture in the embodiment of the present invention;
Fig. 2 is the structure chart of the implement device of C/S and B/S mixed architecture in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiments provide a kind of implementation method of C/S and B/S mixed architecture, as shown in Figure 1, comprise the following steps:
101, first software systems set up C/S model client and B/S pattern client.
C/S model can give full play to the disposal ability of client rs PC, and a lot of work can submit to server again after client process, so the response speed of C/S model client is than very fast.
B/S pattern belongs to a kind of " thin " client, most of or main service logic is all present in server end, therefore, the system of B/S pattern does not need to install client software, on the browser that it operates in client, system upgrade or safeguard and only need update server end software, simplifies client computer load, alleviate cost and the workload of system maintenance and upgrading, reduce the overall cost of user.
Software systems in the present embodiment set up C/S model client and B/S pattern client simultaneously, can support C/S model, also can support B/S pattern.
102, the access mode of each list in C/S model client and B/S pattern client is set.
Consider the content of operation of different list in software systems, by all list classification of software systems.
For requiring the list possessing the features such as fail safe is higher, interactivity is comparatively strong, deal with data amount is large, its access mode is arranged to C/S model; The list frequent for function variation, security requirement is not high, interactivity requirements is not high, is arranged to B/S pattern by its access mode.
In the present embodiment, the access mode of each list items in list is in like manner set, the access mode of each list items in list is set to C/S model or B/S pattern respectively.
103, when the list of software systems is accessed, judge that the access mode pre-set of this list is C/S model or B/S pattern.When the access mode of described list is C/S model, perform step 103a; When the access mode of described list is B/S pattern, perform step 103b.
103a, software systems with the HTML (Hypertext Markup Language) of extending mark language for data transmit communications protocol access services device.
If the access mode of accessed list is C/S model, software systems are with the mode access services device of HTTP+XML.Namely software systems are with extending mark language (ExtensibleMarkupLanguage, XML) HTML (Hypertext Markup Language) (HyperTextTransferProtocol, HTTP) be the communications protocol that data are transmitted, reading and writing data is carried out to background server.
103b, software systems are by browser access server.
If the access mode of accessed list is B/S pattern, software systems allow browser by URL (Uniform/UniversalResourceLocator, URL(uniform resource locator)) access services device in the mode of HTTP+HTML.
Browser proposes the requirement of accessing database to web server with hypertext form, web server accepts client-requested, and this request is converted into SQL statement, afterwards this SQL statement is transmitted to database server, the legitimacy of database server to the client-requested received is verified, after demonstrating the legitimacy of this request, carry out corresponding data process.
Result is returned to web server by database server, and the result obtained is changed into html document form by web server, is transmitted to client browser and shows with web page form.
104, when the access mode of list is B/S pattern, if the list items of list is accessed, according to the default feature of list items, software systems judge that the access mode of this list items is C/S model or B/S pattern.When the access mode of described list items is B/S pattern, perform step 104a; When the access mode of described list items is C/S model, perform step 104b.
As an embodiment of the present embodiment, " presetting feature " in this step can be the URL address of list items.This concrete step can comprise:
1. the URL of list items compares with the first preset characters string and the second preset characters string by software systems respectively.
" the first preset characters string " and " the second preset characters string " in this step can set in advance as required.Such as the first preset characters string is preset as: abcdg, and the second preset characters string is preset as: MNOPQ.
2. software systems judge whether comprise the first preset characters string abcdg or the second preset characters string MNOPQ in the URL of list items, comprise described first preset characters string abcdg in the URL of described list items and represent that the access mode of described list items is C/S model, comprise described second preset characters string MNOPQ in the URL of described list items and represent that the access mode of described list items is B/S pattern.
104a, software systems are by browser access server.
104b, software systems with the HTML (Hypertext Markup Language) of extending mark language for data transmit communications protocol access services device.
The implementation method of C/S and the B/S mixed architecture that the present embodiment provides, establish C/S model client and B/S pattern client, and as required the access module of list is set, the access mode of the list items under B/S access module is also set as required simultaneously, make user when accessing list or list items, remove access services device according to corresponding access mode as required, automatically switch between C/S architecture mode and B/S architecture mode.Reduce the complexity of system architecture, facilitate maintenance and the deployment of system.
As an embodiment of the present embodiment, before the flow process of the present embodiment starts, as shown in phantom in Figure 1, the client software interior encapsulation browse controls of step 105, software systems is also comprised.
User terminal is provided with client software, and this client software, by local area network (LAN) or broadband the Internet connection server, is packaged with browse controls in this client software.
Embodiments provide a kind of implement device of C/S and B/S mixed architecture, as shown in Figure 2, comprising: set up unit 21, setting unit 22, first addressed location 23, second addressed location 24.
Wherein, set up unit 21 and set up C/S model client and B/S pattern client, setting unit 22 arranges the access mode of each list in C/S model client and B/S pattern client.
When described list is accessed, if the access mode of described list is C/S model, then the first addressed location 23 is by extending mark language access services device, namely with the HTML (Hypertext Markup Language) of extending mark language for data transmit communications protocol access services device; If the access mode of described list is B/S pattern, then the first addressed location 23 is by browser access server.
In the present embodiment, setting unit 22 in like manner arranges the access mode of each list items in list, and the access mode of each list items in list is set to C/S model or B/S pattern respectively.
During browser access server, if the list items in described list is accessed, then the second addressed location 24 judges the access mode of described list items according to the default feature of described list items; When the access mode of described list items is B/S pattern, by browser access server; Otherwise the second addressed location 24 is by extending mark language access services device, namely with the HTML (Hypertext Markup Language) of extending mark language for data transmit communications protocol access services device.
The implement device of C/S and the B/S mixed architecture that the present embodiment provides, establish C/S model client and B/S pattern client, and as required the access module of list is set, the access mode of the list items under B/S access module is also set as required simultaneously, make user when accessing list or list items, remove access services device according to corresponding access mode as required, automatically switch between C/S architecture mode and B/S architecture mode.Reduce the complexity of system architecture, facilitate maintenance and the deployment of system.
As an embodiment of the present embodiment, as shown in the dotted portion in Fig. 2, the second addressed location 24 can comprise: comparison module 241 and judge module 242.
Default feature in the present embodiment can be the URL address of list items, according to the URL of described list items, the second judging unit judges that the access mode of described list items is C/S model or B/S pattern.Concrete, comprising:
The URL of described list items compares with the first preset characters string and the second preset characters string by comparison module 241 respectively; Judge module 242 judges whether comprise described first preset characters string or described second preset characters string in the URL of described list items, comprise described first preset characters string list in the URL of described list items and show that the access mode of described list items is C/S model, comprise described second preset characters string list in the URL of described list items and show that the access mode of described list items is B/S pattern.
As the another kind of execution mode of the present embodiment, as shown in the dotted portion in Fig. 2, the implement device of C/S and the B/S mixed architecture in the present embodiment also comprises the encapsulation unit 25 for encapsulating browser control part.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required common hardware by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in the storage medium that can read, as the floppy disk of computer, hard disk or CD etc., comprise some instructions and perform method described in each embodiment of the present invention in order to make a computer equipment (can be personal computer, server, or the network equipment etc.).
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should described be as the criterion with the protection range of claim.

Claims (4)

1. an implementation method for C/S and B/S mixed architecture, is characterized in that, comprising:
Set up C/S model client and B/S pattern client;
The access mode of each list in C/S model client and B/S pattern client is set, and the access mode of each list items in described list is set, the access mode of the described each list items arranged in described list comprises: the access mode of each list items in described list is set to C/S model or B/S pattern respectively;
When described list is accessed, if the access mode of described list is C/S model, then by the HTML (Hypertext Markup Language) access services device of extending mark language; If the access mode of described list is B/S pattern, then by browser access server;
During browser access server, if the list items in described list is accessed, then judge the access mode of described list items according to the URL of described list items; When the access mode of described list items is B/S pattern, by browser access server; Otherwise by the HTML (Hypertext Markup Language) access services device of extending mark language;
Wherein, the described URL according to described list items judges that the access mode of described list items comprises: compared with the first preset characters string and the second preset characters string respectively by the URL of described list items;
Judge in the URL of described list items, whether to comprise described first preset characters string or described second preset characters string, comprise described first preset characters string list in the URL of described list items and show that the access mode of described list items is C/S model, comprise described second preset characters string list in the URL of described list items and show that the access mode of described list items is B/S pattern.
2. the implementation method of C/S and B/S mixed architecture according to claim 1, is characterized in that, described set up C/S model client and B/S pattern client before, described method also comprises:
Browse controls in encapsulation client.
3. an implement device for C/S and B/S mixed architecture, is characterized in that, comprising:
Set up unit, for setting up C/S model client and B/S pattern client;
Setting unit, for arranging the access mode of each list in C/S model client and B/S pattern client, and for arranging the access mode of each list items in described list, the access mode of the described each list items arranged in described list comprises: the access mode of each list items in described list is set to C/S model or B/S pattern respectively;
First addressed location, when described list is accessed, if the access mode of described list is C/S model, then by the HTML (Hypertext Markup Language) access services device of extending mark language; If the access mode of described list is B/S pattern, then by browser access server;
Second addressed location, during browser access server, if the list items in described list is accessed, then judges the access mode of described list items according to the URL of described list items; When the access mode of described list items is B/S pattern, by browser access server; Otherwise by the HTML (Hypertext Markup Language) access services device of extending mark language;
Wherein, described second addressed location comprises:
Comparison module, for comparing the URL of described list items with the first preset characters string and the second preset characters string respectively;
Judge module, for judge described list items URL in whether comprise described first preset characters string or described second preset characters string, comprise described first preset characters string list in the URL of described list items and show that the access mode of described list items is C/S model, comprise described second preset characters string list in the URL of described list items and show that the access mode of described list items is B/S pattern.
4. the implement device of C/S and B/S mixed architecture according to claim 3, is characterized in that, described device also comprises:
Encapsulation unit, for encapsulating the browse controls in client.
CN201010574588.3A 2010-11-30 2010-11-30 The implementation method of C/S and B/S mixed architecture and device Active CN102480510B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010574588.3A CN102480510B (en) 2010-11-30 2010-11-30 The implementation method of C/S and B/S mixed architecture and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010574588.3A CN102480510B (en) 2010-11-30 2010-11-30 The implementation method of C/S and B/S mixed architecture and device

Publications (2)

Publication Number Publication Date
CN102480510A CN102480510A (en) 2012-05-30
CN102480510B true CN102480510B (en) 2016-03-23

Family

ID=46092990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010574588.3A Active CN102480510B (en) 2010-11-30 2010-11-30 The implementation method of C/S and B/S mixed architecture and device

Country Status (1)

Country Link
CN (1) CN102480510B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104253788B (en) * 2013-06-26 2019-07-16 腾讯科技(深圳)有限公司 A kind of data processing method, client, page engine and system
CN103679557B (en) * 2013-12-17 2016-09-21 国网宁夏电力公司电力科学研究院 Power system operating mode data management system based on C/S framework and its implementation
CN103778303A (en) * 2014-02-22 2014-05-07 重庆林木森科技工业有限公司 Enterprise information construction designer
CN104572818B (en) * 2014-12-01 2019-06-18 国家电网公司 The method of lossless formula multisystem data integration based on http protocol
CN105554073A (en) * 2015-12-08 2016-05-04 锐达互动科技股份有限公司 Method for realizing centralized management control of hardware equipment through combination of CS framework and BS framework
CN109413181A (en) * 2018-10-28 2019-03-01 广州中元软件有限公司 A kind of double architecture mode methods for realizing application program
CN111327866A (en) * 2018-12-13 2020-06-23 北京计算机技术及应用研究所 Combined interrogation method combining video and instant messaging
CN112882481A (en) * 2021-04-28 2021-06-01 北京邮电大学 Mobile multi-mode interactive navigation robot system based on SLAM
CN113487291A (en) * 2021-07-23 2021-10-08 成都航盛智行科技有限公司 Automatic project quality monitoring system
CN113657949A (en) * 2021-08-19 2021-11-16 福建博思软件股份有限公司 Hybrid architecture bill client implementation method and terminal
CN115118704A (en) * 2022-05-18 2022-09-27 青岛国实科技集团有限公司 Method for realizing function linkage of same platform heterogeneous system in marine application

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1921484A (en) * 2006-09-14 2007-02-28 南京中兴软创软件有限公司 User terminal/server framework based on browser
CN101267441A (en) * 2008-04-23 2008-09-17 北京航空航天大学 A realization method and platform for C/S and B/S mixed architecture mode

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1921484A (en) * 2006-09-14 2007-02-28 南京中兴软创软件有限公司 User terminal/server framework based on browser
CN101267441A (en) * 2008-04-23 2008-09-17 北京航空航天大学 A realization method and platform for C/S and B/S mixed architecture mode

Also Published As

Publication number Publication date
CN102480510A (en) 2012-05-30

Similar Documents

Publication Publication Date Title
CN102480510B (en) The implementation method of C/S and B/S mixed architecture and device
CN101388911B (en) Off-line data collecting method for network application program
CN102082992B (en) Mobile office system and implementation method thereof
CN102446222B (en) Method, device and system of webpage content preloading
CN102184266B (en) Method for automatically generating dynamic wireless application protocol (WAP) website for separation of page from data
CN102193933A (en) Method and system for webpage editing
CN101388897A (en) Enterprise portal webpage integration system
EP2021937A2 (en) Techniques to perform gradual upgrades
CN106354700A (en) Page text conversion method and system
CN102291437A (en) System and method for realizing application of cross-platform internet
CN103838558B (en) Website build a station system and method, access website method and webpage adaptation system
CN101150803A (en) Method for micro-browser to process network data, micro-browser and its server
CN101546261A (en) Secure web page tag library system supported by multiple strategies
CN103853743A (en) Distributed system and log query method thereof
CN103685554A (en) Upgrading method, device and system
CN102325183A (en) WEB terminal login method based on single site login mode and system thereof
CN104618412A (en) Page skipping method and device
CN104035937A (en) Extensible system and method for electronic document online browsing
CN103019791A (en) Software deploying method and system
CN103297275A (en) Dynamic discovery and loading system and method for Web network management client module
CN104219080A (en) Method for recording logs of error pages of websites
CN104320482A (en) Bank teller front-end system
CN102523220B (en) Web authentication method, and client and access layer device used for web authentication
CN103747074A (en) Mobile monitoring system on basis of Web server
CN108363760A (en) IETM display datas based on B/S models generate and Off-line control method

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