CN102487361A - Method for multiplexing list page and apparatus thereof - Google Patents

Method for multiplexing list page and apparatus thereof Download PDF

Info

Publication number
CN102487361A
CN102487361A CN2010105822894A CN201010582289A CN102487361A CN 102487361 A CN102487361 A CN 102487361A CN 2010105822894 A CN2010105822894 A CN 2010105822894A CN 201010582289 A CN201010582289 A CN 201010582289A CN 102487361 A CN102487361 A CN 102487361A
Authority
CN
China
Prior art keywords
class
child control
control class
list page
desire
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
CN2010105822894A
Other languages
Chinese (zh)
Other versions
CN102487361B (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 CN201010582289.4A priority Critical patent/CN102487361B/en
Publication of CN102487361A publication Critical patent/CN102487361A/en
Application granted granted Critical
Publication of CN102487361B publication Critical patent/CN102487361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention, which belongs to an instant messaging (IM) field, discloses a method for multiplexing a list page and an apparatus thereof. The method comprises the following steps: creating a management class which is used to control each child control class; when one child control class is about to be created, determining whether there is the child control class whose style is the same with the style of the child control class to be created in the management class; if there is the child control class, generating the corresponding list page according to the child control class whose style is the same with the style of the child control class to be created. The apparatus comprises: a creation module, a determination module and a generation module. In the invention, by using a scheme of multiplexing list page code logic, the list page code logic can be avoided to generate redundancy and difficulties of development and maintenance can be reduced.

Description

A kind of method and apparatus of multiplexing list page
Technical field
The present invention relates to the instant messaging field, particularly a kind of method and apparatus of multiplexing list page.
Background technology
The development of network instant communication instrument rapidly; No matter the user is in still work of life; All a large amount of use IM (Instant Messaging, instant messaging) software is with friend; Colleague and classmate carry out exchanges and communication, and IM software has become people's one of requisite Software tool in the life of working at present.
At instant communication client, like the microblogging client, the information that need represent is more and more abundanter, like list page such as search results pages, listener list page, blacklist list pages or leaves.In the existing microblogging client product, for corresponding respectively oneself type of realization independently of each list page, showing interface and logical process all oneself independently type of realization.
But a lot of list page have similar showing interface or logical process, if still write on oneself respectively independently in type of realization, will certainly bring the redundancy of code logic, are difficult to exploitation and safeguard.
Summary of the invention
Produce redundancy for fear of the list page code logic, the difficulty that reduces exploitation and safeguard, the embodiment of the invention provides a kind of method and apparatus of multiplexing list page.
Said technical scheme is following:
A kind of method of multiplexing list page, said method comprises:
The creative management class is used to control each child control class;
When desire is created a sub-control class, judge whether to exist in the said administrative class and create the identical child control class of child control class pattern with said desire;
If exist, create the identical child control class of child control class pattern according to said desire, generate corresponding list page.
Further, said according to the identical child control class of said desire establishment child control class pattern, generate corresponding list page and comprise:
Administrative class pulls asynchronous information, and said asynchronous information is filled into and the identical child control class of said desire establishment child control class pattern;
Through entrusting class to notify father's control of said child control class to carry out that the interface is refreshed and the operation of arranging, to be assembled into corresponding list page.
Further, said administrative class pulls asynchronous information and comprises:
Administrative class pulls asynchronous message from message pool; Preserve a said asynchronous message in the said message pool; And according to the quantity of the list page of quoting said asynchronous message; Increase the reference count of said asynchronous message,, discharge the resource of preserving said asynchronous message if do not quote the list page of said asynchronous message.
Further, saidly judge whether exist in the said administrative class and comprise after said desire is created the identical child control class of child control class pattern:
If do not exist, create the interface form of the different list page that the child control class uses according to said desire, create said desire and create the child control class.
Further, saidly create the interface form of the different list page that the child control class uses, create said desire and create the child control class and comprise according to said desire:
The interface element of said different list page is concluded; Interface element identical in the said different list page is created an interface element in the child control class as said desire, interface elements different in the said different list page is created different interface element in the child control class as said desire.
A kind of device of multiplexing list page, said device comprises:
Create module, be used for the creative management class, be used to control each child control class;
Whether judge module is used for when desire is created a sub-control class, judge to exist in the said administrative class with said desire and create the identical child control class of child control class pattern;
Generation module if be used for existing, is created the identical child control class of child control class pattern according to said desire, generates corresponding list page.
Further, said generation module comprises:
Pull the unit, be used for administrative class and pull asynchronous information;
Filler cells is used for said asynchronous information is filled into and the identical child control class of said desire establishment child control class pattern;
Notification unit is used for through entrusting class to notify father's control of said child control class to carry out that the interface is refreshed and the operation of arranging, to be assembled into corresponding list page.
Further, the said unit that pulls specifically is used for
Administrative class pulls asynchronous message from message pool; Preserve a said asynchronous message in the said message pool; And according to the quantity of the list page of quoting said asynchronous message; Increase the reference count of said asynchronous message,, discharge the resource of preserving said asynchronous message if do not quote the list page of said asynchronous message.
Further, said device also comprises:
Second creates module, is used to carry out after the said judge module, if do not exist, creates the interface form of the different list page that the child control class uses according to said desire, creates said desire and creates the child control class.
Further, said second creates module, specifically is used for
The interface element of said different list page is concluded; Interface element identical in the said different list page is created an interface element in the child control class as said desire, interface elements different in the said different list page is created different interface element in the child control class as said desire.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is:
Be used to control the administrative class of each child control class through establishment, when desire is created a sub-control class, judge whether exist in the administrative class and the identical child control class of desire establishment child control class pattern; If exist; Create the identical child control class of child control class pattern according to this desire, generate corresponding list page, the scheme of this multiplexing list page code logic; It is redundant to have avoided the list page code logic to produce, the difficulty that has reduced exploitation and safeguarded.
Description of drawings
Fig. 1 is the method flow diagram of the multiplexing list page that provides in the embodiment of the invention 1;
Fig. 2 is another method flow diagram of the multiplexing list page that provides in the embodiment of the invention 1;
Fig. 3 be provide in the embodiment of the invention 1 the class the logical relation sketch map;
Fig. 4 is the showing interface sketch map of the list page 1 that provides in the embodiment of the invention 1;
Fig. 5 is the showing interface sketch map of the list page 2 that provides in the embodiment of the invention 1;
Fig. 6 is that the desire that provides in the embodiment of the invention 1 is created child control class interface element sketch map;
Fig. 7 is the apparatus structure sketch map of the multiplexing list page that provides in the embodiment of the invention 2;
Fig. 8 is another apparatus structure sketch map of the multiplexing list page that provides in the embodiment of the invention 2.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, will combine accompanying drawing that embodiment of the present invention is done to describe in detail further below.
Embodiment 1
Referring to Fig. 1, present embodiment provides a kind of method of multiplexing list page, comprising:
101: the creative management class is used to control each child control class;
102: when desire is created a sub-control class, judge whether to exist in this administrative class and create the identical child control class of child control class pattern with this desire;
103: if exist, create the identical child control class of child control class pattern, generate corresponding list page according to this desire.
Present embodiment is used to control the administrative class of each child control class through establishment, when desire is created a sub-control class, judges whether exist in the administrative class and the identical child control class of desire establishment child control class pattern; If exist; Create the identical child control class of child control class pattern according to this desire, generate corresponding list page, the scheme of this multiplexing list page code logic; It is redundant to have avoided the list page code logic to produce, the difficulty that has reduced exploitation and safeguarded.
The method of the multiplexing list page that embodiment provides is applicable to the microblogging terminal, for example microblogging client etc.Referring to Fig. 2, introduce the method for multiplexing list page in detail below in conjunction with instantiation.
201: the creative management class is used to control each child control class;
So-called control is meant that administrative class is responsible for pulling the information that the child control class need show, and is in charge of the life cycle of child control.
Wherein, administrative class is also referred to as and detaches the list control administrative class, is made as UserItemMgr.According to the pattern or the quantity of child control class, can create one or more administrative class.During group control class negligible amounts, can only create an administrative class, all child control classes are carried out centralized control.The pattern of group control class or quantity can be created a plurality of administrative class more for a long time, control corresponding child control class respectively.
Wherein, the child control class is also referred to as and detaches listuser child control class, is made as UserItemCtrl, is specifically designed to the interface performance logic of handling each child control in the list page.All child control classes are formed container cell.
202: when desire is created a sub-control class, judge whether to exist in this administrative class and create the identical child control class of child control class pattern with this desire;
203: if exist, create the identical child control class of child control class pattern, generate corresponding list page according to this desire;
Concrete, administrative class pulls asynchronous information, and this asynchronous information is filled into and the identical child control class of this desire establishment child control class pattern; Through entrusting class to notify father's control of this child control class to carry out that the interface is refreshed and the operation of arranging, to be assembled into corresponding list page.
Further, when asynchronous information was asynchronous message, administrative class pulled asynchronous information and comprises:
Administrative class pulls asynchronous message from message pool; Preserve a this asynchronous message in this message pool, and, increase the reference count of this asynchronous message according to the quantity of the list page of quoting this asynchronous message; If do not quote the list page of this asynchronous message, discharge the resource of preserving this asynchronous message.The message pool that present embodiment provides can effectively reduce memory consumption.
Wherein, entrust class to be also referred to as and detach readjustment tabulation father control trust class interface, be made as IPageItemContainer, it is the member variable of administrative class, is used to obtain the pointer of father's control.The logical relation of entrusting class, administrative class and child control class is referring to shown in Figure 3.Father's control has dual mode to realize entrusting class, and first kind through comprising the trust class instance variable of IPageItemContainer; Second kind is to inherit the IPageItemContainer interface function; The both is used for corresponding callback operation with self passing to UserItemMgr initialized the time.
Wherein, asynchronous information is specially broadcast, individual label information or head portrait etc., and asynchronous information this locality does not exist, and need to trigger once the asynchronous loading procedure with server.
204: if do not exist, create the interface form of the different list page that child control class uses, create this desire and create the child control class according to this desire;
Concrete; The interface element of this difference list page is concluded; Interface element identical in this difference list page is created an interface element in the child control class as this desire, interface elements different in this difference list page is created different interface element in the child control class as this desire.
For example; Fig. 4 is the showing interface sketch map of list page 1; Comprise head portrait, the pet name, operating area, number of the account | geography, Twitter message and Rich Media, Fig. 5 is the showing interface sketch map of list page 2, comprises head portrait, the pet name, operating area, number of the account | geography, Twitter message and informed source; Wherein, Head portrait, the pet name, operating area, number of the account | geographical is two interface elements that list page is identical with Twitter message, and then desire is created in the child control class and comprised head portrait, the pet name, operating area and a Twitter message respectively, and Rich Media is different interface elements with informed source; Create an interface element in the child control class as desire separately, create child control class interface element sketch map referring to desire shown in Figure 6.
Present embodiment is used to manage the administrative class of each child control class through establishment, when desire is created a sub-control class, judges whether exist in the administrative class and the identical child control class of desire establishment child control class pattern; If exist; Create the identical child control class of child control class pattern according to this desire, generate corresponding list page, the scheme of this multiplexing list page code logic; It is redundant to have avoided the list page code logic to produce, the difficulty that has reduced exploitation and safeguarded.
Embodiment 2
Referring to Fig. 7, present embodiment provides a kind of device of multiplexing list page, comprising:
Create module 301, be used for the creative management class, be used to control each child control class;
Whether judge module 302 is used for when desire is created a sub-control class, judge to exist in the administrative class with desire and create the identical child control class of child control class pattern;
Generation module 303 if be used for existing, is created the identical child control class of child control class pattern according to desire, generates corresponding list page.
Wherein, generation module 303 comprises:
Pull unit 303a, be used for administrative class and pull asynchronous information;
Filler cells 303b is used for asynchronous information is filled into and the identical child control class of desire establishment child control class pattern;
Notification unit 303c is used for through entrusting type father's control of notice child control class to carry out that the interface is refreshed and the operation of arranging, to be assembled into corresponding list page.
Wherein, pull unit 303a, specifically be used for
Administrative class pulls asynchronous message from message pool; Preserve a asynchronous message in the message pool, and, increase the reference count of asynchronous message according to the quantity of the list page of quoting asynchronous message; If do not quote the list page of asynchronous message, discharge the resource of preserving asynchronous message.The message pool that present embodiment provides can effectively reduce memory consumption.
Further, referring to Fig. 8, this device also comprises:
Second creates module 304, is used to carry out after the judge module 302, if do not exist, creates the interface form of the different list page that the child control class uses according to desire, creates desire and creates the child control class.
Wherein, second creates module 304, specifically is used for
The interface element of different list page is concluded, interface element identical in the different list page is created an interface element in the child control class as desire, interface elements different in the different list page is created different interface element in the child control class as desire.
The device that present embodiment provides specifically can be the microblogging terminal, and for example microblogging client etc. belongs to same design with method embodiment, and its concrete implementation procedure sees method embodiment for details, repeats no more here.
Present embodiment is used to control the administrative class of each child control class through establishment, when desire is created a sub-control class, judges whether exist in the administrative class and the identical child control class of desire establishment child control class pattern; If exist; Create the identical child control class of child control class pattern according to this desire, generate corresponding list page, the scheme of this multiplexing list page code logic; It is redundant to have avoided the list page code logic to produce, the difficulty that has reduced exploitation and safeguarded.
All or part of content in the technical scheme that above embodiment provides can realize that through software programming its software program is stored in the storage medium that can read, storage medium for example: the hard disk in the computer, CD or floppy disk.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. the method for a multiplexing list page is characterized in that, said method comprises:
The creative management class is used to control each child control class;
When desire is created a sub-control class, judge whether to exist in the said administrative class and create the identical child control class of child control class pattern with said desire;
If exist, create the identical child control class of child control class pattern according to said desire, generate corresponding list page.
2. method according to claim 1 is characterized in that, and is said according to the identical child control class of said desire establishment child control class pattern, generates corresponding list page and comprises:
Administrative class pulls asynchronous information, and said asynchronous information is filled into and the identical child control class of said desire establishment child control class pattern;
Through entrusting class to notify father's control of said child control class to carry out that the interface is refreshed and the operation of arranging, to be assembled into corresponding list page.
3. method according to claim 2 is characterized in that, said administrative class pulls asynchronous information and comprises:
Administrative class pulls asynchronous message from message pool; Preserve a said asynchronous message in the said message pool; And according to the quantity of the list page of quoting said asynchronous message; Increase the reference count of said asynchronous message,, discharge the resource of preserving said asynchronous message if do not quote the list page of said asynchronous message.
4. method according to claim 1 is characterized in that, saidly judges whether exist in the said administrative class and comprise after said desire is created the identical child control class of child control class pattern:
If do not exist, create the interface form of the different list page that the child control class uses according to said desire, create said desire and create the child control class.
5. method according to claim 4 is characterized in that, saidly creates the interface form of the different list page that the child control class uses according to said desire, creates said desire and creates the child control class and comprise:
The interface element of said different list page is concluded; Interface element identical in the said different list page is created an interface element in the child control class as said desire, interface elements different in the said different list page is created different interface element in the child control class as said desire.
6. the device of a multiplexing list page is characterized in that, said device comprises:
Create module, be used for the creative management class, be used to control each child control class;
Whether judge module is used for when desire is created a sub-control class, judge to exist in the said administrative class with said desire and create the identical child control class of child control class pattern;
Generation module if be used for existing, is created the identical child control class of child control class pattern according to said desire, generates corresponding list page.
7. device according to claim 6 is characterized in that, said generation module comprises:
Pull the unit, be used for administrative class and pull asynchronous information;
Filler cells is used for said asynchronous information is filled into and the identical child control class of said desire establishment child control class pattern;
Notification unit is used for through entrusting class to notify father's control of said child control class to carry out that the interface is refreshed and the operation of arranging, to be assembled into corresponding list page.
8. device according to claim 7 is characterized in that, the said unit that pulls specifically is used for
Administrative class pulls asynchronous message from message pool; Preserve a said asynchronous message in the said message pool; And according to the quantity of the list page of quoting said asynchronous message; Increase the reference count of said asynchronous message,, discharge the resource of preserving said asynchronous message if do not quote the list page of said asynchronous message.
9. device according to claim 6 is characterized in that, said device also comprises:
Second creates module, is used to carry out after the said judge module, if do not exist, creates the interface form of the different list page that the child control class uses according to said desire, creates said desire and creates the child control class.
10. device according to claim 9 is characterized in that, said second creates module, specifically is used for
The interface element of said different list page is concluded; Interface element identical in the said different list page is created an interface element in the child control class as said desire, interface elements different in the said different list page is created different interface element in the child control class as said desire.
CN201010582289.4A 2010-12-03 2010-12-03 Method for multiplexing list page and apparatus thereof Active CN102487361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010582289.4A CN102487361B (en) 2010-12-03 2010-12-03 Method for multiplexing list page and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010582289.4A CN102487361B (en) 2010-12-03 2010-12-03 Method for multiplexing list page and apparatus thereof

Publications (2)

Publication Number Publication Date
CN102487361A true CN102487361A (en) 2012-06-06
CN102487361B CN102487361B (en) 2014-08-20

Family

ID=46152816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010582289.4A Active CN102487361B (en) 2010-12-03 2010-12-03 Method for multiplexing list page and apparatus thereof

Country Status (1)

Country Link
CN (1) CN102487361B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528026A (en) * 2016-11-29 2017-03-22 武汉斗鱼网络科技有限公司 Text display method and device
CN108108212A (en) * 2017-11-28 2018-06-01 五八有限公司 Processing method, device and the terminal of the application list page

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030172192A1 (en) * 2002-03-07 2003-09-11 International Business Machines Corporation Method and system for supporting object oriented programming class replacement
CN1866201A (en) * 2005-05-17 2006-11-22 杭州华为三康技术有限公司 Webpage listing widget and implementing method thereof
CN101216763A (en) * 2008-01-17 2008-07-09 金蝶软件(中国)有限公司 Personalized interface accomplishing method and system
CN101256490A (en) * 2008-03-18 2008-09-03 腾讯科技(深圳)有限公司 Expandable skin system and implementing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030172192A1 (en) * 2002-03-07 2003-09-11 International Business Machines Corporation Method and system for supporting object oriented programming class replacement
CN1866201A (en) * 2005-05-17 2006-11-22 杭州华为三康技术有限公司 Webpage listing widget and implementing method thereof
CN101216763A (en) * 2008-01-17 2008-07-09 金蝶软件(中国)有限公司 Personalized interface accomplishing method and system
CN101256490A (en) * 2008-03-18 2008-09-03 腾讯科技(深圳)有限公司 Expandable skin system and implementing method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106528026A (en) * 2016-11-29 2017-03-22 武汉斗鱼网络科技有限公司 Text display method and device
CN106528026B (en) * 2016-11-29 2019-11-05 武汉斗鱼网络科技有限公司 Text display method and device
CN108108212A (en) * 2017-11-28 2018-06-01 五八有限公司 Processing method, device and the terminal of the application list page

Also Published As

Publication number Publication date
CN102487361B (en) 2014-08-20

Similar Documents

Publication Publication Date Title
MacLean et al. Energy and the Future
Agarwal et al. Green computing-a new horizon of energy efficiency and electronic waste minimization: A global perspective
CN103049317B (en) Based on the high concurrent data no write de-lay system and method for queue under cloud environment
CN108572970A (en) A kind of processing method and distributed processing system(DPS) of structural data
CN104657419A (en) Processing method and system for customized letter paper templates
Jairaj et al. The future electricity grid
Sakuma et al. A comparison of smart city research and practice in Sweden and Japan: trends and opportunities identified from a literature review and co-occurrence network analysis
CN103793457A (en) System and method for managing memory usage by using usage analytics
CN102487361B (en) Method for multiplexing list page and apparatus thereof
CN107943455A (en) A kind of list rendering system based on JSON data formats
CN108763562A (en) A kind of construction method based on big data skill upgrading data exchange efficiency
CN102681827A (en) Method and device for overall achieving of tab in Android system
Fors et al. “We Started Building Green IT Back in the 1970s”: Making Sense of Sustainable ICT through Organizational History
CN109656638A (en) A kind of user based on Purley platform customizes the implementation method of function
Gentzsch D-grid, an e-science framework for German scientists
Nunes et al. Media Labs: Catalyzing Experimental, Structural, Learning, and Process Innovation
Wu et al. Social connection induces cultural contraction: Evidence from hyperbolic embeddings of social and semantic networks
CN102637186A (en) CMS (content management system) content order system and implementation method thereof
Banerjee et al. The future of cloud computing: an HP Labs perspective
CN116401418B (en) Data reading and writing method, device, equipment and storage medium
Barbierato et al. A Multiformalism-Based Model for Performance Evaluation of Green Data Centres
CN102567350A (en) Student event information management method
Dieter et al. Conversation pieces: On recounting new media art mailinglist cultures
CN102479077A (en) Method and device for dynamically constructing function operation, and application system
Allan Zero-carbon homes: a road map

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