+ All Categories
Home > Technology > Understanding Objects by Mark Lewis

Understanding Objects by Mark Lewis

Date post: 16-Apr-2017
Category:
Upload: mark-lewis
View: 287 times
Download: 2 times
Share this document with a friend
63
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
Transcript
Page 1: Understanding Objects by Mark Lewis

Understanding ObjectsUnderstanding ObjectsObject Oriented Design for Content Specialists

© Mark [email protected]

Part of the Alignment blog series.Download the audioRecording: mp3 & wav

Page 2: Understanding Objects by Mark Lewis

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

Page 3: Understanding Objects by Mark Lewis

Take-AwaysTake-AwaysOO defined for Tech WritersExamplesBook RecommendationsAbility to speak and do OO

Page 4: Understanding Objects by Mark Lewis

AgendaAgendaDefinitions & ConceptsSimple ObjectsComposite ObjectsBehaviors / MethodsResponsibilities / EncapsulationInheritanceContent Management & Re-use

Page 5: Understanding Objects by Mark Lewis

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

Page 6: Understanding Objects by Mark Lewis

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.

Page 7: Understanding Objects by Mark Lewis

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.

Page 8: Understanding Objects by Mark Lewis

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

Page 9: Understanding Objects by Mark Lewis

SimpleSimpleCell

Page 10: Understanding Objects by Mark Lewis

TypesTypesCell Types

Page 11: Understanding Objects by Mark Lewis

ComplexComplexCell, Organ, System

Page 12: Understanding Objects by Mark Lewis

Common AttributesCommon AttributesMuscle Cell

– Membrane– Nucleus– Endoplasmic Reticulum (protein factory)– Cytoplasm (fluid medium)– Mitochondria (energy converters)

Page 13: Understanding Objects by Mark Lewis

Common AttributesCommon AttributesBlood Cell

– Membrane– Nucleus– Endoplasmic Reticulum (protein factory)– Cytoplasm (fluid medium)– Mitochondria (energy converters)

Page 14: Understanding Objects by Mark Lewis

Common AttributesCommon AttributesNerve Cell

– Membrane– Nucleus– Endoplasmic Reticulum (protein factory)– Cytoplasm (fluid medium)– Mitochondria (energy converters)

Page 15: Understanding Objects by Mark Lewis

Simple ObjectSimple ObjectcCell “class definition”

– Membrane– Nucleus– Endoplasmic Reticulum (protein factory)– Cytoplasm (fluid medium)– Mitochondria (energy converters)

! Attributes common to all cells

Page 16: Understanding Objects by Mark Lewis

Common AttributesCommon AttributesEmployee

– Address Line 1– Address Line 2– City– State– Zip– Other Employee specific attributes:

Name, SSN, Gender, Full/Part Time, etc.

Page 17: Understanding Objects by Mark Lewis

Common AttributesCommon AttributesCompany

– Address Line 1– Address Line 2– City– State– Zip– Other Company specific attributes:

Name, Corp. Type, EIN, etc.

Page 18: Understanding Objects by Mark Lewis

Common AttributesCommon AttributesVendor

– Address Line 1– Address Line 2– City– State– Zip– Other Vendor specific attributes:

Name, Vendor Type, Govt. Work, etc.

Page 19: Understanding Objects by Mark Lewis

Simple ObjectsSimple Objects cAddress “class definition”

– Address Line 1– Address Line 2– City– State– Zip

! Classification or categorization of common attributes / characteristics

Page 20: Understanding Objects by Mark Lewis

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

Page 21: Understanding Objects by Mark Lewis

Composite ObjectsComposite ObjectsCompany

– Mailing Address– Billing Address– Shipping Address– Company specific attributes

! Re-use of an object

Page 22: Understanding Objects by Mark Lewis

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

Page 23: Understanding Objects by Mark Lewis

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

Page 24: Understanding Objects by Mark Lewis

BehaviorsBehaviors Muscle

– Contract– Relax

Blood– Absorb Oxygen– Release Oxygen

Nerve– Interstate Messaging

! Behaviors are also known as Methods

Page 25: Understanding Objects by Mark Lewis

PracticePractice

Business Letter

Page 26: Understanding Objects by Mark Lewis

Composite ObjectsComposite ObjectsCell, Organ, System

Page 27: Understanding Objects by Mark Lewis

CollectionsCollectionsResume

– Name– Contact Info.– Objective– Skills– Experience– References– Hobbies

! A Collection is a set of objects

Page 28: Understanding Objects by Mark Lewis

CollectionsCollections

Experience– Date Range– Company– Position– Description

Page 29: Understanding Objects by Mark Lewis

PracticePractice

Book

Page 30: Understanding Objects by Mark Lewis

Intermission / SponsorIntermission / Sponsor

Page 31: Understanding Objects by Mark Lewis

Composite ObjectsComposite Objects

Refrigerator

Page 32: Understanding Objects by Mark Lewis

Composite ObjectsComposite ObjectsRefrigerator

– Freezer Capacity– Fridge Capacity– Freezer Temp– Frig Temp– Doors– Drawers– Color

Page 33: Understanding Objects by Mark Lewis

Composite ObjectsComposite Objects cCooling Unit

– Capacity– Temp “current”– Maximum Temp– Minimum Temp– Light– Drawers– Door– Color– Dimensions

Page 34: Understanding Objects by Mark Lewis

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

Page 35: Understanding Objects by Mark Lewis

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

Page 36: Understanding Objects by Mark Lewis

Parent & Child ObjectsParent & Child ObjectsDraw Discussion

Page 37: Understanding Objects by Mark Lewis

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.

Page 38: Understanding Objects by Mark Lewis

Common AttributesCommon AttributescCell “class definition”

– Membrane– Nucleus– Endoplasmic Reticulum (protein factory)– Cytoplasm (fluid medium)– Mitochondria (energy converters)

! Attributes common to all cells

Page 39: Understanding Objects by Mark Lewis

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

Page 40: Understanding Objects by Mark Lewis

Unique BehaviorsUnique Behaviors Muscle

– Contract– Relax

Blood– Absorb Oxygen– Release Oxygen

Nerve– Interstate Messaging

! Unique attributes and behaviors cause the need for Inheritance

Page 41: Understanding Objects by Mark Lewis

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

Page 42: Understanding Objects by Mark Lewis

InheritanceInheritanceEmployee

– Name– SSN– Gender– Contact info– Pay Rate

Page 43: Understanding Objects by Mark Lewis

InheritanceInheritancecEmployee “class definition”

– Name– SSN– Gender– cAddress

Page 44: Understanding Objects by Mark Lewis

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.

Page 45: Understanding Objects by Mark Lewis

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.

Page 46: Understanding Objects by Mark Lewis

Re-use MapRe-use Map

Page 47: Understanding Objects by Mark Lewis

Structured ContentStructured ContentEmployee: Definition, Usage, Special Considerations

Page 48: Understanding Objects by Mark Lewis

Re-use in Reference GuideRe-use in Reference Guide

Page 49: Understanding Objects by Mark Lewis

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

Page 50: Understanding Objects by Mark Lewis

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.

Page 51: Understanding Objects by Mark Lewis

Agenda recapAgenda recapDefinitions & ConceptsSimple ObjectsComposite ObjectsBehaviors / MethodsResponsibilities / EncapsulationInheritanceContent Management & Re-use

Page 52: Understanding Objects by Mark Lewis

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

Page 53: Understanding Objects by Mark Lewis

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

Page 54: Understanding Objects by Mark Lewis

ResourcesResourcesRecommended ReadingObject Technology: A Manager’s Guide

David A. TaylorAddison WesleyISBN: 0201309947

Managing Enterprise Content Ann Rockley – www.Rockley.comNew RidersISBN: 0735713065

                                                

Page 55: Understanding Objects by Mark Lewis

ResourcesResourcesRecommended Website

Ann Rockley presentationswww.Rockley.com

OOD goodieswww.java.sun.com/docs/books/tutorial/java/concepts/

                                                

Page 56: Understanding Objects by Mark Lewis

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

Page 57: Understanding Objects by Mark Lewis

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

Page 58: Understanding Objects by Mark Lewis

ContactContactMark Lewisvia LinkedIn

[email protected]

Thank You!© Mark Lewis + ©David Taylor- Object Technology content

Page 59: Understanding Objects by Mark Lewis

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

Page 60: Understanding Objects by Mark Lewis

Technical ReviewerTechnical ReviewerManaging Enterprise Content:

A Unified Content Strategy2nd edition

By Ann Rockley & Charles Cooper

– For sale at Amazon.com

Page 61: Understanding Objects by Mark Lewis

DITAMetrics.comDITAMetrics.comBook & SpreadsheetsPublished by

The Rockley Group

Metrics for Intelligent Content

Page 62: Understanding Objects by Mark Lewis

ResourcesResources

It’s about metrics …for intelligent content– white papers– discussions – webinar recordings– thought leadership

Page 63: Understanding Objects by Mark Lewis

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/


Recommended