杂记:设计模式的适用性,设计模式与类库框的不同.各种理解误区.学习方法论..

经常有人死吹精通设计模式,确理不清什么是设计模式。个人感觉很多东西和下棋一样,几分钟学会,一辈子去精通。这里摘取几句,解释一下。

类库,框架与设计模式的适用性区分

1  libraries and frameworks go a long way towards a development model where we can just pick and choose components and plug them right in . bug .. they don't help us structure our own applications in ways that are easier to understand ,more maintainable and flexible that's where design patterns come in.

 

2 design patterns are higher level than libraies design patterns tell us how to structure classed and objects to solve certain problems and it is our job to adapt those designs to fit our particular application.

 

3 frameworks and libraries are not design paterns they provide specific implementations that we link into our code sometimes however libraries and frameworks make use of design patterns in their implementations that's great because once you understand design patterns ,you 'll quikly.understand APIs that are structured around design patterns

 

杂记:不要以为了解了oo 的基础就可以自动的building 灵活可重用,易维护的代码.remember knowing concepts like abstraction inheritance and polymorphism do not make you a good object oriented designer.

 

bullet points knowing the oo basics dose not make you a good oo designer.

good oo designs are reusable ,extensible and maintainable

patterns show you how to build systems with good oodesign qualities.

patterns are proven object oriedted experience

patterns don't give you code ,they give you general solutions to design problems you apply them to your specific application.

most patterns and priciples address issues of change in software

most patterns allow some part of a system to vary independently of all other parts

we often try to take what varies in a system and encapsulate it

patterns provide a shared language that can maximize the value of you communication with other developers

 

杂记: 方法。

don't miss out when something interstiong happens!

we 've got a pattern that keeps your objects in the know when something the might care about happens objects can even decide at runtime whether they want to be kept informed the observer pattern is one of the most heavily use patterns in the JDK and it's incredibly useful before we're down we 'll also look at one to many relationships and loose coupling with observer you 'll be the life of the patterns party..

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值