Vous êtes sur la page 1sur 34

AntoniusHendrik

IntroductiontoObjectorientedParadigmandUML
BeforeObjectOriented
SoftwareCrisis(Late,OverBudget,ResidualFault)
FinancialAspect(Trainingcost,impactofnew
technology effectonmaintenancephase) technology,effectonmaintenancephase)
MaintenanceAspect(Reuse&modify)
Requirements,analysis,anddesignaspect Requ e e ts, a a ys s, a d des g aspect
TeamProgrammingAspect(Communicationamong
teammembers)
PlanningAspect
TestingAspect
DocumentationAspect DocumentationAspect
Obj O i d P i ObjectOrientedProgramming
Definition Definition
ObjectOrientedProgramming(OOP) isa
programmingparadigmthatusesobjects"andtheir programmingparadigmthatuses objects andtheir
interactionstodesignapplicationsandcomputer
programs.(Wikipedia)
WhyObjectOriented? (1)
Thestructuredparadigmwassuccessfulinitially
Itstartedtofailwithlargerproducts(>50,000LOC)
Postdelivery maintenanceproblems(today,70to80
percentoftotaleffort)
R St t d th d Reason:Structuredmethodsare
Actionoriented(e.g.,finitestatemachines,dataflow
diagrams);or g );
Dataoriented(e.g.,entityrelationshipdiagrams,
Jacksonsmethod);
Butnotboth
WhyObjectOriented? (2)
Bothdataandactionsareofequalimportance
Obj t Object:
Asoftwarecomponentthatincorporatesbothdataand
theactionsthatareperformedonthatdata p
Example:
Bankaccount
Data: accountbalance
Actions: deposit,withdraw,determinebalance p , ,
StructuredVSObjectOriented
Strengths of the ObjectOriented StrengthsoftheObject Oriented
Paradigm
Withinformationhiding,postdelivery maintenanceis
safer
D l i i Developmentiseasier
Welldesignedobjectsareindependentunits
ACl i l d ll i f i l AClassicalproductconceptuallyconsistsofasingle
unit(althoughitisimplementedasasetofmodules)
TheObjectOrientedparadigmpromotesreuse TheObjectOrientedparadigmpromotesreuse
The ObjectOriented Paradigm in TheObjectOrientedParadigmin
Perspective
TheObjectOrientedparadigmhastobeused
correctly
Allparadigmsareeasytomisuse Allparadigmsareeasytomisuse
Whenusedcorrectly,theObjectOrientedparadigm
cansolvesome(butnotall)oftheproblemsofthe
l l d Classicalparadigm
TheObjectOrientedparadigmhasproblemsofits
own own
TheObjectOrientedparadigmisthebestalternative
availabletoday(2005)
However,itiscertaintobesuperceded bysomething
betterinthefuture
Tugas (Dikumpulkan 2 minggu Tugas (Dikumpulkan 2minggu
setelah pertemuan sekarang) p g)
Buatlah sebuah makalah singkat mengenai:
1. Apakah ObjectOrientedadalah paradigma p j p g
pemrograman yangterbaik?Sebutkan pendapat pribadi
kalian.
B ik d t ib di k li t t k k 2. Berikan pendapat pribadi kaliantentang kekurangan
dari paradigma pemrograman ObjectOriented.
3. Apakah paradigma pemrograman ObjectOriented 3 p p g p g j
sudah dilewati oleh paradigma lain?Jika ya sebutkan
dan berikan alasannya.
(J l b tk f i t t k li (Jangan lupa sebutkan referensi tempat kalianmengacu
pendapat kaliandalam makalah ini)
IntroducingUML
UnifiedModelingLanguage(UML)isa
Standardizedmodelinglanguage consistingofan
i d fdi d l d h l integratedsetofdiagrams,developedtohelpsystem
andsoftwaredevelopersaccomplishthefollowingtask
Specification Specification
Visualization
ArchitectureDesign
Construction Construction
SimulationandTesting
Documentation
(UML2forDummies)
IntroducingUML
UnifiedModelingLanguage (UML)isastandardized
generalpurposemodelinglanguageinthefieldof
softwareengineering UMLincludesasetofgraphical softwareengineering.UMLincludesasetofgraphical
notationtechniquestocreateabstractmodelsof
specificsystems,referredtoasUMLmodel. p y ,
(Wikipedia)
WhatisModeling?
Forvisualizing,specifying,constructing,and
documentingtheartifactsofasoftware documentingtheartifactsofasoftware
intensivesystem.
ReasonsbehindUML
Therewereoverthan50differentObjectOriented
graphicalnotations
D l h d i i h h h Developershardtocommunicatewitheachothers
becauseofdifferentnotations
AdaptationofObject Orientedtechniquesbecomes AdaptationofObjectOrientedtechniquesbecomes
difficult
Companiesandindividualsreluctanttoinvestin Companiesandindividualsreluctanttoinvestin
trainingortools
CreationandEvolutionofUML(1)
In1994,RationalSoftwareCorporationhiredJames
Rumbaugh andGradyBooch.Togethertheystarted
workonaUnifiedMethod workonaUnifiedMethod.
In1995,Ivar Jacobsonjoinedtheteam.
Thethreemethodologistswerecollectivelyreferredto Thethreemethodologistswerecollectivelyreferredto
astheThreeAmigos.
In1996,RationalSoftwareCorporationtaskedthe In1996,RationalSoftwareCorporationtaskedthe
ThreeAmigoswiththedevelopmentofanon
proprietaryUnifiedModelingLanguage.
CreationandEvolutionofUML(2)
In1997,UML1.1,wassubmittedtotheOMGinAugust1997
andadoptedbytheOMG
UMLbecomeInternationalstandard U beco e te at o a sta da d
ISO/IEC19501:2005Informationtechnology Open
DistributedProcessing UnifiedModelingLanguage(UML)
Version1.4.2.
( ) InlateryearsUMLRevisionTaskForce(RTF)has
updatedUMLseveraltimes
By2000itbecameclearthatnewdevelopment
( h ) h d l environments(suchasJava),approachesandtool
capabilitiesweredifficulttoincorporateintoUML
withoutmoredrasticchanges
I UML d In2003,UML2wasapproved
UMLDiagrams
Categorization(1)
Structuraldiagrams St uctu a d ag a s
whatthingsmustbeinthesystembeingmodeled
(Class,component,compositestructure,deployment,
object,package)
Behavioraldiagrams
h h i h b i d l d whatmusthappeninthesystembeingmodeled
(activity,statemachine,usecase)
Interactiondiagrams Interactiondiagrams
theflowofcontrolanddataamongthethingsinthe
systembeingmodeled y g
(Communication,Interactionoverview,sequence,timing)
Categorization
Staticdiagrams
Showthestaticfeaturesofthesystem(similartostructure
diagrams) diagrams)
Dynamicdiagrams
Showhowthesystemevolvesovertime y
(statemachine,timing)
Functionaldiagrams
h h d l f b h d l h Showthedetailsofbehaviorsandalgorithms
Howthesystemaccomplishesthebehaviorsrequestedofit.
(Usecase,interaction,activity) (Usecase,interaction,activity)
Organizing(1)
Whousesthesystem?
Showtheuser(actor)ontheirusecasediagram
Whatisthesystemmadeof?
Cl di (l i l t t ) tdi Classdiagram(logicalstructure),componentdiagram
(physicalstructure)
Wherearethecomponentslocatedinthesystem?
Indicatewherethecomponentswillliveandrunon p
Deploymentdiagram
Organizing(2)
Whendoimportanteventshappeninthesystem?
Showwhatcausestheobjecttoreactanddotheirwork
withstatediagramandinteractiondiagram withstatediagramandinteractiondiagram
Whyisthissystemdoingthethingsitdoes? Whyisthissystemdoingthethingsitdoes?
Identifythegoaloftheusersandcapturetheminuse
cases
Howisthissystemgoingtowork?
Showthepartsoncompositestructurediagramsanduse
communicationdiagramtoshowtheinteraction
Anditsrelationshipwithobjectoriented
Obj d Cl ObjectandClass
Object:
Somethingusefulthathasidentity,structure,andbehavior
Example:Lassie,Max,etc.
Class:
AFamilyofobject
Example:Dog,Human,etc.
Instance:
objectisaninstanceofclass,Theobjectconsistsof
state/Structure(attribute)andthebehaviorthat'sdefined
intheobject'sclass. intheobject sclass.
Example:Lassieisaninstanceofdog
Abstraction
Abstraction:
Describetheessenceofanobjectforapurpose
Encapsulation:
S i h f f h bj SummarizetheImportantfeaturesoftheobjects.
I f ti Hidi InformationHiding:
Hidingthedetailsofhowanobjectperformsitsjob.
CompositionandAggregation
Composition:
Whenthepartsofanobjectarecompletelyboundupin
th lif fth h l bj t th h l bj ti thelifeofthewholeobject,thewholeobjectis
composedofthem
Aggregation:
Somepartsofawholeobjectexistbeyondthelifeofthe p j y
whole
Hierarchy(1)
Hierarchy:
Anyrankingororderingofabstractionsintoatreelike
t t structure.
Generalization: Generalization:
Agroupofobjectswithsomecommonfeaturescanbe
defineintoaclass
Specialization:
Agroupofobjectswithuniquefeaturesnotsharedwith
othergroupcanbedefineintoaclass
Hierarchy(2)
Inheritance:
Specificobjectinheritthefeaturesofthegenericobject
( l ) (orclass)
Polymorphism: Polymorphism:
Whenobjectshavethesamebehaviorbutperformit
differently.
OtherTerms(1)
Modularity Modularity
Thebreakingupofsomethingcomplexintomanageable
pieces
A ib Attribute
structure(Field)ofanobject
Operation Operation
Abehaviorormethodofanobject
Component p
Arealworldobjectorunitofsoftwarecodethatisso
selfcontainedthatitcanbeswappedoutandreplaced
byanotherobject,withouttheuserknowingthe byanotherobject,withouttheuserknowingthe
difference
O h T (2) OtherTerms(2)
Stereotypes Stereotypes
Defineanewmodelelementintermsofanothermodel
element
Properties
specificattribute,ofaUMLelement,Alsocalledtagged
l values
PropertiescanbecreatedbyUMLmodelersforany
purpose p p
OtherTerms(3)
Notes
AnotecanbeaddedtoanyUMLelement
Thenotemaybeanchoredtoanelementwithadashed
line
Therecanbeuptoone
MaintainScheduleFormper
usersession.
MaintainScheduleForm
UMLTools
Amodelingtoolaidsthedevelopmentofsoftwareby
keepingtrackofallsoftwareengineeringsymbols
UMLtoolscandothefollowingtask UMLtoolscandothefollowingtask
DrawingUMLdiagrams
DrawingUMLnotationcorrectly g y
Organizenotationsanddiagramsintopackage
Searchingforspecificelementsindiagrams
R E i i ( d t di ) ReverseEngineering(codetodiagrams)
ModelReporting(generatingreport)
Generatingcode(diagramstocode) g ( g )
WhichMethodology?
SoftwareDevelopmentLifeCycle
(Waterfall,Spiral,etc.)
CustomizedMethodology
(O B h Obj R PC l i A il P) (OMT,Booch,Objectory,RUP,Catalysis,Agile,XP)
References
StephenR.Schach,ObjectOrientedandClassical
SoftwareEngineering,6
th
ed.,chapter13
Mi h lJ Ch l &J A S h d UML F MichaelJ.Chonoles &JamesA.Schardt,UML2For
Dummies,2003,chapter12
Wikipedia Wikipedia

Vous aimerez peut-être aussi