Use Case Diagram for Facebook
Learn how to define use cases and create the corresponding use case diagram for the Facebook problem.
Let’s begin building Facebook’s use case diagram and understanding its components’ relationship. First, we will define the different elements of our Facebook system, followed by the complete use case diagram of the system.
System
Our system is Facebook.
Actors
Now, we’ll define the main actors of Facebook.
Primary actors
User: This actor can create a personal profile that includes their information. They can create posts, pages, and groups, and interact with other users by sending friend requests and messages, commenting on posts, and more.
Secondary actors
Page/Group Admin: The admin is in charge of performing numerous operations, including blocking or unblocking users from groups or pages, deleting an existing group, and changing the group’s privacy.
System: This is responsible for sending notifications for new friend requests, messages, comments, etc.
Use cases
In this section, we’ll define Facebook’s use cases. We have listed them according to their interactions with a particular actor.
Note: Some use cases will occur multiple times because they are shared among different actors in the system.
User
Add/update profile: To add information like work, education, and places of visit details, or to update an existing profile
Follow/unfollow user: To follow or unfollow other users
Send message: To send a message to other users
Send friend request: To send a friend request to other users
Create/like/follow/share page: Create a new page or perform actions including liking, following, or sharing an existing page.
Create/join/leave group: To either create a new group or perform actions like joining or leaving an existing group
Invite users to group: Invite other users to an existing group.
Add/update/delete post: To add a new post, update the content of the post, or delete an existing post
Like/comment/share post: To like a post, comment on a post, or share a post
Add/update/delete/like comment: To add a new comment, update the content of the comment, like a particular comment, or delete a comment
Accept/reject friend request: To accept or reject a friend request from another user
Update privacy: To update the privacy settings of the profile
Search users/groups/pages/posts: To search for other users, any existing groups or pages, or any posts made by users
Accept/Reject friend request: To accept or reject a friend request from another Facebook user
Accept/Reject group join invitation: To accept or reject a group joining invitation from another Facebook user
Like/Comment/Share Post: To like, comment, or share any post visible to users on Facebook
Page/Group Admin
Block/unblock page user: To block or unblock a user from a page
Block/unblock group user: To block or unblock a user from a group
Change a group’s privacy: To change the privacy settings of a group (from public to private and vice versa)
System
Send new friend request notification: To send a notification of any friend request sent by another user
Send message notification: To send a notification of any new messages
Send new post notification: To send a notification of any new posts
Send comment notification: To send a notification of any comments on your or others’ posts
Relationships
This section describes the relationships between and among actors and their use cases.
Generalization
The “Page/Group Admin” has a generalization relationship with the “User” as the admin can perform all the tasks a normal user can perform.
Associations
The table below shows the association relationship between actors and their use cases.