第十一章 Analysis and Design

上一篇 / 下一篇  2008-08-18 20:25:47 / 个人分类:java

This chapter introduces the ideas of analysis, design, and some ways to approach the problems of developing good object-oriented programs in a reasonable amount of time:

now let's begin!~!

sometimes ,when you’re looking at a methodology that contains tremendous detail and suggests many steps and documents, it’s still difficult to know when to stop. Keep in mind what  you’re trying to discover:

ask yourself two questions:
1、What are the objects? (How do you partition your project into its component parts?)
2、What are their interfaces? (What messages do you need to send to each object?)


0 、Make a plan???????????????

first to do  is making a plan,note:

 Any system you build, no matter how complicated, has a fundamental purpose—the business that      it’s in, the basic need that it satisfies.

一、What are we making??????????
ask five questions:
1、“Who will use this system?”
2、“What can those actors do with the system?”
3、“How does this actor do that with this system?”
4、“How else might this work if someone else were doing this, or if the same actor had a different objective?” (to reveal variations)
5“What problems might happen while doing this with the system?” (to reveal exceptions)

tips:
1\  try to discover a full set of use cases for your system,and once you've done that you have the core of what the system is

supposed to do.

2\  look for nouns and verbs

二、How will we build it?????????

1、method:  Class-Responsibility-Collaboration (CRC) card

2、Five stages of object design:

object discovery-->object assembly-->system construction

-->system extension-->object reuse

Guidelines for object development:
1、Let a specific problem generate a class,
2、Remember, discovering the classes you need (and their interfaces) is the majority of the system design.
3、Don’t force yourself to know everything at the beginning. Learn as you go. This will happen anyway.
4、Start programming. Get something working so you can prove or disprove your design.
5、Always keep it simple. Little clean objects with obvious utility are better than big complicated interfaces.

三、Build the core

四、Iterate the use cases

五、Evolution
“get it right”--isn't just meet the requirements and the use cases, we must have some sense that the program structure will survive the changes.


Extreme Programming,some tips which  I think they are wonderful: 
1、write tests first
2、pair programming***********


TAG: Analysis Design

geven的个人空间 引用 删除 geven   /   2008-08-19 12:42:14
sorry ,something I don't write understandability,

what your problem?
swt0707的个人空间 引用 删除 swt0707   /   2008-08-19 10:14:32
Make a plan?    no.
What are we making??
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2009-01-08  
    123
45678910
11121314151617
18192021222324
25262728293031

数据统计

  • 访问量: 503
  • 日志数: 42
  • 建立时间: 2008-07-24
  • 更新时间: 2008-12-30

RSS订阅

Open Toolbar