From: Siddhesh P. <sid...@gm...> - 2010-07-30 10:45:18
|
On Fri, Jul 30, 2010 at 3:54 PM, kay <ka...@gm...> wrote: > Hi, all > I am implementing the function of getting chat room categories and chat room > lists. > About the information that has been received from the server, the chat room > lists can be > 1) they can be stored and displayed it directly when the user wants to get > it again > 2) delete it after they have been displayed, send request again to get the > information when user wants it next time > Which is the better way to implement it? The lists ought to be stored, since it does not make sense to query them all the time. At the same time, there should be another function to refresh the list. So you will have: 1) a get_chatroom_list that returns a cached list if it exists or retrieves the list from the server otherwise 2) a refresh_chatroom_list that retrieves the list from the server You will of course need to choose good function names (yahoo_...) since they will be exposed as part of the API. -- Siddhesh Poyarekar http://siddhesh.in |