Understanding Objects Understanding Objects Object Oriented Design for Content Specialists © Mark Lewis [email protected] Part of the Alignment blog series. Download the audio Recording: mp3 & wav
Understanding ObjectsUnderstanding ObjectsObject Oriented Design for Content Specialists
© Mark [email protected]
Part of the Alignment blog series.Download the audioRecording: mp3 & wav
What & WhyWhat & Why For Software Development
– facilitates re-use of code– single point of maintenance– data hiding or encapsulation– API = Application Programming Interface
For Technical Writing– facilitates re-use of content– single point of maintenance– CMS = Content Management System– AuthorIT– XML
Take-AwaysTake-AwaysOO defined for Tech WritersExamplesBook RecommendationsAbility to speak and do OO
AgendaAgendaDefinitions & ConceptsSimple ObjectsComposite ObjectsBehaviors / MethodsResponsibilities / EncapsulationInheritanceContent Management & Re-use
Definitions & ConceptsDefinitions & ConceptsObject
What it is , What it does and How it interacts with other objects
…share a common structure and a common behavior
…has a predictable or fixed relationship with other objects
Definitions & ConceptsDefinitions & ConceptsClass
The definition or blueprint of an Object. Almost interchangeable with “Object”.
AttributeA characteristic of an object. What it is……programming lingo…Also known as a Property.
BehaviorAn activity of an object. What it does/is responsible for……programming lingo…Also known as a Method.
Definitions & ConceptsDefinitions & ConceptsObject
A categorization or classification of things that allows us to organize functionality or information in a way that it may be re-used / re-purposed.
The StrategyThe Strategy
Find the commonality in the “what it is” and “what it does”
Find the commonality in the attributes and behaviors
What is shared?
! The design will depend on your GOALS
SimpleSimpleCell
TypesTypesCell Types
ComplexComplexCell, Organ, System
Common AttributesCommon AttributesMuscle Cell
– Membrane– Nucleus– Endoplasmic Reticulum (protein factory)– Cytoplasm (fluid medium)– Mitochondria (energy converters)
Common AttributesCommon AttributesBlood Cell
– Membrane– Nucleus– Endoplasmic Reticulum (protein factory)– Cytoplasm (fluid medium)– Mitochondria (energy converters)
Common AttributesCommon AttributesNerve Cell
– Membrane– Nucleus– Endoplasmic Reticulum (protein factory)– Cytoplasm (fluid medium)– Mitochondria (energy converters)
Simple ObjectSimple ObjectcCell “class definition”
– Membrane– Nucleus– Endoplasmic Reticulum (protein factory)– Cytoplasm (fluid medium)– Mitochondria (energy converters)
! Attributes common to all cells
Common AttributesCommon AttributesEmployee
– Address Line 1– Address Line 2– City– State– Zip– Other Employee specific attributes:
Name, SSN, Gender, Full/Part Time, etc.
Common AttributesCommon AttributesCompany
– Address Line 1– Address Line 2– City– State– Zip– Other Company specific attributes:
Name, Corp. Type, EIN, etc.
Common AttributesCommon AttributesVendor
– Address Line 1– Address Line 2– City– State– Zip– Other Vendor specific attributes:
Name, Vendor Type, Govt. Work, etc.
Simple ObjectsSimple Objects cAddress “class definition”
– Address Line 1– Address Line 2– City– State– Zip
! Classification or categorization of common attributes / characteristics
Composite ObjectsComposite Objects Employee
– cAddress {Addr 1, Addr 2 ….}– Employee specific attributes
Company– cAddress {Addr 1, Addr 2 ….}– Company specific attributes
Vendor– cAddress {Addr 1, Addr 2 ….}– Vendor specific attributes
! Re-use of an object
Composite ObjectsComposite ObjectsCompany
– Mailing Address– Billing Address– Shipping Address– Company specific attributes
! Re-use of an object
Ease of MaintenanceEase of Maintenance cAddress/cContact (* = new)
– Address Line 1– Address Line 2– City– State– Zip– Voice Phone Number*– Fax Phone Number*– Email*
! Maintenance is reduced to one place
BehaviorsBehaviors cCell “class definition”
– Grow– Reproduce– Intake Nutrients– Output Waste– Send Message
! Behaviors are what an object does & what it is responsible for
! Behaviors common to all cells
BehaviorsBehaviors Muscle
– Contract– Relax
Blood– Absorb Oxygen– Release Oxygen
Nerve– Interstate Messaging
! Behaviors are also known as Methods
PracticePractice
Business Letter
Composite ObjectsComposite ObjectsCell, Organ, System
CollectionsCollectionsResume
– Name– Contact Info.– Objective– Skills– Experience– References– Hobbies
! A Collection is a set of objects
CollectionsCollections
Experience– Date Range– Company– Position– Description
PracticePractice
Book
Intermission / SponsorIntermission / Sponsor
Composite ObjectsComposite Objects
Refrigerator
Composite ObjectsComposite ObjectsRefrigerator
– Freezer Capacity– Fridge Capacity– Freezer Temp– Frig Temp– Doors– Drawers– Color
Composite ObjectsComposite Objects cCooling Unit
– Capacity– Temp “current”– Maximum Temp– Minimum Temp– Light– Drawers– Door– Color– Dimensions
Composite ObjectsComposite ObjectsRefrigerator
– Freezer Section : cCooling Unit– Fridge Section : cCooling Unit
Refrigerator – cCooling Units “collection”
! A composite object is known as a Parent
! An embedded object is known as a Child
EncapsulationEncapsulation cCooling Unit
Behaviors for accessing data. What it is.– GetCapacity / SetCapacity– GetDimensions / SetDimensions– GetTemp “current” / SetTemp– GetColor / SetColorBehaviors that do something. What it does.– DoorOpen / DoorClose– LightOn / LightOff “private”– Draw
! Encapsulation hides the internals of data and behaviors from other objects
! Private behaviors may not be used/called by other objects
Parent & Child ObjectsParent & Child ObjectsDraw Discussion
GlossaryGlossary
Behavior Something that an object does or can do. Some behaviors may be invoked by other objects others are strictly for internal use only.…programming lingo…Also know as a Method. Public methods may be invoked / called by other objects.Private methods may only be invoked / called internally by the object itself.
Common AttributesCommon AttributescCell “class definition”
– Membrane– Nucleus– Endoplasmic Reticulum (protein factory)– Cytoplasm (fluid medium)– Mitochondria (energy converters)
! Attributes common to all cells
Common BehaviorsCommon BehaviorscCell “class definition”
– Grow– Reproduce– Intake Nutrients– Output Waste– Send Message
! Behaviors are what a object can do & what it is responsible for
Unique BehaviorsUnique Behaviors Muscle
– Contract– Relax
Blood– Absorb Oxygen– Release Oxygen
Nerve– Interstate Messaging
! Unique attributes and behaviors cause the need for Inheritance
InheritanceInheritance cMuscleCell : cCell
– Contract– Relax
cBlood : cCell– Absorb Oxygen– Release Oxygen
cNerve : cCell– Interstate Messaging
! An object that inherits from a base object gets all the attributes & behaviors of the base object PLUS any unique attributes & behaviors
InheritanceInheritanceEmployee
– Name– SSN– Gender– Contact info– Pay Rate
InheritanceInheritancecEmployee “class definition”
– Name– SSN– Gender– cAddress
InheritanceInheritance cSalariedEmployee : cEmployee
– Annual Rate– Accrued Vacation, Accrued Sick Time
cHourlyFullTimeEmployee : cEmployee– Hourly Rate– Accrued Vacation, Accrued Sick Time
cHourlyPartTimeEmployee : cEmployee– Hourly Rate
! Look for the common attributes & behaviors. Strategy.
Content ManagementContent Management
A form, slide layout or a skeleton doc provides a template / class design. Different from a WORD template (.DOT) though, for .DOT provides styles only, not structure.
Re-use MapRe-use Map
Structured ContentStructured ContentEmployee: Definition, Usage, Special Considerations
Re-use in Reference GuideRe-use in Reference Guide
From the menu tree, select Payroll, Maintenance, Employee
Employee: An employee is an individual who is performing or has performed work on the company's behalf while on the company's payroll.
Usage: The Employee document is used by time, unit pricing and expense input to record appropriate charges for project and payroll processes. Used for sorting, analyzing, inquiry and reporting purposes.
Employee Code: Provides a unique user-defined employee identifier.
Payroll Master Files – Employee Maintenance Foundation > Master File Setup
Payroll Master Files – Employee Maintenance Foundation > Master File Setup
From the menu tree, select Payroll, Maintenance, Employee, General tab
The General Information tab contains employee-related attributes needed to process the employee in the ABC system
Name: Specifies the legal name of the employee.
Alpha Name: Alphabetical employee name format.
SSN / SIN: Identifies the employee's federal tax identification code such as the U.S. federal Social Security Number or the Canadian federal Social Insurance Number.
Usage: Used for third party payroll system integration.
Company: Specifies the Company for which the employee primarily works. Usage: Used as the Company code for employee related inputs such as time,
unit pricing and expense.
Currency: Specifies the Currency or monetary unit of the employee. Usage: Specifies the Currency in which the employee will be paid for payroll
purposes. An Employee may charge to any Project Currency, but will be paid in their Employee Currency.
Organization: Specifies the Organization for which the employee primarily works.
Usage: Used as the default Organization code for employee related input such as time, unit pricing and expense.
Agenda recapAgenda recapDefinitions & ConceptsSimple ObjectsComposite ObjectsBehaviors / MethodsResponsibilities / EncapsulationInheritanceContent Management & Re-use
The StrategyThe StrategyFind the commonality in the “what it is” and “what it does”
Find the commonality in the attributes and behaviors
What is shared?
! The design will depend on your GOALS
WhyWhy For Software Development
– facilitates re-use of code– single point of maintenance– data hiding or encapsulation– API = Application Programming Interface
For Technical Writing– facilitates re-use of content– single point of maintenance– CMS = Content Management System– AuthorIT– XML
ResourcesResourcesRecommended ReadingObject Technology: A Manager’s Guide
David A. TaylorAddison WesleyISBN: 0201309947
Managing Enterprise Content Ann Rockley – www.Rockley.comNew RidersISBN: 0735713065
ResourcesResourcesRecommended Website
Ann Rockley presentationswww.Rockley.com
OOD goodieswww.java.sun.com/docs/books/tutorial/java/concepts/
GlossaryGlossaryObject “An object corresponds to a concept, abstraction, or thing that can
be distinctly identified. During analysis, objects have attributes and may be involved in relationships with other objects. During design, the notion of object is extended by the introduction of methods and objects attributes. In the implementation phase the notion of object is determined by the programming language."1 “An object is a software bundle of related variables and methods. Software objects are often used to model real-world objects you find in everyday life. 3
Class "A set of objects that share a common structure and a common behavior. A class is an abstraction, which represents the idea or general notion of a set of similar objects."1 “A class is a blueprint or prototype that defines the variables and the methods common to all objects of a certain kind.” 3
Class Description
"Description of the attributes, methods interface and inheritances relationships of a class."1
GlossaryGlossaryAttribute "A set of named values associated with an object or relationship."1
Behavior Something that an object does or can do. Some behaviors may be invoked by other objects others are strictly for internal use only.…programming lingo…Also know as a Method. Public methods may be invoked / called by other objects.Private methods may only be invoked / called internally by the object itself.
Inheritance “A class inherits state and behavior from its superclass. Inheritance provides a powerful and natural mechanism for organizing and structuring software programs. ” 3
Messaging “Software objects interact and communicate with each other using messages. ” 3
ContactContactMark Lewisvia LinkedIn
Thank You!© Mark Lewis + ©David Taylor- Object Technology content
Guest Author: ROI ChapterGuest Author: ROI ChapterDITA 101 2nd edition“Fundamentals of DITA for
Authors and Managers”By the Rockley Group
with Mark Lewis
– For sale at LuLu.com
Technical ReviewerTechnical ReviewerManaging Enterprise Content:
A Unified Content Strategy2nd edition
By Ann Rockley & Charles Cooper
– For sale at Amazon.com
DITAMetrics.comDITAMetrics.comBook & SpreadsheetsPublished by
The Rockley Group
Metrics for Intelligent Content
ResourcesResources
It’s about metrics …for intelligent content– white papers– discussions – webinar recordings– thought leadership
ReferencesReferences1 Object-Oriented Development: The Fusion Method
Coleman, Arnold, Bodoff, Dollin,Gilchrist, Hayes & JeremaesPrentice HallISBN: 0133388239
2 Object Technology: A Manager’s GuideDavid A. TaylorAddison WesleyISBN: 0201309947
3 www.java.sun.com/docs/books/tutorial/java/concepts/