Rabu, 23 Oktober 2013

Class Diagram Blogger


Object and Class Definition

Object is an overview of the entity, either real world or concept with the limits and proper understanding. Objects can represent something tangible such as a computer, a car or can form concepts such as chemical processing, bank transactions, purchase orders, etc.. Each object in the system has three characteristics, namely State (Status), Behaviour (nature) and Indentity (identity).

Class is a description of a group of objects of property (attribute), nature (operations), and semantic relationships between objects are common. Class is a template for forming objects. Each object is an instance of some class and instance objects were not able to be more than one class.
Naming Class using singular noun which is the best abstraction.

In the UML Class is represented by a rectangle divided. The upper part is the name of the class. A middle section of the class structure (attributes) and the bottom is the nature of the class (operation).


Status (State), Behavior and Identify

Status of Objects is a condition that may exist. Status of the object will change over time and is determined by the number of properties (attributes) with values ​​of proprti, plus object relationships with other objects.

Properties (Behaviour) determines how objects respond to requests from other objects and each object symbolizes do. The nature of the operations to be implemented with a number of objects.

Identity (Identify) means that each object a unique
In the UML object, described by rectangles and the name of the object are underlined.

Defining Class

As explained earlier, stereotypes provide the ability to create new modeling elements. Some stereotypes for class are: entity, boundary, control, utility and exception.

Creating a class
:
1. Right-click the Logical View in the browser
.
2. On the menu bar select New: Class. A class called New Class
       placed on the browser.
3. When a new class is highlighted, enter the name of the desired class.
Class with the stereotypes portrayed by adding jenis_stereotype
 << >> or by illustrating with an icon.
Rational Process Objectory advised to find the classes in the system which is being built by seeking class : boundary, control and entity. Third stereotypes illustrates a perspective model-view - controller so that the analyst can make a split system with separate domain from the point of view of control required by the system.
Because the analysis and design process is iterative, class lists will be changed over time. Class early may not be a class that will be implemented. So the candidate class is often used to describe the initial set of classes that are found on the system.

1. Entity Class
Entity class modeling information and operations that are usually aged
long / long. This class describes the type of real-world entity or entities required to perform the task of internal systems. They are usually not bound by the communication between the system and its environment. Mostly, they are not bound by the application, meaning that they can use more than one application. Entity class is a class that is usually required to complete a liability system. Entity classes are usually found in eloborasi phase. Entity class is often called a domain class as they relate to the real world.

2. Boundary Class
Boundary classes handle the communication between the system and the environment into the system. They can ensure the interface to the user or other systems (eg , the interface to the actor). Boundary classes are used to model the system interface.
Each partner actor / scenario (an instance of a use case) is checked to find the boundary class. Boundary classes are usually found in the elaboration phase at high level. For example,
 you 're designing your windows but do not model all the dialog boxes and buttons. You 're just documenting interface requirements, instead of implementing the inter-face . At design time, these classes improved to consider choosing the inter-face.

3 . Control Class
Control class sequence model behavior ( behavior) specific to one or more use cases. Elaboration on the early phase, a control class is added for each pair of actors or use cases. Control class is responsible for the flow of events in a use case.
The addition of the control class per use case or actor couple just an initial cut, the analysis and design, control class may be omitted, split or merged.

To design a class diagram, Rational Unified Process is a result of the development of the Rational Process Objectory using Use Case realization that describe how the realization of each use case that is in use case models. To illustrate how the realization of a use case can use some diagrams, which are owned by Class Diagram Use Case Realization and Interaction Diagrams.
To illustrate the use case realization here will use class diagrams owned by the use case realization. Each use case that there dibreakdown so it will be visible any entities involved in the realization of a use case. These entities will be the candidate classes in Class Diagram.

Creating stereotypes for class
:
1 . Right-click the class in the browser.
2 . Select the Specification menu.
3 . Select the General tab.
4 . Enter the name of the stereotype.
5 . Click the OK button.

Creating packages in the browser
:
1 . Right-click the Logical View in the browser.
2 . Choose New : Package menu.
3 . When the package is still highlighted, enter the name of the package.

Menambahkan Behavior dan Struktur (Atribut)
A class has a set of obligations that determine the behavior of objects in the class. This obligation is embodied in the operations defined for the class. The structure of a class defined by the class attributes. Each attribute is the definition of the object data in classnya. Defined in the class Object has a value for each attribute in the class
Message in the interaction diagram (Module 3), in general, mapped into operation on class destination. However there are some cases where the message is not to be operating, among others: the message from or to the actors who represent people / individuals and the message to the class that represents the boundary class GUI. However, if the actors represent the external entity or to the message from the actor may be operating in the class. Quiz
: How to distinguish between the actor as a person / individual with the external entity.

Operations can also be made without dependent (independent) of the interaction diagram (Module 3), because not all the scenarios represented in the diagram. The same thing also applies to
operations are made with the aim of helping other operations. Most of the attributes of a class are found in the problem definition, software requirements and documentation flow events. Attributes can also be found when defining a class.

A relationship may also be able to have the structure and behavior, this is the case if information associated with a link between two objects rather than one object with them. Develop a structure and behavior in the relationship are stored in the class association.

Mapping messages into a new Operations
:
1. Enter into a class if the object has not been done.
2. Right-click the message arrows.
3. Choose <new operation> . Operation Specification window will open.
4. Enter the name of the operation in the Operation Specification.
5. Click the OK button to close the Operation Specification.
6. Right-click the message arrows.
7. Select the operation of the operation list for the class .

Make operation :
1. Right-click the class in the browser.
2. Choose New : Operation. An operation called Taking appear on
browser.
3. Enter the desired name.

Documenting operation :
1. Click the " + " next to the class - clicking on the browser to expand class.
2. Click to select the operation.
3. Place the cursor in the documentation window and enter
documentation.

Creating Attribute
:
1. Right-click the class in the browser.
2. Choose New : Attribute. In the Name attribute browser will appear.
3. Choose a cool name for the attribute.

Create a class diagram to show the attributes and operations of a package
:
1. Right-click on the package in the browser.
2. Select the New : Class Diagram. A class diagram named New
Diagram appears in the browser.
3. Enter the name of the diagram.
 
Adding classes in a diagram using query menu
:
1. Double click on the diagram browser.
2. Choose Query : Add Classes.
3. Choose a cool package.
4. Click to select the classes you want and click the button
>>>>> " to add all the classes into the diagram.

References : http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=13&ved=0CFkQFjAM&url=http%3A%2F%2Fiwankuliah.files.wordpress.com%2F2012%2F09%2Fmodul-2-class-diagram.docx&ei=ZzJvUo6QDoKOrQfHkYGoBw&usg=AFQjCNEoqtuobfNpZalzPfj82nLGJaWXuw&sig2=jlV_3VMY10Y2Heo_mt2SYg

Senin, 07 Oktober 2013

Use Case Diagram

Definition of Use Case
Use case is the circuit/description of a group of inter-related and form a system of regularly conducted or supervised by an actor. Use case are used to establish behavior of objects/things in a model and in Realized by a collaboration. General use case is described by an ellipse with a solid line. Usually containing nama. Use case describes the process of the system (system requirements from the user perspective).

In general use case is :
·         - The pattern of behavior of the system
·         - A sequence of related transactions performed by an actor

Use case diagram consist of :
- Use case 
- Actors
·        - Relationship
·        - System boundary boxes (optional)
·        - Packages (optional)

Definition of Activity Diagram
Activity diagrams describe the flow of activity in the system that is being designed, how each flow begins, a decision that might occur, and how they ended. Activity diagrams can also illustrate the parallel processes that may occur in some execution. Activity diagram is a special state diagram, where most of the action and the state is mostly triggered by a transition at the completion of the previous state (internal processing). Therefore the activity diagram does not describe the internal behavior of a system (and the interaction between the subsystems) is exact, but rather describes the processes and pathways of activity above the general level. Describe business processes and sequence of activities in a process. Used in business modeling to show the sequence of activities of a business process. The structure is similar to a flowchart or diagram Data Flow Diagram in structured design. Very useful if we make this first diagram in modeling a process to help understand the overall process. Activity diagram is based on one or more use cases in use case diagrams.

Definition Of Sequence diagrams
Sequence diagram (sequence diagram) is a diagram which shows or displays the interactions between objects in the system are arranged in a sequence or time series. The interactions between objects including users, displays, and so on in the form of message. Sequence Diagram is used to describe a scenario or series of steps carried out as a response to an incident / event to produce a certain output. Sequence Diagram beginning of what had triggered the event, the process and what changes are happening internally and what the resulting output.
This diagram is specifically associated with the use case diagram. Sequence diagram also shows step by step what should happen to produce something within the use case. Sequence diagrams can also change the attributes of the class or extending methods that have been established by the class diagram, even creating a new class. Sequence diagrams model the flow of logic within a system in a visual manner.
Sequence diagrams are usually used for the purpose of analysis and design, focusing on the identification method in a system . Sequence diagrams are usually used for modeling :
    - Description of the existing system in a some use case in the use case diagram, which describes the relationship between actor and use case diagrams.
·         - The logic of the method (operation, function or procedure).
      - Logic of service (high- level method).

Use Case diagrams ( ex : The blogger ) 
          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 blogger 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 blogger, two obvious Actors are Users and Admin. Users want to use the system to connect with others while Admin 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. 

In the above sentence, phrases in bold are use case suspects. Furthermore, we conclude to the following main use cases :
  1. Manage Profile : Describes how a user creates a personal profile.
  2. Manage Posting : Describes how users add posting to their personal profile page.
  3. Manage Comment : Describes how users add comment to their personal profile page.
  4. Template : Describes how users add template to their personal profile page.
  5. Follow Blog : Describes how a user connects with other users' personal profile pages.
  6. Email or password wrong : Describes how admin connect with users.