随笔分类 -  设计模式

1 2 下一页
设计模式常见面试题
摘要:1.设计模式分类 2.设计模式的优点 设计模式可在多个项目中重用。 设计模式提供了一个帮助定义系统架构的解决方案。 设计模式吸收了软件工程的经验。 设计模式为应用程序的设计提供了透明性。 设计模式是被实践证明切实有效的,由于它们是建立在专家软件开发人员的知识和经验之上的。 3.单例模式的创建方式 E 阅读全文
posted @ 2019-08-13 14:54 一天不进步,就是退步 阅读(23605) 评论(2) 推荐(4) 编辑
Composite Design Pattern in Java--转
摘要:https://dzone.com/articles/composite-design-pattern-in-java-1 The composite pattern is meant to "compose objects into a tree structure to represent pa 阅读全文
posted @ 2018-08-31 11:12 一天不进步,就是退步 阅读(148) 评论(0) 推荐(0) 编辑
Active Object 并发模式在 Java 中的应用--转载
摘要:原文地址:http://www.ibm.com/developerworks/cn/java/j-lo-activeobject/本文主要从以下两个方面进行阐述:使用 C++ 语言,来描述 Active Object 设计模式。Java 类库对于这样一个典型的模式做了很好的类库层面的封装,因此对于 ... 阅读全文
posted @ 2015-05-07 16:13 一天不进步,就是退步 阅读(388) 评论(0) 推荐(0) 编辑
Design Pattern - Service Locator Pattern--转载
摘要:原文地址:http://www.tutorialspoint.com/design_pattern/service_locator_pattern.htmThe service locator design pattern is used when we want to locate various... 阅读全文
posted @ 2015-04-25 13:47 一天不进步,就是退步 阅读(476) 评论(0) 推荐(0) 编辑
Core J2EE Patterns - Service Locator--oracle官网
摘要:原文地址:http://www.oracle.com/technetwork/java/servicelocator-137181.htmlContextService lookup and creation involves complex interfaces and network opera... 阅读全文
posted @ 2015-04-25 10:34 一天不进步,就是退步 阅读(252) 评论(0) 推荐(0) 编辑
Java多线程编程模式实战指南(三):Two-phase Termination模式--转载
摘要:本文由本人首次发布在infoq中文站上:http://www.infoq.com/cn/articles/java-multithreaded-programming-mode-two-phase-termination。转载请注明作者: 黄文海 出处:http://viscent.iteye.co... 阅读全文
posted @ 2015-01-25 22:14 一天不进步,就是退步 阅读(523) 评论(0) 推荐(0) 编辑
Java多线程编程模式实战指南(二):Immutable Object模式--转载
摘要:本文由本人首次发布在infoq中文站上:http://www.infoq.com/cn/articles/java-multithreaded-programming-mode-immutable-object。转载请注明作者: 黄文海 出处:http://viscent.iteye.com。多线程... 阅读全文
posted @ 2015-01-25 22:12 一天不进步,就是退步 阅读(444) 评论(0) 推荐(0) 编辑
Java多线程编程模式实战指南(一):Active Object模式--转载
摘要:本文由黄文海首次发布在infoq中文站上:http://www.infoq.com/cn/articles/Java-multithreaded-programming-mode-active-object-part1。转载请注明作者: 黄文海 出处:http://viscent.iteye.com... 阅读全文
posted @ 2015-01-25 22:09 一天不进步,就是退步 阅读(3549) 评论(0) 推荐(1) 编辑
facade 模式和gateway模式的区别
摘要:原文:http://stackoverflow.com/questions/4422211/what-is-the-difference-between-facade-and-gateway-design-patternsReviewing Facade in the GoF book and th... 阅读全文
posted @ 2014-11-10 18:44 一天不进步,就是退步 阅读(609) 评论(0) 推荐(0) 编辑
java 四种实现延迟加载的方法
摘要:1. 延迟初始化2. 虚拟代理(virtual proxy)原文地址: http://www.oodesign.com/proxy-pattern.htmlIntentThe intent of this pattern is to provide a 《Placeholder》 for an ob... 阅读全文
posted @ 2014-11-03 17:26 一天不进步,就是退步 阅读(12198) 评论(0) 推荐(0) 编辑
漫谈设计模式--3分钟理解桥接模式:笔和画的关系
摘要:其实不需要3分钟,3秒钟就够了,记住桥接模式就是如此简单:一句话,笔有千般形,画有万变化。下面的仅仅助于理解。1. 定义Thebridge patternis adesign patternused insoftware engineeringwhich is meant to"decouple a... 阅读全文
posted @ 2014-10-15 11:14 一天不进步,就是退步 阅读(1728) 评论(0) 推荐(0) 编辑
CircuitBreaker design pattern---reference
摘要:It's common for software systems to make remote calls to software running in different processes, probably on different machines across a network. One... 阅读全文
posted @ 2014-09-17 10:45 一天不进步,就是退步 阅读(1303) 评论(1) 推荐(0) 编辑
Design Patterns Uncovered: The Chain Of Responsibility Pattern
摘要:Chain of Responsibility in the Real WorldThe idea of the Chain Of Responsibility is that it avoids coupling the sender of the request to the receiver,... 阅读全文
posted @ 2014-07-17 15:54 一天不进步,就是退步 阅读(438) 评论(0) 推荐(0) 编辑
command pattern
摘要:1.定义(http://en.wikipedia.org/wiki/Command_pattern#Java)Inobject-oriented programming, thecommand patternis abehavioraldesign patternin which an object... 阅读全文
posted @ 2014-07-16 09:51 一天不进步,就是退步 阅读(306) 评论(0) 推荐(0) 编辑
Adapter pattern
摘要:1. 定义http://en.wikipedia.org/wiki/Adapter_patternAn adapter helps two incompatible interfaces to work together. This is the real world definition for ... 阅读全文
posted @ 2014-07-15 15:38 一天不进步,就是退步 阅读(1069) 评论(0) 推荐(0) 编辑
Decorator pattern
摘要:1. 定义,来自wiki(http://en.wikipedia.org/wiki/Decorator_pattern)The decorator pattern can be used to extend (decorate) the functionality of a certain obje... 阅读全文
posted @ 2014-07-15 14:50 一天不进步,就是退步 阅读(303) 评论(0) 推荐(0) 编辑
Comparing Two High-Performance I/O Design Patterns--reference
摘要:by Alexander Libman with Vladimir GilbourdNovember 25, 2005SummaryThis article investigates and compares different design patterns of high performance... 阅读全文
posted @ 2014-05-06 11:24 一天不进步,就是退步 阅读(1419) 评论(0) 推荐(0) 编辑
Reactor Pattern and Non-blocking IO--reference
摘要:reference from:http://www.cs.bgu.ac.il/~spl051/Personal_material/Practical_sessions/Ps_12/ps12.htmlJava server class with multiple client connections:... 阅读全文
posted @ 2014-05-03 23:14 一天不进步,就是退步 阅读(568) 评论(0) 推荐(0) 编辑
漫说模板方法模式---学生时代的烦恼
摘要:1. 你过了吗?多么令人抓狂的四六级考试呀有多少人曾经殚精竭虑?有多少人溯夜难眠?就是为了仅仅通过而已。2. 考试之前,匆忙的需找这2B铅笔,考试之中的答题卡,多么熟悉的过程呀,多么多的选择题,由我们来涂写,一次次的皱眉,只为胜利的那一刻。你看,只有一套题目(其实分AB卷),一套答题纸(也分为AB)... 阅读全文
posted @ 2014-04-21 18:37 一天不进步,就是退步 阅读(390) 评论(0) 推荐(0) 编辑
漫说代理模式---给宝宝成长护航
摘要:1. 宝宝还很小,外面的世界可不安全,现在宝宝的护航者宝宝的监护人爸爸妈妈闪亮登场。2,监护过程:有了监护人,宝宝就比较安全了,如果谁想和宝宝一起玩就需要先找到监护人,经过监护人同意才可以和宝宝一起玩。还比如过年了,宝宝收到很多压岁钱,需要把钱存到银行,就需要父母帮忙才可以。3. 上面就用到了代理模... 阅读全文
posted @ 2014-04-15 15:43 一天不进步,就是退步 阅读(700) 评论(2) 推荐(0) 编辑

1 2 下一页