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

Wednesday, October 16, 2013

Use Case Blog

Do You Know Use Case ??
In software and systems enginnering, a use case is a list of steps, typically defining interactions between a role (known in UML as an "actor") and a system, to achieve a goal. The actor can be a human or an external system.
In systems engineering, use cases are used at a higher level than within software engineering, often representing missions or stackholders goals. The detailed requirements may then be captured in sysML or as contractual statements.
As an important requirement technique, use case has been widely used in modern software engineering over the last two decades. Use case driven development is a key characteristic of process models and frameworks likeUP, IBM  RUP, Oracle OUM, etc. With its iterative and evolutionary nature, use case is also a good fit for agile development.

A use case diagram contains four components.
·         The boundary, which defines the system of interest in relation to the world around it.
·        The actors, A use case defines the interactions between external actors and the system under consideration to accomplish a goal. Actors must be able to make decisions, but need not be human: "An actor might be a person, a company or organization, a computer program, or a computer system — hardware, software, or both. Actors are always stakeholders, but many stakeholders are not actors, since they " never interact directly with the system, even though they have the right to care how the system behaves.
·         The use cases, which are the specific roles played by the actors within and around the system.
·         The relationships between and among the actors and the use cases.

A use case diagram looks something like a flowchart. Intuitive symbols represent the system elements. Here's a usecase blog example:
In the example above is an example of making usecase blog, which you can find out how to use the blog flow between admins and users. A use case diagram contains four components., that is:
- User: that is user who has registered so as to have an account and got the blog page along with its URL. Members can set up a blog, profile (about me page content), replacing the general blog settings page (header, the title of the blog, moto, URL name), as well as viewing a user own blog (preview).
- Admin blog: Administrator in this case has the task of managing members, general setting of data, the data profiledan header data.
- Visitor: visitors or readers of the blog page are owned member. Access rights only permits a look at the blog, about me, leave a comment on a post member and delete comment.
- Admin googleadmin google has a role to give permission if you are new to the blog can be registered or not. of course, if permitted shall be in accordance with the terms specified. admin later google will give advertisements to the users blog.

before, you must have an account if you want to have a blog. by entering your name, email address, gender, and blog address to be accessed later. who will be applying for the blog admin to google to be approved by the blog admin or tell whether the data that has been entered in line or still a weakness.

Connecting between the actor with the activities carried out named association. Activities that exist in the described usecase oval. If link between activity in general to the activity which specifically called generalization. While the link between the oval with oval called the line include. Unlike the case with extend, extend is used to connect the oval with oval, but extend the time if it is used one time activity but it must be repeated, as an example of usecase my blog which is between login with email or password is wrong.

In usecase blog that I made, have 7 general activities, including:
1.      Manage profiles
where the user can input, for example, input the name, address of the blog. delete, for example, removing the blog name, blog title. Edit, edit the title of the blog example, edit blog readers. Change the photos on the blog users will.
2.      Manage post
where users can create a post as you wish, delete the previous post that has been made, and there is a post edit post if you want to add.
3.       Manage comment
manage comment related to managing the post, because the comment relates to the post of the user, if the visitor wants to see comment before posting it first. Visitors can also delete the comment that he made when any, visitors can also see some comment from other users even visitors can view user profiles are visitor visit.
4.      Manage tamplate
tamplate can change at will, and select the template you want users to use.
5.      Manage layout
layout in your blog can be deleted, added at the layout, as well as edit the layout position as the user desires.
6.      Login
before operating the blog users, users must login first to address users blog, if the blog has not been logged in user, then the user can not use the blog.
7.      Email or pass wrong
this activity exist when the user enter the wrong email or password, if any user input, it will notify the admin of the error.
8.      Applay for google adsense
apply for google adsense users when a new blog has been approved by the admin google. new blog that will be use by the user.
9.      Less requirement

less recruitment blog informs potential users if there is a shortage in the data entry is needed. and candidates users have to repeat activities that before he had been working on.

many explanations of the usecase blog that I made, I hope you all understand the meaning of the picture above. more or less I apologize ..