Senin, 21 Oktober 2013

usecase for facebook

Usecase and class diagram for facebook
Use case models capture functional information about systems (as-is or to-be). They describe how systems interact with the environment as well as the kind of tasks 'actors' perform using the system. Use case models consist of use case diagrams and use case specifications. The latter describe specific user scenarios.
In an attempt to illustrate how use case modelling is used in systems analysis I will provide the main use cases for facebook as well as a use case specification for the 'Create Personal Profile' use case. 

Identifying the main Actors
In UML (Unified Modelling Language) an Actor is defined as anything that communicates with the system and is external to it. Hence, it could involve end users, external devices that interact with the system or other subsystems.
The first step in creating use case diagrams is to identify the main Actors. To find the main Actors we need to answer the following questions:
·         Who interacts with the system?
·         Who or What executes the use cases?
·         Who and What runs the functions of the system? 
·         Who uses or will be using the system?
In facebook, two obvious Actors are Users and Companies. Users want to use the system to connect with others while Companies use the system to create pages and promote their services.
Once we identify the main actors we need to find the main use cases.

Identifying the main use cases 
To identify the main use cases we answer the following questions:
·         What are the main goals of Actors?
·         What are they (Actors) trying to achieve?
·         What tasks will they be doing?
Pay special attention to CRUD operations. Do actors need to create, read, update or delete data from the system? In certain situations, especially when business requirements and specifications are written down, textual analysis may help in identifying use cases. Let's take facebook as an example as described in Wikipedia.

In the above sentence, phrases in bold are use case suspects. Furthermore, from the Wikipedia article we conclude to the following main use cases:
1.       Create Personal Profile: Describes how a user creates a personal profile.
2.      Add Friends: Describes how a user connects with other users' personal profile pages.
3.      Exchange Messages: Describes users exchanges messages between each other.
4.      Join User Groups: Describes how a user joins user groups.
5.      Add Games: Describes how users add games to their personal profile page.
6.      Share Content: Describe how users share content with other users.
7.      Connect with Users: Describes how companies connect with users.
8.      Create Fan Pages: Describes how companies create fan pages for users to sign into.
9.      Create User Groups: Describes how companies create user groups for users to sign into.


Now we can further develop our use case diagram by using <<extend>>, <<include>> and generalisation relationships. For example, 'Chat' can extend the functionality of 'Exchange Messages' because it incorporates optional behaviour (users may or may not exchange messages).  Also, the 'Share Content' use case can be drawn as a generalisation of the 'Share Links', 'Share Images' and 'Share Videos' use cases. Generalisation relationships as well as include and extend relationships are all tools that help Analysts simplify complex use cases. Remember, this is not supposed to capture every single detail - use case models are only high-level models. 



Create Personal Profile use case specification
Use case specifications are deliverables describing specific scenarios through a use case. It is important to note that use case specifications are not UML standardised and as a result, they are a bit open to interpretation. Generally speaking they should identify the main stakeholders, relationships and flows of events (normal, subflows and/or exceptional).

Tidak ada komentar:

Posting Komentar