ootd lecture - 1
Post on 19-Jul-2016
4 Views
Preview:
DESCRIPTION
TRANSCRIPT
Antonius Hendrik
Introduction to Object‐oriented Paradigm and UML
Before Object‐OrientedSoftware Crisis (Late, Over Budget, Residual Fault)Financial Aspect (Training cost, impact of new technology effect on maintenance phase)technology, effect on maintenance phase)Maintenance Aspect (Reuse & modify)Requirements, analysis, and design aspectRequ e e ts, a a ys s, a d des g aspectTeam Programming Aspect (Communication among team members)Planning Aspect Testing AspectDocumentation AspectDocumentation Aspect
Obj O i d P iObject‐Oriented Programming DefinitionDefinition
“Object‐Oriented Programming (OOP) is a programming paradigm that uses “objects" and their programming paradigm that uses objects and their interactions to design applications and computer programs. “ (Wikipedia)
Why Object‐Oriented? (1)The structured paradigm was successful initially
It started to fail with larger products (> 50,000 LOC)Postdelivery maintenance problems (today, 70 to 80 percent of total effort)R St t d th d Reason: Structured methods are
Action oriented (e.g., finite state machines, data flow diagrams); or g );Data oriented (e.g., entity‐relationship diagrams, Jackson’s method);But not both
Why Object‐Oriented? (2)Both data and actions are of equal importance
Obj t Object: A software component that incorporates both data and the actions that are performed on that datap
Example:Bank account
Data: account balanceActions: deposit, withdraw, determine balancep , ,
Structured VS Object‐Oriented
Strengths of the Object‐OrientedStrengths of the Object Oriented Paradigm
With information hiding, postdelivery maintenance is saferD l i iDevelopment is easierWell‐designed objects are independent unitsA Cl i l d ll i f i l A Classical product conceptually consists of a single unit (although it is implemented as a set of modules)The Object‐Oriented paradigm promotes reuseThe Object‐Oriented paradigm promotes reuse
The Object‐Oriented Paradigm inThe Object‐Oriented Paradigm in Perspective
The Object‐Oriented paradigm has to be used correctly
All paradigms are easy to misuseAll paradigms are easy to misuseWhen used correctly, the Object‐Oriented paradigm can solve some (but not all) of the problems of the l l dClassical paradigm
The Object‐Oriented paradigm has problems of its ownownThe Object‐Oriented paradigm is the best alternative available today (2005)
However, it is certain to be superceded by something better in the future
Tugas (Dikumpulkan 2 mingguTugas (Dikumpulkan 2 minggusetelah pertemuan sekarang)p g)Buatlah sebuah makalah singkat mengenai:1. Apakah Object‐Oriented adalah paradigmap j p g
pemrograman yang terbaik? Sebutkan pendapat pribadikalian.B ik d t ib di k li t t k k2. Berikan pendapat pribadi kalian tentang kekurangandari paradigma pemrograman Object‐Oriented.
3. Apakah paradigma pemrograman Object‐Oriented 3 p p g p g jsudah dilewati oleh paradigma lain? Jika ya sebutkandan berikan alasannya.
(J l b tk f i t t k li (Jangan lupa sebutkan referensi tempat kalian mengacupendapat kalian dalam makalah ini)
Introducing UMLUnified Modeling Language (UML) is a “Standardized modeling language consisting of an i d f di d l d h l integrated set of diagrams, developed to help system and software developers accomplish the following task
SpecificationSpecificationVisualizationArchitecture DesignConstructionConstructionSimulation and TestingDocumentation
(UML 2 for Dummies)
Introducing UMLUnified Modeling Language (UML) is a standardized general‐purpose modeling language in the field of software engineering UML includes a set of graphical software engineering. UML includes a set of graphical notation techniques to create abstract models of specific systems, referred to as UML model.p y ,(Wikipedia)
What is Modeling?For visualizing, specifying, constructing, and documenting the artifacts of a software‐documenting the artifacts of a softwareintensive system.
Reasons behind UMLThere were over than 50 different Object‐Oriented graphical notationsD l h d i i h h h Developers hard to communicate with each others because of different notationsAdaptation of Object Oriented techniques becomes Adaptation of Object‐Oriented techniques becomes difficultCompanies and individuals reluctant to invest in Companies and individuals reluctant to invest in training or tools
Creation and Evolution of UML (1)In 1994, Rational Software Corporation hired James Rumbaugh and Grady Booch. Together they started work on a Unified Methodwork on a Unified Method.In 1995, Ivar Jacobson joined the team.The three methodologists were collectively referred to The three methodologists were collectively referred to as the Three Amigos.In 1996, Rational Software Corporation tasked the In 1996, Rational Software Corporation tasked the Three Amigos with the development of a non‐proprietary Unified Modeling Language.
Creation and Evolution of UML (2)In 1997, UML 1.1, was submitted to the OMG in August 1997 and adopted by the OMGUML become International standardU beco e te at o a sta da d
ISO/IEC 19501:2005 Information technology — Open Distributed Processing — Unified Modeling Language (UML) Version 1.4.2.
( )In later years UML Revision Task Force (RTF) has updated UML several timesBy 2000 it became clear that new development
( h ) h d lenvironments (such as Java), approaches and tool capabilities were difficult to incorporate into UML without more drastic changesI UML dIn 2003, UML 2 was approved
UML Diagrams
Categorization (1)Structural diagrams St uctu a d ag a s
what things must be in the system being modeled(Class, component, composite structure, deployment, object, package)
Behavioral diagrams h h i h b i d l dwhat must happen in the system being modeled
(activity, state machine, use case)Interaction diagramsInteraction diagrams
the flow of control and data among the things in the system being modeledy g
(Communication, Interaction overview, sequence, timing)
CategorizationStatic diagrams
Show the static features of the system (similar to structure diagrams)diagrams)
Dynamic diagramsShow how the system evolves over timey
(state‐machine, timing)Functional diagrams
h h d l f b h d l hShow the details of behaviors and algorithmsHow the system accomplishes the behaviors requested of it.
(Use case, interaction, activity)(Use case, interaction, activity)
Organizing (1)Who uses the system?
Show the user (actor) on their use case diagram
What is the system made of?Cl di (l i l t t ) t di Class diagram (logical structure), component diagram (physical structure)
Where are the components located in the system?Indicate where the components will live and run on pDeployment diagram
Organizing (2)When do important events happen in the system?
Show what causes the object to react and do their work with state diagram and interaction diagramwith state diagram and interaction diagram
Why is this system doing the things it does?Why is this system doing the things it does?Identify the goal of the users and capture them in use cases
How is this system going to work?Show the parts on composite structure diagrams and use communication diagram to show the interaction
And its relationship with object‐oriented
Obj d ClObject and ClassObject:
Something useful that has identity, structure, and behaviorExample: Lassie, Max, etc.
Class: A Family of objectExample: Dog, Human, etc.
Instance: object is an instance of class, The object consists of state/Structure (attribute) and the behavior that's defined in the object's class. in the object s class. Example: Lassie is an instance of dog
AbstractionAbstraction:
Describe the essence of an object for a purpose
Encapsulation: S i h f f h bjSummarize the Important features of the objects.
I f ti Hidi Information Hiding: Hiding the details of how an object performs its job.
Composition and AggregationComposition:
When the parts of an object are completely bound up in th lif f th h l bj t th h l bj t i the life of the whole object, the whole object is composed of them
Aggregation: Some parts of a whole object exist beyond the life of the p j ywhole
Hierarchy (1)Hierarchy:
Any ranking or ordering of abstractions into a tree‐like t tstructure.
Generalization: Generalization: A group of objects with some common features can be define into a class
Specialization: A group of objects with unique features not shared with other group can be define into a class
Hierarchy (2)Inheritance:
Specific object inherit the features of the generic object ( l )(or class)
Polymorphism:Polymorphism:When objects have the same behavior but perform it differently.
Other Terms (1)ModularityModularity
The breaking up of something complex into manageable pieces
A ibAttributestructure (Field) of an object
OperationOperationA behavior or method of an object
ComponentpA real world object or unit of software code that is so self‐contained that it can be swapped out and replaced by another object, without the user knowing the by another object, without the user knowing the difference
O h T (2)Other Terms (2)StereotypesStereotypes
Define a new model element in terms of another model element
Propertiesspecific attribute, of a UML element, Also called tagged lvalues
Properties can be created by UML modelers for any purposep p
Other Terms (3)NotesA note can be added to any UML elementThe note may be anchored to an element with a dashed line
There can be up to one MaintainScheduleForm per user session.MaintainScheduleForm
UML ToolsA modeling tool aids the development of software by keeping track of all software engineering symbolsUML tools can do the following taskUML tools can do the following task
Drawing UML diagramsDrawing UML notation correctlyg yOrganize notations and diagrams into packageSearching for specific elements in diagramsR E i i ( d t di )Reverse Engineering (code to diagrams)Model Reporting (generating report)Generating code (diagrams to code)g ( g )
Which Methodology?Software Development Life Cycle
(Waterfall, Spiral, etc.)
Customized Methodology(O B h Obj R P C l i A il P)(OMT, Booch, Objectory, RUP, Catalysis, Agile, XP)
ReferencesStephen R. Schach, Object Oriented and Classical Software Engineering, 6th ed., chapter 1‐3Mi h l J Ch l & J A S h d UML F Michael J. Chonoles & James A. Schardt, UML 2 For Dummies, 2003, chapter 1‐2WikipediaWikipedia
top related