为什么需要三层结构?
对于开发系统来说,我们要考虑系统性能如何?是否具有足够的容错能力?能否从容应对客户不断变化的需求?面向对象思想的确很酷,可是在工程实践中的实际应用状况又是怎样的?怎样才能使我们的代码具有最大的“可重用性”和“可扩展性”?传说中的三层结构和设计模式又是什么东西?层次结构在现实社会里随处可见。记得有个笑话讲有个村长得意地向他老婆吹牛:“全中国只有四个人比我官大,乡长、县长、省长和国务院总理”。这个笑话也体现了真实社会中分层的现象。社会HTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
;HTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
nHTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
紿TTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
;HTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
tHTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
;HTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
lHTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
DHTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
pHTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
nHTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
sHTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
/HTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
;HTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html
pHTTP/1.1 200 OK
Server: Apache
Content-Length: 206
Content-Type: text/html