Wednesday, December 11, 2013

Sequence Diagram

Do You Know Sequence Diagram ???

Sequence diagram is an interaction diagram that shows how processes operate with one another and in what order . It is a construct of a Message Sequence Chart . Sequence diagram shows object interactions arranged in a time sequence . It describes the objects and classes involved in the scenario and the sequence of messages exchanged between the objects needed to carry out the functions of the scenario . Sequence diagrams are usually associated with the realization of a use case in the Logical View of the system being developed . Sequence diagrams are sometimes called event diagrams , event scenarios.

A sequence diagram shows , as parallel vertical lines ( lifelines ) , different processes or objects that live simultaneously , and , as horizontal arrows , the messages exchanged between them , in the order in which they occur . This allows the specification of simple runtime scenarios graphically .

According to Whitten , Bentley , and Dittman (2004 , p702 ) Sequence diagram is a UML diagram that models the logical aspects of the use casedengan describe the interaction of messages - messages between objects in a time sequence . Sequence diagrams menunjakkansecar detail how objects interact with each other in a time sequence , read from top to bottom sequentially follow the logic of the use case . Posts of steps - steps usecase can be written in pseudoceode on the left of the diagram for easy reading treat .

Behavior or operations to be performed by each object is described code . The arrows represent the interaction between a line or a message sent to a specific object to invoke operations to meet the demand .

The purpose of the use of sequence diagrams:
1.       Communicate requirements to the technical team for this diagram can be easier to become a model elaborated design.
2.       Diagram is the most suitable to develop use-case model description into a design specification.

Use of Time sequence diagram:
1.       In the discovery stage: Sequence diagram of the selected use case created by the Business Analyst.
2.   In the construction phase: System analyst using use case and sequence diagrams created by the Business Analyst as inputs for manufacture of technical sequence diagrams which will be reviewed by the Business Analyst.
3.       At the final stage of verification and validation: a sequence diagram is used to design the test of a use-case scenario.

Basic steps for drawing sequence
     1.  On the Architecture menu, click New Diagram.
  1. Under Templates, click UML Sequence Diagram.
  2. Name the diagram.
  3. In Add to Modeling Project, select an existing modeling project in your solution, or Create a new modeling project, and then click OK.

A new sequence diagram appears with the Sequence Diagram toolbox. The toolbox contains the required elements and connectors.

To draw a sequence diagram :
   1.  Drag Lifelines from the Toolbox onto the diagram to represent instances of classes, components, actors, or devices.
2.  Draw messages to show how the lifelines collaborate to achieve a specific goal.
3. To show a message that comes from an unknown event source, or broadcasts to unknown recipients, draw an asynchronous message from or to blank space on the diagram. These messages are called found messages and lost messages.
4. Draw sequence diagrams for each major message to the same component or system.

I have created a blog about the sequence diagrams . Here I will explain the sequence diagram that I have made .

In the picture below , there are some which each lifeline lifeline that is obtained from the previous class diagram that I created . There are several Life line that is in sequence diagram blog , namely :
1.       Lifeline is the first user , wherein the user is the user who runs the blog blog . Here the user can enter , modify , or remove something that users want.
2.      Lifeline second is obtained from a collection usecase . Where the user can input data . Such as profile data .
3.     Lifeline third is derived from a particular class , where later the user will do something , such as deleting the data , the data input .
4.    Lifeline fourth is obtained from every table in the class diagram . Will be made ​​to run the command message .
5.       Lifeline fifth is obtained from an existing database connection in a class diagram that all orders will be associated with the database connection .

Here's an example of a Blog That Has Sequence diagram I create:

1.       Input Profile


Description : From the picture above shows there lina lifeline is where the contents of each of the lifeline is seen from the class diagram and usecase diagrams that I created earlier. The image menggambaran for our input data as the owner of the blog that will be stored in the database of the blog itself.

2.       Create New Post

Description : From the picture shows how the flow in creating a new post. Wherein, the user submits data to be post last postingkan will fill the post that will be created which will be posted on the blog user.

3.       ChangeTemplate

Description : The image above illustrates how the flow in changing the template. Where users will memililih user templates as you wish. Then the database will execute the command from the user. Later, the template will appear in the display user blogs.

4.       Edit Layout

Description : From the picture above, a user wants to edit the layout. Where the user will select the layout that cool until it is replaced, then the user gives the command to change the layout to suit the desires of the user, then the layout will change according to user choice earlier.

Description of the Sequence diagrams so blogs I have created. May be useful for all readers. If there is a less obvious or do not understand please forgive..

thank you for reading my blog ...
bye bye bye

source :


Tuesday, December 10, 2013

Activity Diagram

Do You Know Activity Diagram ?? ...

According to Whitten, Bentley, and Dittman (2004, p450-454), an activity diagram is a diagram that can be used to graphically depict the flow of a business process, the steps of a use case, or the logic of an object's behavior (methods). Activity diagrams are similar to flowcharts to describe the sequence of activities of the business process flow or a use case, but in contrast to the flowchart in the provision of mechanisms to describe the activities that appear at the same time.

Activity diagrams are graphical representations of workflows of stepwise activities and actions with support for choice, iteration and concurrency. In the Unified Modeling Language, activity diagrams are intended to model both computational and organisational processes (i.e. workflows). Activity diagrams show the overall flow of control.
Activity diagrams are constructed from a limited number of shapes, connected with arrows. The most important shape types:
·                     rounded rectangles represent actions;
·                     diamonds represent decisions;
·                     bars represent the start (split) or end (join) of concurrent activities;
·                     a black circle represents the start (initial state) of the workflow;
·                     an encircled black circle represents the end (final state).

Arrows run from the start towards the end and represent the order in which activities happen.

Hence they can be regarded as a form of flowchart. Typical flowchart techniques lack constructs for expressing concurrency However, the join and split symbols in activity diagrams only resolve this for simple cases; the meaning of the model is not clear when they are arbitrarily combined with decisions or loops

Ø Simple Control Flows
                 You can show a sequence of actions with branches and loops. For more information about how to use the elements described here, see the Describing Control Flow section of the topic :



Shape
Element
Description and Main Properties
1
Action
A step in the activity, in which the users or software perform some task.
The action can start when a token has arrived at all its incoming flows. When it ends, tokens are sent on all the outgoing flows.
·    Body - Specifies the action in detail.
·    Language - The language of the expression in Body.
·    Local Postconditions - Constraints that must be satisfied when execution ends. The goal achieved by the action.
·    Local Preconditions - Constraints that must be satisfied before execution begins.
2
Control Flow
A connector that shows the flow of control between actions. To interpret the diagram, imagine that a token flows from one action to the next.
To create a control flow, use the Connector tool.
3
Initial Node
Indicates the first action or actions in the activity. When the activity starts, a token flows from the initial node.
4
Activity Final Node
An end to the activity. When a token arrives, the activity terminates.
5
Decision Node
A conditional branch in a flow. Has one input and two or more outputs. An incoming token emerges on just one of the outputs.
6
Guard
A condition that specifies whether a token can flow along a connector. Most frequently used on the outgoing flows of a decision node.
To set a guard, right-click a flow, click Properties and then set the Guard property.
7
Merge Node
Required to merge flows that were split with a decision node. Has two or more inputs and one output. A token on any input emerges on the output.
8
Comment
Provides additional information about elements to which it is linked.
9
Call Behavior Action
An action that is defined in more detail on another activity diagram.
·    IsSynchronous - If true, the action waits until the activity terminates.
·    Behavior - The activity invoked.
(not shown)
Call Operation Action
An action that calls an operation on an instance of a class.
Activity
The flow of work that is depicted by an activity diagram. To see the properties of an activity, you must select it in UML Model Explorer.
·    Is Read Only - If true, the activity should not change the state of any object.
·    Is Single Execution - If true, there is at most one execution of this diagram at a time.
UML Activity Diagram
The diagram that displays an Activity. To see its properties, click an empty part of the diagram.


Ø    Concurrent Flows
            You can describe sequences of actions that execute at the same time. For more information, see Drawing Concurrent Flows :



Shape
Element
Description
11
Fork Node
Divides a single flow into concurrent flows. Each incoming token produces a token on each outgoing connector.
12
Join Node
Combines concurrent flows into a single flow. When every incoming flow has a token waiting, a token is produced on the output.
13
Send Signal Action
An action that sends a message or signal to another activity or to a concurrent thread in the same activity. The type and content of the message is implied by the action's title or specified in additional comments.
The action can send data in the signal, which can be passed to the action in an object flow or input pin (16).
14
Accept Event Action
An action that waits for a message or signal before the action can continue. The type of message the action can receive is implied by the title or specified in additional comments.
If the action has no incoming control flow, it produces a token whenever it receives a message.
The action can receive data in the signal, which can be passed on an object flow or output pin (17).
·    IsUnmarshall - If true, there can be several typed output pins, and data is unmarshalled onto them. If false, all data appears on one pin.

Here's an example of a Blog That Has Actifity diagram I made:


That's all I Explanation Regarding the Activity Diagram. May be useful for you all ...
byee all :) :) :)

source :

Wednesday, October 23, 2013

Class Diagram Blog

Do You Know Class Diagram ??

The class diagram is a static diagram. It represents the static view of an application. Class diagram is not only used for visualizing, describing and documenting different aspects of a system but also for constructing executable code of the software application.


The class diagram describes the attributes and operations of a class and also the constraints imposed on the system. The class diagrams are widely used in the modelling of object oriented systems because they are the only UML diagrams which can be mapped directly with object oriented languages.The class diagram shows a collection of classes, interfaces, associations, collaborations and constraints. It is also known as a structural diagram.


Purpose . . .


The purpose of the class diagram is to model the static view of an application. The class diagrams are the only diagrams which can be directly mapped with object oriented languages and thus widely used at the time of construction.


The UML diagrams like activity diagram, sequence diagram can only give the sequence flow of the application but class diagram is a bit different. So it is the most popular UML diagram in the coder community.


So the purpose of the class diagram can be summarized as:

·         Analysis and design of the static view of an application.
·         Describe responsibilities of a system.
·         Base for component and deployment diagrams.
·         Forward and reverse engineering.

How to draw Class Diagram?

Class diagrams are the most popular UML diagrams used for construction of software applications. So it is very important to learn the drawing procedure of class diagram. Class diagrams have lot of properties to consider while drawing but here the diagram will be considered from a top level view.

Class diagram is basically a graphical representation of the static view of the system and represents different aspects of the application. So a collection of class diagrams represent the whole system.

The following points should be remembered while drawing a class diagram:
  • The name of the class diagram should be meaningful to describe the aspect of the system.
  • Each element and their relationships should be identified in advance.
  • Responsibility (attributes and methods) of each class should be clearly identified.
  • For each class minimum number of properties should be specified. Because unnecessary properties will make the diagram complicated.
  • Use notes when ever required to describe some aspect of the diagram. Because at the end of the drawing it should be understandable to the developer/coder.
  • Finally, before making the final version, the diagram should be drawn on plain paper and rework as many times as possible to make it correct.

In the class diagram, there are several elements, including:
- Class     : class filled by a set of activities that had previously been in use case diagram that had previously been made​​.
- Attributes (-) : A typed value attached to each instance of a classifier. To add an attribute, click the Attributes section and then press ENTER. Type the signature of the attribute.
- Operations (+ ) : A method or function that can be performed by instances of a classifier. To add an operation, click the Operations section and then press ENTER.
- Association : A relationship between the members of two classifiers.


Now the following diagram is an example of a Class Diagram Blog. So from the above picture explains:
In the class diagram of this blog consists of 12 classes, that is: Main, Manage profile, Manage post, manage comment, Manage tamplate, Manage layout, table layout, table tempalate, user table, table post, comment table, database connection.
Clarification :
1.  In the main class consists of 8 operations consisting of: menu, manage profile, manage posts, manage tamplate, manage comments, manage layouts, manage apply for google adsense, login.
2.   In manage class layout consists of three operations, that is: delete layout, edit layout, and add layouts.
3.   In class manage profile consists of 5 operations, that is: set new profile, edit a profile, select profile, view profiles, set change photos.
4.  In class manage comment consists of 4 operations, that is: replay comment, view comments, delete comments, input comment.
5.   In the post consists of the manage class 3 operations, that is: edit posts, delete posts, create new post. Where class is related to class manage manage comment.
6.    In manage tamplate class consists of two operations, that is: tamplate edit and change tampalate.
7.    In class table layout consists of 3 attributes and 6 operations, including:
·        Attributes: blog post layout, layout attributes, and popular posts.
·       Operations: set and get the blog post layout, set and get attribute layout, and set and get  popular posts.
8.   In the user table class consists of 3 attributes and 4 operations , including :
·         Attributes : profile id , user name , and email .
·         Operations : set and get id profile and set and get the user name .
9.   Comment in the class table consists of 4 attributes and 4 operations , including :
·          Attributes : browse comment , comment date , email , and the recipient .
·          Operations : set and get the contents of comment , as well as set and get th comment .
10.  In the post- class table consists of 4 attributes and 6 operations , including :
·         Attributes : post title , post date , post content , posted .
·         Operations : set and get the post title , post date set and get , set and get the post content .
11. In the table tamplate class consists of 4 attributes and 8 operations , including :
·          Attributes : type tamplate , layout tamplate , tamplate color , font tamplate .
·          Operations : set and get kind of tamplate , set and get tamplate layout , set and get the  color                                tamplate , set and get tamplate , as well as set and get the font tamplate .
12. In the database connection consists of 4 attributes and 4 operations , including :
·         Attributes : user , database , username , password .
·         Operations : open connection , open a select query , update query select, close the query .

many explanations of the class diagram blog that I have made and I explained, hopefully useful for all of you who has reading it ..