which cram? college of alameda pmcdermott@peralta.edu copyright © 1999 patrick mcdermott class...

Post on 05-Jan-2016

213 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Which CRAM?

College of Alameda

pmcdermott@peralta.eduCopyright © 1999 Patrick McDermott

ClassRelationship

Attribute

Method

cf.: Entity-Relationship-Attribute-Trigger

The Meta-Objects

Object C.R.A.M.

ObjectsClassesRelationshipsAttributesMethods

CLASS

CLASS

Attribute1Attribute2Attribute3

Method1()Method2()

Relationship

Which C.R.A.M?• Relationship/Attribute can be a class if Data, a

Method if behavior– Marriage– Color to artist, painter– Eskimo Snow

• Telephone Number– Phone Number at Ma Bell– Japanese phone number: it’s an asset– Area code, exchange, number

• Whose Attribute? License Plate #– Car– Driver

Purpose of Objects

• Entity• Business Object

• Infrastructure– User Interface– Data

• Persistence Database

– Control– Static

• For things that aren’t really objects

Object

An object (business object) is a thing the business needs to know about. Classes are groups (classifications) of objects.

In most discussions, “class”, “object” and “entity” can be used interchangeably.

In addition to business objects, there areinfrastructure objects. During analysis, you should only discuss business (entity) objects.

Attribute

An attribute is a piece of information about an object needed in your business. Often objects, attributes and/or relationships are established or modified by methods. In fact, there should be methods to CRUD all the meta-objects.

CRUD: Create, Read, Update, Delete

Attribute or Class?

Attributes Don’t have Attributes

Attributes are “OF” a Class

Method

A method, operation, or function is an action needed in your business. Often objects, attributes and/or relationships are established or modified by methods. In fact, there should be methods to CRUD all the meta-objects.

CRUD: Create, Read/Retrieve, Update, Delete

Grammatical Analysis

Classes are Nouns Relationships are Verbs Attributes are Adjectives Methods are Phrases

– Including an action and – a Class, Relationship or Attribute

Joel Kermarrec

In Principlethe Ghost is the Verb

of the Form1987

top related