On Tuesday, Sep 2, 2003, at 14:40 US/Pacific, Ian Skinner wrote:
> How do I design/model/flow chart my CFC's/Objects/Functionality?

The best way is really UML - which allows you to visually model your 
classes and their interactions.

> What replaces the old fashioned Flow Chart of a procedurally focused
> project?

Collaboration diagrams and sequence diagrams (again, UML).

> Also, I'm having trouble finding any good, introductory, how to 
> information.

Hal's "Discovering CFCs" book might be a good place to start (in 
addition the other recommendations mentioned in this thread).

> I get lots of information on why object orientated approach is so 
> good, but
> little to none on how to actually do the design.

Here's a quick summary of what I do:

1. Write a coherent narrative for each of the usage scenarios in your 
application.
2. Look for the nouns in those narratives - those are good candidates 
for the classes (CFCs).
3. Look for the verbs - what the nouns 'do' or have 'done to them' - 
those are good candidates for methods on the classes.
4. Now go through your narratives and see if the classes and methods 
you have can 'act out' your usage scenarios.

Hope that helps?

You should also really identify the various types of users for your 
application and how they relate to each other - they are 'actors' in 
UML-speak. This will help you identify public interfaces to the system 
and/or additional classes to model.

The other rule of thumb that will help is to remember that inheritance 
in the real world is actually fairly rare - inheritance means 'is-a' - 
whereas composition is very common - composition means 'has-a'. For 
example:

        Car is-a Vehicle
        Car has-a Engine
        Engine has-a Valve
        Car has-a Wheel
        ...

Also remember that you only really need to model *important* things as 
CFCs. If something in your narrative isn't really important in and of 
itself, it probably doesn't need a CFC (it may well be an attribute of 
another CFC - an instance data variable perhaps).

And finally... bear in mind that learning OO is not like picking up the 
syntax of a new language: it's an iterative process that can take years 
to master. Everyone's first OO project tends to suck so be prepared to 
rewrite and refactor and rewrite and refactor some more...

Sean A Corfield -- http://www.corfield.org/blog/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com

Reply via email to