文件名称:head first design patterns 真正非扫描版
文件大小:39.31MB
文件格式:PDF
更新时间:2014-10-09 12:17:33
java 设计模式 head first
You’re not alone. At any given moment, somewhere in the world someone struggles with the same software design problems you have. You know you don’t want to reinvent the wheel (or worse, a flat tire), so you look to Design Patterns–the lessons learned by those who’ve faced the same problems. With Design Patterns, you get to take advantage of the best practices and experience of others, so that you can spend your time on…something else. Something more challenging. Something more complex. Something more fun. You want to learn about the patterns that matter–why to use them, when to use them, how to use them (and when NOT to use them). But you don’t just want to see how patterns look in a book, you want to know how they look “in the wild”. In their native environment. In other words, in real world applications. You also want to learn how patterns are used in the Java API, and how to exploit Java’s built-in pattern support in your own code. You want to learn the real OO design principles and why everything your boss told you about inheritance might be wrong (and what to do instead). You want to learn how those principles will help the next time you’re up a creek without a design pattern. Most importantly, you want to learn the “secret language” of Design Patterns so that you can hold your own with your co-worker (and impress cocktail party guests) when he casually mentions his stunningly clever use of Command, Facade, Proxy, and Factory in between sips of a martini. You’ll easily counter with your deep understanding of why Singleton isn’t as simple as it sounds, how the Factory is so often misunderstood, or on the real relationship between Decorator, Facade and Adapter. With Head First Design Patterns, you’ll avoid the embarrassment of thinking Decorator is something from the “Trading Spaces” show. Best of all, in a way that won’t put you to sleep! We think your time is too important (and too short) to spend it struggling with academic texts. If you’ve read a Head First book, you know what to expect–a visually rich format designed for the way your brain works. Using the latest research in neurobiology, cognitive science, and learning theory, Head First Design Patterns will load patterns into your brain in a way that sticks. In a way that lets you put them to work immediately. In a way that makes you better at solving software design problems, and better at speaking the language of patterns with others on your team. 【目录信息】 引子 谁适合读这本书? 我们知道你的大脑在想什么 元认知 让你的大脑就范 技术审校 致谢 1 欢迎来到设计模式世界:设计模式入门 模拟鸭子应用 Joe想到继承 利用接口如何? 软件开发的不变真理 分开变化和不变部分 设计鸭子的行为 测试鸭子的代码 动态地设置行为 封装行为的大局观 “有一个”比“是一个”更好 策略模式 共享模式词汇的威力 我如何使用设计模式? 设计箱内的工具 习题解答 2 让你的对象知悉现况 气象观测站 认识观察者模式 出版者+订阅者=观罕者模式 五分钟短剧:观察主题 定义观察者模式 松耦合的威力 设计气象站 实现气象站 使用Java内建的观察者模式 java.util.Observable的黑暗面 设计箱内的工具 习题解答 …… 3 装饰者模式:装饰对象 4 工厂模式:烘烤OO的精华 5 单件模式:独一无二的对象 6 命令模式:封装调用 7 适配器模式与外观模式:随遇而安 8 模板方法模式:封装算法 9 送代器与组合模式:管理良好的集合 10 状态模式:事物的状态 11 代理模式:控制对象访问 12 复合模式:模式中的模式 13 与设计模式相处:真实世界中的模式 A 附录A:剩下的模式