CN102214090B - A kind of method and device creating session window - Google Patents

A kind of method and device creating session window Download PDF

Info

Publication number
CN102214090B
CN102214090B CN201010144498.0A CN201010144498A CN102214090B CN 102214090 B CN102214090 B CN 102214090B CN 201010144498 A CN201010144498 A CN 201010144498A CN 102214090 B CN102214090 B CN 102214090B
Authority
CN
China
Prior art keywords
child control
motherboard
child
control
interface portion
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
CN201010144498.0A
Other languages
Chinese (zh)
Other versions
CN102214090A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201010144498.0A priority Critical patent/CN102214090B/en
Publication of CN102214090A publication Critical patent/CN102214090A/en
Application granted granted Critical
Publication of CN102214090B publication Critical patent/CN102214090B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of method and the device that create session window, belong to computer realm.Described method comprises: receive request to create, carry conversation type in described request to create; Create motherboard and obtain script corresponding to described conversation type and describe, described script at least comprises conversation area child control in describing; The each child control described in being described by described script is filled in described motherboard; In described motherboard, register described each child control, make described each child control and described motherboard alternately, described motherboard is pasted onto window and obtains session window, and set up chat channels for described session window.Described device comprises: receiver module, creation module, packing module and Registering modules.The present invention can alleviate the difficulty of exploitation new session window and reduce cost of development.

Description

A kind of method and device creating session window
Technical field
The present invention relates to computer realm, particularly a kind of method and device creating session window.
Background technology
Session window is the important component part of instant communication software.In instant communication software, the basic function of session window is for contact person provides the interface of information interchange.
Wherein, set up a window and editing area is set in this window, then setting up chat channel for this window, just obtaining the session window with basic function.In addition, if need to carry abundant application in session window, then in the session window with basic function, load the plug-in unit realizing application and arrange between each plug-in unit and carry out mutual interaction code.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
If need the part plug-in unit changed in the layout of session window, session window of upgrading or the session window made new advances by the part developing plug revising former session window, then need to revise the interaction code between each plug-in unit in former session window, as this increased development difficulty and cost.
Summary of the invention
In order to development difficulty can be alleviated and reduce cost of development, the invention provides a kind of method and the device that create session window.Described technical scheme is as follows:
Create a method for session window, it is characterized in that, described method comprises:
Receive request to create, in described request to create, carry conversation type;
Create motherboard and obtain script corresponding to described conversation type and describe, described script at least comprises conversation area child control in describing;
The each child control described in being described by described script is filled in described motherboard;
In described motherboard, register described each child control, make described each child control and described motherboard alternately, described motherboard is pasted onto window and obtains session window, and set up chat channels for described session window; Wherein, register in described motherboard described each child control as: in the logical gate of described motherboard, arrange a pointer for each child control, described pointer is used for described motherboard and child control to carry out alternately.
Described each child control by description in described script description is filled in described motherboard, specifically comprises:
Resolving by describing described script, obtaining the mark of described each child control and the layout information of described each child control;
According to the mark of described conversation type and described each child control, obtain interface portion and the logical gate of described each child control;
According to the layout information of described each child control, the interface portion of described each child control is filled in described motherboard, and the interface portion of described each child control and logical gate are bound.
The described mark according to described conversation type and described each child control, obtains interface portion and the logical gate of described each child control, specifically comprises:
According to the mark of described each child control, from the corresponding relation identified with interface portion, search the interface portion of described each child control;
According to the mark of described conversation type and described each child control, from the corresponding relation of mark, conversation type and logical gate, search the logical gate of described each child control.
Described child control comprises interface portion and logical gate, and any two child controls are undertaken by described motherboard alternately.
Described method also comprises:
In described session window, if described motherboard receives event, inquire about each child control in described motherboard, if inquire the child control that can process described event, then described event is met at the child control process of described inquiry.
Create a device for session window, described device comprises:
Receiver module, for receiving request to create, carries conversation type in described request to create;
Creation module, describe for creating motherboard and obtaining script corresponding to described conversation type, described script at least comprises conversation area child control in describing;
Packing module, for being filled in described motherboard by each child control described in described script description;
Registering modules, for registering described each child control in described motherboard, making described each child control and described motherboard alternately, described motherboard being pasted onto window and obtaining session window, and set up chat channels for described session window; Wherein, register in described motherboard described each child control as: in the logical gate of described motherboard, arrange a pointer for each child control, described pointer is used for described motherboard and child control to carry out alternately.
Described packing module specifically comprises:
First acquiring unit, for resolving by describing described script, obtains the mark of described each child control and the layout information of described each child control;
Second acquisition unit, for the mark according to described conversation type and described each child control, obtains interface portion and the logical gate of described each child control;
Filler cells, for the layout information according to described each child control, is filled in the interface portion of described each child control in described motherboard, and binds the interface portion of described each child control and logical gate.
Described second acquisition unit specifically comprises:
First searches subelement, for the mark according to described each child control, searches the interface portion of described each child control from the corresponding relation identified with interface portion;
Second searches subelement, for the mark according to described conversation type and described each child control, searches the logical gate of described each child control from the corresponding relation of mark, conversation type and logical gate.
Described child control comprises interface portion and logical gate, and any two child controls are undertaken by described motherboard alternately.
Described device also comprises:
Enquiry module, in described session window, if described motherboard receives event, inquires about each child control in described motherboard, if inquire the child control that can process described event, then described event is met at the child control process of described inquiry.
By creating motherboard, and each child control described in being described by script is filled in motherboard, by each child control is registered in motherboard, each child control and motherboard are directly handed over mutually, placed by motherboard and obtain session window in the window, wherein, each child control in session window is separate, any two child controls are undertaken alternately by motherboard, can also carry plug-in unit make session window have abundant application by child control.Owing to there is not interaction code between two child controls any in session window, when therefore changing the layout of former session window, do not need to revise the interaction code between each child control; The former session window or develop new session window in former session window if upgraded, as long as then modify to the child control at the part of upgrading or the part place of amendment, and this child control and other child controls separate, so other herid former session window partially, so alleviate development difficulty and reduce cost of development.
Accompanying drawing explanation
Fig. 1 is a kind of method flow diagram creating session window that the embodiment of the present invention 1 provides;
Fig. 2 is a kind of method flow diagram creating session window that the embodiment of the present invention 2 provides;
Fig. 3 is the first motherboard schematic diagram that the embodiment of the present invention 2 provides;
Fig. 4 is the second motherboard schematic diagram that the embodiment of the present invention 2 provides;
Fig. 5 is a kind of method flow diagram creating session window that the embodiment of the present invention 3 provides;
Fig. 6 is a kind of device schematic diagram creating session window that the embodiment of the present invention 4 provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment 1
As shown in Figure 1, the embodiment of the present invention 1 provides a kind of method creating session window, comprising:
Step 101: receive request to create, wherein, carry conversation type in this request to create;
Step 102: create motherboard and obtain script description corresponding to this conversation type, wherein, script at least comprises ChatMsg (conversation area) child control in describing;
Step 103: each child control described in being described by this script is filled in motherboard;
Step 104: making each child control and motherboard mutual by registering each child control in motherboard, motherboard being pasted onto window and obtaining session window, and set up chat channels for session window.
Wherein, any two child controls in motherboard are all separate and cannot direct interaction.ChatMsg has the function realizing editing interface, fills ChatMsg child control in motherboard, and the session window of establishment can be made to have editing interface, and contact person can carry out information interchange in this editing interface.
In embodiments of the present invention, by creating motherboard, and each child control described in being described by script is filled in motherboard, by being registered in motherboard by each child control, each child control and motherboard are directly handed over mutually, then motherboard placement is obtained session window in the window, wherein, each child control in session window is separate, and any two child controls are undertaken alternately by motherboard, can also carry plug-in unit make session window have abundant application by child control.Owing to there is not interaction code between two child controls any in session window, when therefore changing the layout of former session window, do not need to revise the interaction code between each child control; The former session window or develop new session window in former session window if upgraded, as long as then modify to the child control at the part of upgrading or the part place of amendment, and this child control and other child controls separate, so other herid former session window partially, so alleviate development difficulty and reduce cost of development, and making session window have the characteristic of the low coupling of high cohesion.
Embodiment 2
As shown in Figure 2, embodiments provide a kind of method creating session window, comprising:
Step 201: receive session request, wherein, carry conversation type in this session request;
Wherein, session request is caused by external event, and conversation type comprises good friend's type, realm type, discussion group's type or interim conversation type etc.Such as, for the instant communication software for chatting, in the buddy list of the main panel of this instant communication software, user utilizes mouse etc. to double-click the head portrait of certain good friend, and this main panel generates session request and in session request, carries conversation type is good friend's type.Wherein, external event is the head portrait that user double-clicks this good friend.
Step 202: create motherboard, obtain script corresponding to this conversation type according to the conversation type of carrying in session request and describe, wherein, motherboard comprises interface portion and logical gate;
Wherein, motherboard is a control, can fill other child control in motherboard.In the present embodiment, realize interface portion in motherboard and logical gate with the form of object respectively, interface portion provides the profile of session window, the interface portion of a kind of motherboard as shown in Figure 3.
Wherein, technician sets up in advance and stores script description corresponding to often kind of conversation type.In script describes, be given for the control name of each child control of filling motherboard in advance, and in motherboard the layout information of each child control.Therefore, script describes and comprises two parts content: a part is given for the control name of all child controls of filling motherboard, and another part is that the layout information of each child control comprises position, size, gap or base map etc.It can be XML (ExtensibleMarkupLanguage, extend markup language) code that script describes, and exists in the form of an xml-file.The script corresponding to good friend's type in instant communication software as follows describes, and the code that this script describes is:
Above-mentioned script describes six child controls control name in describing is respectively " Profile ", " Toolbar ", " Sidebar ", " Prompt ", " BottomFrame " and " ChatMsg ", and the position of each child control in motherboard is respectively " Top ", " Top ", " Right ", " Top ", " Bottom " and " Fill ".
Wherein, in the present embodiment, technician can according to the requirement of different instant communication software products, arranges the layout of child control for filling motherboard and each child control, thus can meet the individual requirement of instant communication software product in script describes.
Step 203: resolving by describing the script obtained, obtaining the control name of all child controls for filling motherboard, and the layout information of each child control;
Wherein, the basic function due to session window is for contact person provides the interface of information interchange, and therefore, script corresponding to often kind of conversation type describes all exists the ChatMsg child control realizing basic function.
Such as, the control name of each child control that script corresponding to the good friend's type from step 202 obtains for filling motherboard in describing is respectively Profile ", " Toolbar ", " Sidebar ", " Prompt ", " BottomFrame " and " ChatMsg ", and the position of each child control in motherboard is respectively " Top ", " Top ", " Right ", " Top ", " Bottom " and " Fill ".
Step 204: according to each control name obtained, obtain the interface portion of each child control, and utilize the interface portion of each child control to fill motherboard;
Particularly, according to each control name obtained, from the corresponding relation of control name and interface portion, search the interface portion of each child control, according to the layout information of each child control, the interface portion of each child control is filled in motherboard.
Wherein, the order of each child control described in describing with reference to script, is filled in the interface portion of each child control in motherboard successively.In addition, each child control comprises interface portion and logical gate, realizes interface portion and logical gate in the present embodiment with the data structure of object.
Wherein, can the child control of corresponding multiple conversation type for same control name, but the interface portion of each child control is identical and logical gate is different.Such as, for " Profile " child control, " Profile " child control of good friend's type is all identical with the interface portion of " Profile " child control of realm type and logical gate is different.Technician develops an interface portion corresponding to each child control and corresponding one or more logical gates in advance; And interface portion and logical gate are separately stored.Wherein, the corresponding relation of technician's prior storage control name and interface portion is as shown in table 1, and three's corresponding relation of control name, conversation type and logical gate is as shown in table 2.
Table 1
Control name Interface portion
Profile The interface portion of Profile
Sidebar The interface portion of Sidebar
…… ……
Table 2
Control name Conversation type Logical gate
Profile Good friend's type The logical gate of the Profile of good friend's type
Sidebar Good friend's type The logical gate of the Sidebar of good friend's type
Profile Realm type The logical gate of the Profile of realm type
…… …… ……
Wherein, by the interface portion of each child control is filled whole motherboard, make whole motherboard be divided into multiple region, each child control is a region.
Such as, according to control name " Profile ", " Toolbar ", " Sidebar ", " Prompt ", " BottomFrame " and " ChatMsg " from control name as shown in table 1 and interface portion, obtain the interface portion of " Profile " child control, " Toolbar " child control, " Sidebar " child control, " Prompt " child control, " BottomFrame " child control and " ChatMsg " child control respectively; The order of each child control in then describing with reference to script, first according to the position " Top " of " Profile " child control, is filled in the top of motherboard as shown in Figure 3 by the interface portion of " Profile " child control; Then according to the position " Top " of " Toolbar " child control, the interface portion of " Toolbar " child control is filled in the top of the remaining part of motherboard; Again according to the position " Right " of " Sidebar " child control, the interface portion of " Sidebar " child control is filled in the right of the remaining part of motherboard.The interface portion of remaining each child control be filled in motherboard as shown in Figure 3 respectively by above-mentioned identical method, the motherboard after the filling obtained as shown in Figure 4.Wherein, in motherboard as shown in Figure 4, Profile is information data area, and Toolbar is knob district, top, and Sidebar is expansion area, and Prompt is highlight and ChatMsgCtrl is conversation area.
Step 205: according to each control name obtained and the conversation type of carrying, obtain the logical gate of each child control, and the logical gate of each child control is bundled in himself interface portion;
Particularly, according to each control name obtained and the conversation type of carrying, from three's corresponding relation of control name, conversation type and logical gate, search the logical gate of each child control, in motherboard, the logical gate of each child control and the interface portion of himself are bound.
Such as, according to the control name " Profile " obtained, from three's corresponding relation of control name as shown in table 2, conversation type and logical gate, search the logical gate of " Profile " child control, in motherboard as shown in Figure 4, the logical gate of " Profile " child control and interface portion are bound.By above-mentioned identical method, the interface portion of remaining each child control and logical gate are bound.
Wherein, when realizing certain concrete instant communication software product, in order to session window can be made to carry how abundant application, the plug-in unit realizing application is loaded on the child control in motherboard.Wherein, the interface portion of child control can carry the icon etc. of plug-in unit, and the logical gate of child control provides interface function, can carry out alternately with plug-in unit.The interface portion of child control and logical gate are bound together, when just can realize the icon when the plug-in unit of user click interface portion carrying, logical gate and plug-in unit carry out mutual and run plug-in unit.
Step 206: by registering each child control in motherboard, enables each child control and motherboard direct interaction, sets up window, and be placed in the window of foundation by motherboard, obtain session window;
Wherein, the step registering each child control in motherboard is specially: as each child control arranges a pointer in the logical gate of motherboard, and this pointer is used for motherboard and child control carries out alternately.In the present embodiment, each child control in motherboard is independently of each other, and any two child controls cannot directly carry out alternately.If two child controls need interactive information, then one of them child control first carries out interactive information with the logical gate of motherboard, the logical gate of motherboard calls another child control by pointer, then carries out interactive information with another child control, so completes this two child control and carries out interactive information.
Wherein, in the present embodiment, each child control is self-defined control, in motherboard, each child control is separate and cannot direct interaction, and by each child control is registered in motherboard, make each child control can directly and motherboard mutual, and any two child controls are all undertaken by motherboard alternately.
Wherein, because control can not show separately, so the child control of filling in motherboard and motherboard can not show individually, therefore, motherboard must be placed in the window, could show with the form of session window.In addition, in the present embodiment, also can work as after receiving session request and just set up window, so, in this step after having registered each child control at motherboard, directly motherboard is placed in session window.
Step 207: for this session window sets up chat channel, wherein, this session window at least can provide the interface of information interchange for contact person.
Wherein, first set up a Session (session), whole session window is pasted onto in the Session of foundation, sets up chat channel by Session and safeguard chat channel.In addition, Session is also responsible for the information interaction between session window and the main panel of instant communication software.
Further, for instant communication software, owing to can there is multiple session window simultaneously, the corresponding Session of each session window, for the ease of managing each Session, therefore Session manager being set and the new Session set up is registered in this Session manager.
Further, when the motherboard of session window receives certain event, motherboard, according to being registered in self the pointer of each child control, inquires about each child control, if inquire the child control that can process this event, then this event is met at the child control process inquired.
Further, if need to make that there is in session window abundant application, then plug-in unit can be loaded in the child control in session window, make session window carry how abundant application.Such as, need this application of virtual image carrying contact person in session window, then in session window, as long as the virtual image of contact person to be loaded into the interface portion of Sidebar, and carried out alternately with the plug-in unit realizing virtual image by the logical gate of Sidebar.
Wherein, mutually independent due to each child control in session window and cannot direct interaction, so the plug-in unit in any one child control in session window and the plug-in unit in other child controls separate and cannot direct interaction, any two child controls are undertaken alternately by motherboard, so when needing the layout changing session window, as long as the layout of the child control in change session window, and do not need after change layout to modify to the interaction code of plug-in unit each in session window, so reduce cost of development; When upgrading to the session window of certain instant communication software product, only need the child control at the part place to upgrading to modify, other herid former session window partially, so alleviate New function development difficulty and reduce cost of development; When developing another session window on the basis that certain instant communication software produces the session window of mouth, as long as modify to the child control at the part place of amendment, and other herid former session window partially, so alleviate new product development difficulty and reduce cost of development.
Wherein, in instant communication software, multiple session window can be created simultaneously, the conversation type of each session window can not be entirely identical, in the present embodiment, can create a tree for this instant communication software, in this tree, each leaf node is for identifying the session window of establishment; The leaf node that conversation type is all identical has public father node, and this father node is for identifying the conversation type belonging to these leaf nodes; Each node for identifying conversation type has public father node, and this father node is for identifying this instant communication software.Wherein, the data structure of each node in tree can be interface.
Wherein, in the present embodiment, transverse cuts can be carried out to the motherboard created, adopt the mode of layering that motherboard is resolved into presentation layer, logical layer and data communication layer etc., then, carried the interface portion of each child control by presentation layer, data communication layer is responsible for and the transmitting-receiving of conversate message mutual with child control, and logical layer is responsible for presentation layer and data communication layer to couple together.
In embodiments of the present invention, each child control for filling motherboard is set in script describes, and each child control is filled in motherboard, motherboard is placed and obtains session window in the window.Because each child control in session window is separate, the plug-in unit carried in any two child controls is also separate, when therefore changing the layout of former session window, do not need to revise the interaction code between each plug-in unit, in former session window, develop new session window, as long as then modify to the child control at part place of amendment, and other herid former session window partially, so alleviate development difficulty and reduce cost of development, and making session window have the characteristic of the low coupling of high cohesion.
Implement 3
As shown in Figure 5, embodiments provide a kind of method creating session window, comprising:
Step 301: receive request to create, wherein, carry conversation type in this request to create;
Wherein, session request is caused by external event, and conversation type comprises good friend's type, realm type, discussion group's type or interim conversation type etc.Such as, for the instant communication software for chatting, in the buddy list of the main panel of this instant communication software, user utilizes mouse etc. to double-click the head portrait of certain good friend, and this main panel generates session request and in session request, carries conversation type is good friend's type.Wherein, external event is the head portrait that user double-clicks this good friend.
Step 302: create corresponding motherboard according to the conversation type of carrying in request to create, and obtain script description corresponding to this conversation type;
Wherein, technician sets up in advance and stores script description corresponding to often kind of conversation type.The control ID of each child control of filling motherboard is given in advance in script describes, and the layout information of each child control in motherboard.So in the present embodiment, script description comprises two parts content and is respectively: a part is the control ID of each child control for filling motherboard, and another part is that the layout information of each child control comprises position, size, gap or base map etc.The script corresponding to good friend's type in instant communication software as follows describes, and the code that this script describes is:
Above-mentioned script describes six child controls control ID in describing is respectively " ID1 ", " ID2 ", " ID3 ", " ID4 ", " ID5 " and " ID6 ", and the position of each child control in motherboard is respectively " Top ", " Top ", " Right ", " Top ", " Bottom " and " Fill ".In addition, in script describes, at least comprise the child control ChatMsg of the basic function realizing session window.
Step 303: resolving by describing the script obtained, obtaining the ID of each child control for filling motherboard, and the layout information of each child control;
Such as, the control ID of each child control obtained for filling motherboard in the script description that the good friend's type from step 302 is corresponding is respectively " ID1 ", " ID2 ", " ID3 ", " ID4 ", " ID5 " and " ID6 ", and the position of each child control in motherboard is respectively " Top ", " Top ", " Right ", " Top ", " Bottom " and " Fill ".
Step 304: according to each control ID, obtain the interface portion of each child control, and utilize the interface portion of each child control to fill motherboard;
Particularly, according to each control ID obtained, from the corresponding relation of control ID and interface portion, search the interface portion of each child control, according to the layout information of each child control obtained, the interface portion of each child control is filled in the interface portion of motherboard.
Wherein, each child control comprises interface portion and logical gate, and same control ID can the child control of corresponding multiple different sessions type, and the interface portion of each child control is identical and logical gate is different.Technician develops the interface portion of each child control and one or more logical gates of its correspondence in advance.In addition, the corresponding relation of the logical gate of the prior storage control ID of technician and control is as shown in table 3, and three's corresponding relation of control ID, conversation type and logical gate is as shown in table 4.
Table 3
Control ID Interface portion
ID1 The interface portion of Profile
ID2 The interface portion of Sidebar
…… ……
Table 4
Control ID Conversation type Logical gate
ID1 Good friend's type The logical gate of the Profile of good friend's type
ID2 Good friend's type The logical gate of the Sidebar of good friend's type
ID1 Realm type The logical gate of the Profile of realm type
…… …… ……
Such as, according to control " ID1 ", " ID2 ", " ID3 ", " ID3 ", " ID4 ", " ID5 " and " ID6 " from control ID as shown in table 3 and interface portion, obtain the interface portion of the interface portion of " Profile " child control, " Toolbar " child control, " Sidebar " child control, " Prompt " child control, " BottomFrame " child control and " ChatMsg " child control respectively; The order of each child control in then describing with reference to script, first according to the position " Top " of " Profile " child control, is filled in the top of motherboard as shown in Figure 3 by the interface portion of " Profile " child control; Then according to the position " Top " of " Toolbar " child control, the interface portion of " Toolbar " child control is filled in the top of the remaining part of motherboard; Again according to the position " Right " of " Sidebar " child control, the interface portion of " Sidebar " child control is filled in the right of the remaining part of motherboard.The interface portion of remaining each child control be filled in motherboard as shown in Figure 3 respectively by above-mentioned identical method, the motherboard after the filling obtained as shown in Figure 4.
Step 305: according to each control ID obtained and the conversation type of carrying, obtain the logical gate of each child control, and each child control logical gate is bundled in the interface portion of himself;
Particularly, according to each control ID obtained and the conversation type of carrying, from three's corresponding relation of control ID, conversation type and logical gate, search the logical gate of each child control, and in motherboard, the interface portion of each child control and logical gate are bound.
Such as, control ID according to obtaining is " ID1 ", from three's corresponding relation of control ID, conversation type and logical gate as shown in table 4, search the logical gate of " Profile " child control, in motherboard as shown in Figure 4, the logical gate of " Profile " child control and interface portion are bound.By above-mentioned identical method, the interface portion of each child control remaining in motherboard and logical gate are bound.
Step 306: by each child control of the registration in motherboard, enables each child control and motherboard carry out alternately, setting up window, and being carried in the window of foundation by motherboard, obtain session window.
Wherein, because control can not show separately, so the child control of filling in motherboard and motherboard can not show individually, therefore, motherboard must be placed in the window, could show with the form of session window.
Step 307: for this session window sets up chat channel, wherein, this session window at least can provide the interface of information interchange for contact person.
Wherein, mutually independent due to each child control in session window and cannot direct interaction, so the plug-in unit in any one child control in session window and the plug-in unit in other child controls separate and cannot direct interaction, any two child controls are undertaken by motherboard alternately.
Further, if need to make that there is in session window abundant application, then plug-in unit can be loaded in the child control in session window, make session window carry how abundant application.
In embodiments of the present invention, each child control for filling motherboard is set in script describes, and each child control is filled in motherboard, motherboard is placed and obtains session window in the window.Because each child control in session window is separate, the plug-in unit carried in any two child controls is also separate, when therefore changing the layout of former session window, do not need to revise the interaction code between each plug-in unit, in former session window, develop new session window, as long as then modify to the child control at part place of amendment, and other herid former session window partially, so alleviate development difficulty and reduce cost of development, and making session window have the characteristic of the low coupling of high cohesion.
Embodiment 4
As shown in Figure 6, embodiments provide a kind of device creating session window, comprising:
Receiver module 401, for receiving request to create, carries conversation type in this request to create;
Creation module 402, describe for the script creating conversation type that motherboard and acquisition carry corresponding, this script at least comprises conversation area child control in describing;
Packing module 403, for being filled in the motherboard of establishment by each child control described in the description of this script;
Registering modules 404, for registering each child control in the motherboard created, the motherboard of establishment alternately, is pasted onto window and obtains session window by the motherboard making each child control and establishment, and sets up chat channels for session window.
Wherein, packing module 403 specifically comprises:
First acquiring unit, for resolving by describing this script, obtains the mark of each child control and the layout information of each child control;
Second acquisition unit, for the mark according to the conversation type of carrying and each child control, obtains interface portion and the logical gate of each child control;
Filler cells, for the layout information according to each child control, is filled in the interface portion of each child control in the motherboard of establishment, and binds the interface portion of each child control and logical gate;
Wherein, second acquisition unit specifically comprises:
First searches subelement, for the mark according to each child control, searches the interface portion of each child control from the corresponding relation identified with interface portion;
Second searches subelement, for the mark according to the conversation type of carrying and each child control, searches the logical gate of each child control from the corresponding relation of mark, conversation type and logical gate;
Wherein, child control comprises interface portion and logical gate, and any two child controls are undertaken alternately by the motherboard created;
Further, this device also comprises:
Enquiry module, in session window, if the motherboard created receives event, each child control in the motherboard that inquiry creates, if inquire the child control that can process this event, then meets at the child control process of inquiry by this event.
Wherein, in the present embodiment, the mark of child control comprises control name or control ID.
In embodiments of the present invention, each child control for filling motherboard is set in script describes, and each child control is filled in motherboard, motherboard is placed and obtains session window in the window.Because each child control in session window is separate, the plug-in unit carried in any two child controls is also separate, when therefore changing the layout of former session window, do not need to revise the interaction code between each plug-in unit, in former session window, develop new session window, as long as then modify to the child control at part place of amendment, and other herid former session window partially, so alleviate development difficulty and reduce cost of development, and making session window have the characteristic of the low coupling of high cohesion.
All or part of content in the technical scheme that above embodiment provides can be realized by software programming, and its software program is stored in the storage medium that can read, storage medium such as: the hard disk in computing machine, CD or floppy disk.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. create a method for session window, it is characterized in that, described method comprises:
Receive request to create, in described request to create, carry conversation type;
Create motherboard and obtain script corresponding to described conversation type and describe, described script at least comprises conversation area child control in describing;
The each child control described in being described by described script is filled in described motherboard;
In described motherboard, register described each child control, make described each child control and described motherboard alternately, described motherboard is pasted onto window and obtains session window, and set up chat channels for described session window; Wherein, register in described motherboard described each child control as: in the logical gate of described motherboard, arrange a pointer for each child control, described pointer is used for described motherboard and child control and carries out alternately;
Wherein, described each child control by description in described script description is filled in described motherboard, specifically comprises:
Resolving by describing described script, obtaining the mark of described each child control and the layout information of described each child control;
According to the mark of described conversation type and described each child control, obtain interface portion and the logical gate of described each child control;
According to the layout information of described each child control, the interface portion of described each child control is filled in described motherboard, and the interface portion of described each child control and logical gate are bound;
Wherein, the described mark according to described conversation type and described each child control, obtains interface portion and the logical gate of described each child control, specifically comprises:
According to the mark of described each child control, from the corresponding relation identified with interface portion, search the interface portion of described each child control;
According to the mark of described conversation type and described each child control, from the corresponding relation of mark, conversation type and logical gate, search the logical gate of described each child control.
2. the method for claim 1, is characterized in that, described child control comprises interface portion and logical gate, and any two child controls are undertaken by described motherboard alternately.
3. the method for claim 1, is characterized in that, described method also comprises:
In described session window, if described motherboard receives event, inquire about each child control in described motherboard, if inquire the child control that can process described event, then described event is met at the child control process of described inquiry.
4. create a device for session window, it is characterized in that, described device comprises:
Receiver module, for receiving request to create, carries conversation type in described request to create;
Creation module, describe for creating motherboard and obtaining script corresponding to described conversation type, described script at least comprises conversation area child control in describing;
Packing module, for being filled in described motherboard by each child control described in described script description;
Registering modules, for registering described each child control in described motherboard, making described each child control and described motherboard alternately, described motherboard being pasted onto window and obtaining session window, and set up chat channels for described session window; Wherein, register in described motherboard described each child control as: in the logical gate of described motherboard, arrange a pointer for each child control, described pointer is used for described motherboard and child control and carries out alternately;
Wherein, described packing module specifically comprises:
First acquiring unit, for resolving by describing described script, obtains the mark of described each child control and the layout information of described each child control;
Second acquisition unit, for the mark according to described conversation type and described each child control, obtains interface portion and the logical gate of described each child control;
Filler cells, for the layout information according to described each child control, is filled in the interface portion of described each child control in described motherboard, and binds the interface portion of described each child control and logical gate;
Wherein, described second acquisition unit specifically comprises:
First searches subelement, for the mark according to described each child control, searches the interface portion of described each child control from the corresponding relation identified with interface portion;
Second searches subelement, for the mark according to described conversation type and described each child control, searches the logical gate of described each child control from the corresponding relation of mark, conversation type and logical gate.
5. device as claimed in claim 4, it is characterized in that, described child control comprises interface portion and logical gate, and any two child controls are undertaken by described motherboard alternately.
6. device as claimed in claim 4, it is characterized in that, described device also comprises:
Enquiry module, in described session window, if described motherboard receives event, inquires about each child control in described motherboard, if inquire the child control that can process described event, then described event is met at the child control process of described inquiry.
CN201010144498.0A 2010-04-09 2010-04-09 A kind of method and device creating session window Active CN102214090B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010144498.0A CN102214090B (en) 2010-04-09 2010-04-09 A kind of method and device creating session window

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010144498.0A CN102214090B (en) 2010-04-09 2010-04-09 A kind of method and device creating session window

Publications (2)

Publication Number Publication Date
CN102214090A CN102214090A (en) 2011-10-12
CN102214090B true CN102214090B (en) 2015-11-25

Family

ID=44745413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010144498.0A Active CN102214090B (en) 2010-04-09 2010-04-09 A kind of method and device creating session window

Country Status (1)

Country Link
CN (1) CN102214090B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428073B (en) * 2012-05-24 2015-06-17 腾讯科技(深圳)有限公司 User interface-based instant messaging method and apparatus
CN104298495B (en) * 2013-07-19 2018-07-20 桥弘数控科技(上海)有限公司 A kind of program developing method and system based on script
CN104699363B (en) * 2013-12-10 2018-09-21 阿里巴巴集团控股有限公司 A kind of window interface shows method and system
CN104270427B (en) * 2014-09-18 2018-01-12 用友优普信息技术有限公司 Conversation controlling method and session control device
CN111277615B (en) * 2018-12-04 2022-01-11 阿里巴巴集团控股有限公司 User behavior tracking method based on browser, terminal device and server
CN111209000B (en) * 2020-01-08 2024-01-26 网易(杭州)网络有限公司 Processing method and device of custom control, electronic equipment and storage medium
CN111726395B (en) * 2020-05-29 2023-01-31 广州奇芯机器人技术有限公司 Automatic communication mechanism of numerical control system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127736A (en) * 2007-09-26 2008-02-20 腾讯科技(深圳)有限公司 An instant communication system and method for processing sub-panel
CN101677298A (en) * 2008-09-17 2010-03-24 多友科技(北京)有限公司 Multiparty session implementation method of enterprise instant communication system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127736A (en) * 2007-09-26 2008-02-20 腾讯科技(深圳)有限公司 An instant communication system and method for processing sub-panel
CN101677298A (en) * 2008-09-17 2010-03-24 多友科技(北京)有限公司 Multiparty session implementation method of enterprise instant communication system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
大规模软件架构的MVC统一框架的设计与实现;万凯;《中国优秀硕士学位论文全文数据库》;20090831;第3节 *
安全即时通信系统的改进性研究、设计与实现;左志斌;《中国优秀硕士学位论文全文数据库》;20090731;第5节 *

Also Published As

Publication number Publication date
CN102214090A (en) 2011-10-12

Similar Documents

Publication Publication Date Title
CN102214090B (en) A kind of method and device creating session window
CN110310088B (en) Workflow configuration method and related products
US7496890B2 (en) Generation of configuration instructions using an abstraction technique
CN110807015A (en) Big data asset value delivery management method and system
CN101216862B (en) Paper-free three-dimensional assemblage process document accomplishing method
US8495078B2 (en) System and method for abstraction of objects for cross virtual universe deployment
CN102779040B (en) A kind of method and apparatus generating customizing form
CN105700888A (en) Visualization rapid developing platform based on jbpm workflow engine
CN105117835A (en) A power grid information machine room three-dimensional visualized management platform based on a B/S framework
CN110457891A (en) A kind of authority configuration interface display method, device, terminal and storage medium
US20050065951A1 (en) Visualization of commonalities in data from different sources
CN104123227A (en) Method for automatically generating testing cases
CN107704243A (en) Construction method and device, the computer equipment and storage medium of front-end interface
CN100465882C (en) Method and system of establishing culture sensitive control element for global application
CN103150154B (en) The implementation method and device of a kind of application plug
CN112232047A (en) Method, system, equipment and medium for multi-dimensional data acquisition and automatic summarization
CN103186632A (en) Method and device for customizing operation and maintenance form
CN107357952A (en) A kind of network automatic assembling and three-dimensional interaction method and system
CN108388623A (en) ER relationships generation method, device, computer equipment and storage medium
CN113031936A (en) Method and system for automatically setting up page and immediately releasing page
CN107436785B (en) Revit software information interaction system and interaction method based on information system
CN109783596B (en) ArcGIS map configuration preview method based on Angular component
CN113641360B (en) Configuration method, device, equipment and storage medium of system front end
CN110889013A (en) Data association method, device, server and storage medium based on XML
CN112580143A (en) Assembly type building cooperative cloud platform based on BIM

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