[ajug-members] design
521
521 at ofig.org
Thu Feb 19 11:19:33 EST 2009
cool, tks jeff
>>The methods are considered to be the behavior of the object.
-i get freaked out, hehe, and then get no-where-
when i write stuff down on paper before i type-out classes in a simple 'math'
game or a simple 'dog-walking' game; i get very-darn caught up in how deep do
i go? i find my mind arguing with itself on how far do i break down an
object into the parts (for future use, code-reuse) it is made up of; say a
person's hand, wrist/hand/finger/hair/finger-nail/bone/joint/vein/blood/blood-
flow/blood-cell/cell-division/hand-shake/snap-fingers/thumb's-up/thumb's-
down/shoot-bird/fingernail-growth/broken-finger/heal/cell-division/skin-
cancer/make-a-fist/finger-smashed-in-door/wooooh-nilly/ doe! -a class is
blueprint of blueprints down to the higgs-boson, the derivation of
mass/matter itself
barclay
On Thu, 19 Feb 2009 10:32:04 -0500, Wilson, Jeff wrote
> In general, the accepted way most people look at objects are that they
> are the "nouns". Methods that work on the objects are the "verbs".
> Systems are built by having a network of objects that invoke methods on
> each other.
>
> Some nouns will be concepts in your business domain or problem space.
> Other nouns are computer science concepts like sessions, transactions,
> threads, etc.
>
> That is an incredibly simplified view of the world of OO. It misses a
> lot of good design practices, conventions, and so many other concepts
> that I can't list here, but I will list some other crucial points:
>
> Objects represent a concept and have methods that conceptually map onto
> those concepts.
>
> Objects contain data that are needed to support that concept.
>
> The methods are considered to be the behavior of the object.
>
> The data in an object should not be exposed to the rest of the
> application unless that exposure is a part of the concept. (Arguably,
> most classes should not contain getter or setter methods for their
> fields, and all fields should be private.)
>
> I assume you are comfortable with procedural code, in which you've got a
> bunch of functions and pass around data structures between them. Robert
> Martin, in his book _Clean Code_, makes this statement about the
> differences between procedural and OO code:
>
> "Procedural code makes it easy to add new functions without changing the
> existing data structures. OO code, on the other hand, makes it possible
> to add new classes without changing any existing function.
>
> "Procedural code makes it hard to add new data structures because all
> the functions must change. OO code makes it hard to add new functions
> because all the classes must change."
>
> +jeff (MJW)
> ---
>
> "The first 90% of the code accounts for the first 90% of the development
> time. The remaining 10% of the code accounts for the other 90% of the
> development time."
> -- Ninety-Ninety Rule
>
> ---------------------------------------------
> M. Jeff Wilson, Lead Member Technical Staff
> AT&T Services, Inc.
> Operations & Service Dev
> jw9615 at att.com
> +1 404.499.7235
>
> -----Original Message-----
> From: 521 [mailto:521 at ofig.org]
> Sent: Monday, February 16, 2009 10:04 AM
> To: ajug-members at ajug.org
> Subject: [ajug-members] design
>
> by design, in java- or oop in general- is it best to have classes made
> as follows...
>
> -certain classes are designed to be the motors or engines of an
> application
> -certain classes are designed to the the nouns/subjects of the
> application
> -other classes, maybe, some other stuff, etc?
>
> barclay
>
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members
>
> *****
>
> The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential, proprietary, and/or
privileged material. Any review, retransmission, dissemination or other use
of, or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from all
computers. GA621
>
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members
More information about the ajug-members
mailing list