In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to understand the group operation module in the detailed design of the Java QQ project. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
I haven't posted a blog post for a long time. I'll write some more today. Today, I write the group operation module of qq software. Since the group operation on the client side does not need complex logic, I will not write the client side, but only write the response of the group operation on the server side. OK, write the pseudo code first:
Group operation module
Because the basic group operations have many similarities, several group operations are divided into one module. The design idea is as follows:
The user sends the group operation packet, and the server parses the basic data and commands, determines what the group operation is, and then carries out the corresponding operation. The specific design ideas are as follows:
If (group operation command is to add group)
{
Find the groupsList table for this user in the users database and add the appropriate group to this table
}
Else if (the group operation is to delete the group)
{
1. Find the friendsList table of this user in the users database, and change the group properties of the friends in the corresponding group to my friends. You are about to delete the friends in the group and put them among my friends instead of deleting them directly.
2. Find the user's groupsList table in the users database, and delete the corresponding group from this table.
}
Else if (the group operation is to modify the name of the group)
{
1. Find the friendsList table of this user in the users database, and change the group attribute of the friends of the corresponding group to the group name to be modified.
2. Find the user's groupsList table in the users database, delete the corresponding group in this table, and change the name of the group to the name to be modified.
}
The following is an illustration:
On how to understand the detailed design of the Java QQ project group operation module is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.