component diagram
DESCRIPTION
Component Diagram. E. Haodudin Nurkifli Universitas Ahmad Dahlan Pertemuan. PLAN OF TALK. Pengenalan komponen Komponen dan diagram komponen di uml 2.0 Case study Elemen komponen Component view: black-box view dan white-box view Diagram Deployment. INTRODUCTION. - PowerPoint PPT PresentationTRANSCRIPT
PLAN OF TALK
Pengenalan komponen Komponen dan diagram komponen di uml 2.0 Case study Elemen komponen Component view: black-box view dan white-box
view Diagram Deployment
INTRODUCTION UML component diagrams : mendeskripsikan
komponen software dan kebergantungannya dengan yang lain Komponen merupakan unit otonom dalam sistem Komponen dapat digunakan untuk mendefinisikan ukuran dan
kompleksitas sistem S/W komponen diagram UML memungkinkan untuk memodelkan
komponen perangkat lunak tingkat tinggi, dan interface untuk komponen tersebut
Komponen dan subsistem dapat di-REUSED dan di-REPLACED Terdapat Kebergantungan antara 2 elemen, jika terdapat
perubahan pada 1 elemen bisa mempengaruhi lainnya. Diagram komponen sering disebut sebagai “wiring diagrams” Wiring komponen merepresentasikan komponen dan
dependensi diantara komponen tersebut.
INTRODUCTIONAn Uml diagram classification:
Static Use case diagram, Class diagram
Dynamic State diagram, Activity diagram, Sequence diagram,
Collaboration diagram Implementation
Component diagram, Deployment diagram
UML components diagrams are Implementation diagrams:
menggambarkan elemen-elemen yang berbeda yang dibutuhkan untuk mengimplementasikan sistem
INTRODUCTIONAnother classification:
Behavior diagrams Jenis diagram yang menggambarkan perilaku suatu sistem
Meliputi activity, state machine, dan use case diagrams, interaction diagrams
Interaction diagrams Sebuah subset dari diagram perilaku yang menekankan
interaksi objek. Meliputi collaboration, activity, sequence diagrams
Structure diagrams Jenis diagram yang menggambarkan unsur-unsur
spesifikasi yang terlepas dari waktu. Meliputi class, composite structure, component, deployment
UML components diagrams are structure diagrams
COMPONENT IN UML 2.0
Modular unit dengan antarmuka yang terdefinisi dengan baik yang dapat diganti dalam lingkungannya
Autonomous unit dalam sistem Memiliki satu atau lebih antarmuka ‘provided’ dan
‘required’ Internanya tersembunyi dan tidak dapat diakses Komponen diencapsulasi Dependensinya dirancang sedemikian rupa sehingga
dapat menjadi seindependen mungkin
CASE STUDY Pengembangan aplikasi jajak pendapat siswa tentang
program Siswa dapat
Membaca Menyisipkan Mengupdate Membuat data permanen mengenai program di jadwal
Seorang profesor hanya bisa melihat elaborasi statistik data
Aplikasi mahasiswa harus diinstal di klien pc (sw1, sw2) Manajer aplikasi harus diinstal di klien pc (di kantor
manajer) Ada satu atau lebih server dengan DataBase dan
komponen untuk manajemen program
COMPONENT NOTATION A component is shown as a rectangle A component is shown as a rectangle
withwith A keyword <<component>>A keyword <<component>> Optionally, in the right hand corner Optionally, in the right hand corner
a component icon can be a component icon can be displayeddisplayed
A component icon is a rectangle with A component icon is a rectangle with two smaller rectangles jutting out from two smaller rectangles jutting out from the left-hand sidethe left-hand side
This symbol is a visual stereotypeThis symbol is a visual stereotype The component nameThe component name Components can be labelled with a stereotypeComponents can be labelled with a stereotypethere are a number of standard stereotypes there are a number of standard stereotypes ex: <<entity>>, <<subsystem>>ex: <<entity>>, <<subsystem>>
COMPONENT ELEMENTS A component can have
InterfacesSebuah interface merupakan deklarasi dari satu set
operasi dan obligationsUsage dependencies
usage dependency adalah hubungan yang salah satu unsurmemerlukan unsur lain untuk implementasi penuh
PortsPort merupakan titik interaksi antara komponen
serta lingkunganConnectors
Connect two components Connect the external contract of a component to the
internal structure
INTERFACE Komponen mendefinisikan perilaku dalam hal
interface provided provided dan dan required required An interface An interface
Merupakan definisi dari kumpulan satu atau lebih operasi
Hanya menyediakan operasi tetapi tidak implementasinya
Implementasi biasanya disediakan oleh kelas / komponen
Dalam sistem yang kompleks, Implementasi disediakan oleh sekelompok kelas daripada satu kelas
INTERFACE May be shown using a rectangle
symbol with a keyword <<interface>> preceding the name
For displaying the full signature, the interface rectangle can be expanded to show details
Can beCan be ProvidedProvided RequiredRequired
INTERFACE A provided interface
Characterize services that the component offers to its environment
Is modeled using a ball, labelled with the name, attached by a solid line to the component
A required interface A required interface Characterize services that the component expects Characterize services that the component expects
from its environmentfrom its environment Is modeled using a socket, labelled with the name, Is modeled using a socket, labelled with the name,
attached by a solid line to the componentattached by a solid line to the component In UML 1.x were modeled using a dashed arrowIn UML 1.x were modeled using a dashed arrow
INTERFACE 2 komponen / kelas dapat memberikan atau
membutuhkan interface yang sama sehingga notasi dapat dikombinasikan.
Notasi BNotasi Ball-and-socket all-and-socket menggambarkan interaksi menggambarkan interaksi diantara 2 komponen yang saling membutuhkandiantara 2 komponen yang saling membutuhkan
If an interface is shown using the rectangle symbol, If an interface is shown using the rectangle symbol, we can use an alternative notation, using we can use an alternative notation, using dependency arrowsdependency arrows
INTERFACE
A component Specifies a CONTRACT of the services that it provides to
its clients and that it requires from others components in terms of its provided and required interfaces
Can be replacedThe system can be extended
Pada kontek sistem dimana terdapat multipel Pada kontek sistem dimana terdapat multipel komponen yang membutuhkan atau memberikan komponen yang membutuhkan atau memberikan interface tertentu, notasi abstrak dapat digunakan interface tertentu, notasi abstrak dapat digunakan untuk mengkombinasikan.untuk mengkombinasikan.
DEPENDENCIES
Usage Dependency usage dependency merupakan relasi dimana
satu elemen membutuhkan elemen lain untuk implementasi penuh
Merupakan dependensi dimana client membutuhkan kehadiran suplier.
Digambarkan sebagai panah putus dengan <<use>> keyword
The arrowhead point from the dependent component to the one of which it is dependent
Components can be Components can be connected by usage connected by usage dependenciesdependencies
PORT
Is shown as a small square symbolIs shown as a small square symbol Ports can be named, and the name Ports can be named, and the name
is placed near the square symbolis placed near the square symbol Is associated with the interfaces Is associated with the interfaces
that specify the nature of the that specify the nature of the interactions that may occur over a interactions that may occur over a portport
Menspesifikasikan titik interaksiMenspesifikasikan titik interaksi Between that component and its environmentBetween that component and its environment Between that component and its internal partsBetween that component and its internal parts
PORT Ports can support unidirectional communication
or bi-directional communication
If there are multiple If there are multiple interfaces associated interfaces associated with a port, these with a port, these interfaces may be interfaces may be listed with the interface listed with the interface icon, separated by a icon, separated by a commascommas
PORT
Semua interaksi komponen dengan lingkungan dilakukan melalui port.
Internal tertutup rapat dari lingkunganPorts are not defined in UML 1.x
EXTERNAL VIEW
An external view (or black box view) memperlihatkan properti dan operasi yang publik
The interface can be listed in the The interface can be listed in the compartment of a component boxcompartment of a component box
Komponen memiliki external view dan internal Komponen memiliki external view dan internal viewview
INTERNAL VIEW
An internal, atau white box view komponen merupakan kelas/komponen yang terealisasikan dalam komponen
Realization is Realization is merupakan realisasi diantara 2 merupakan realisasi diantara 2 set model elemenset model elemen Satu merepresentasikan spesifikasiSatu merepresentasikan spesifikasi Lainnya merepresentasikan implementasiLainnya merepresentasikan implementasi
INTERNAL VIEW
The internal class that realize the behavior of a component may be displayed in an additional compartment
Compartments can also be used to Compartments can also be used to display parts, connectors or display parts, connectors or implementation artifactsimplementation artifacts
An artifact is the specification of a An artifact is the specification of a phisycal piece of informationphisycal piece of information
ASSEMBLY Dua macam konektorDelegationAssembly
ASSEMBLY CONNECTORKonektor diantara 2 komponen mendefinisikan
bahwa satu komponen memberikan layanan yang dibutuhkan oleh komponen lain.
Harus didefinisikan dari required interface ke provided interface
An assembly connector is notated by a “ball-and-socket” connection
DELEGATION DELEGATION CONNECTORDELEGATION CONNECTOR
Links the external contract of a component to Links the external contract of a component to the internal realizationthe internal realization
Represents the forwarding of signalsRepresents the forwarding of signals He must only be defined between used He must only be defined between used
interfaces or ports of the same kindinterfaces or ports of the same kind
DELEGATIONThe target interface must support a signature compatible
with a subset of operations of the source interfaceA port may delegate to a set of ports on subordinate
componentsThe union of the target interfaces must be signature
compatible with the source interface Semantics:
Is a declaration that behaviour that is available on a component instance is not realized by that component itself, but by another instance that has compatible capabilities
Is used to model the hierarchical decomposition Message and signal flow will occur between the connected
ports
DEPLOYMENT DIAGRAMS
Deployment diagrams Show the physical relationship between
hardware and software in a systemHardware elements:
Computers (clients, servers) Embedded processors Devices (sensors, peripherals)
Are used to show the nodes where software components reside in the run-time system
There is a strong link between components diagrams There is a strong link between components diagrams and deployment diagramsand deployment diagrams
DEPLOYMENT DIAGRAMS
Deployment diagram Deployment diagram Contains nodes and connectionsContains nodes and connections A node usually represent a piece of hardware A node usually represent a piece of hardware
in the systemin the system A connection depicts the A connection depicts the
communication path communication path used by the hardware to used by the hardware to communicate communicate
Usually indicates the Usually indicates the method such as TCP/IPmethod such as TCP/IP
DEPLOYMENT DIAGRAMS
An artifactAn artifact Is the specification of a Is the specification of a
phisycal piece of phisycal piece of informationinformation
Ex: source files, binary Ex: source files, binary executable files, table executable files, table in a database system,in a database system,….….
An artifact defined by An artifact defined by the user represents a the user represents a concrete element in concrete element in the physical worldthe physical world
Deployment diagrams Deployment diagrams contain artifactcontain artifact
DEPLOYMENT DIAGRAMS An artifact manifest one or more model elements A <<manifestation>> is the concrete physical of
one or more model elements by an artifact This model element often is a component A manifestation is A manifestation is
notated as a dashed notated as a dashed line with an openline with an open arrow-head labeled arrow-head labeled with the keyword with the keyword <<manifest>> <<manifest>>
REFERENCIES UML 2.0 Superstructure Specification
August 2, 2003 UML 2 Superstructure Final Adopted Specificationwww.omg.org/cgi-bin/doc?ptc/2003-08-02
The Diagrams of UML 2.0by Scott W. Ambler, 2003-2004 www.agilemodeling.com/essays/umlDiagrams.htm
UML overviewBy Mandar Chitnis, Pravin Tiwari, & Lakshmi Ananthamurthy http://www.developer.com/design/article.php/1553851