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).

Rabu, 16 Oktober 2013

Usecase Diagram


Hello peeps !!
Long time no post because so many test and assignment .I wanna post about USE CASE DIAGRAM!!Well,ive no idea about this one ,I taking business electronic  I don’t like that !!As you can its still MESSY im a beginner :D but I tried do the best :P .
Here’s a little bit theory about usecase :
From Goals to Use Cases
Here’s a common scenario for many of us who have learned about uses cases but haven’t written one yet: You’ve identified the actors for your project. You’ve brainstormed a list of goals for each actor. You’re ready to create your first set of use cases. And you feel stuck. Or at least uncertain. Call it use case writer’s block. You could point to a use case if you saw one, but what are your use cases?
Use Case

A use case can be defined as [1] a functionality that a system can provide by interacting with the actor(s).
Continuing with the example of the ATM, withdraw cash is a functonality that the ATM provides. Therefore, this is a use case. Other possible use cases includes ,check balancechange PIN, and so on.
Use cases include both successful and unsuccessful scenarios of user interactions with the system. For example, authentication of a customer by the ATM would fail if he enters wrong PIN. In such case, an error message is displayed on the screen of the ATM.

Graphical Representation


An actor is represented by a stick figure and name of the actor is written below it. A use case is depicted by an ellipse and label of the use case is written inside it. The subject could be shown by drawing a rectangle. Label for the system could be put inside it either at the top or near the bottom. Use cases are enclosed inside the rectangle and actors are drawn outside the rectangle, as shown in figure - 01.



 

Association between Actors and Use Cases


A use case describes a specific functionality that the system provides to its users. The functionality is triggered by actor. Actors are connected to use cases through binary associations. The association indicates that the actor and use case communicates through message passing.

An actor must be associated with atleast one use case. Similarly, a given use case must be associated with atleast one actor. However, when a use case is associated with multiple actors, it might not be clear who triggers the functionality. No association among the actors are shown.

Use Case Relationships

Three types of relationships exist among use cases:
·          Include relationship
·         Extend relationship
·         Use case generalization

Include Relationship

Include relationships are used to depict similar behaviour that are shared by multiple use cases without replicating the common behaviour in each of those use cases.
Example

For example, consider an email application. A user can send a new mail, reply to an email he has received, or forward an email. However, in each of these three cases, the user must be logged in to perform those actions. Thus, we could have a login use case, which is included by compose mail, reply, and forward email use cases. The relationship is shown in figure - 02.