`
文章列表
<1> Nagios项目中文文档 http://nagios-cn.sourceforge.net/nagios-cn/index.html <2> Nagios 安装完毕,Map部分无法显示,这个的问题是没有安装 gd gd-delev  直接安装这两个包,删除原来的Nagios安装文件,然后按照官方文档安装就会正确生成:statusmap.cgi 等cgi文件  
      在学习Thinking in patterns之前,我认真学习了Thinking in Java。承前启后的学习,让我对OO有了更近一步的认识,      继承、多态等面向对象的概念,不是仅仅了解概念就OK。一些深层次的知识是需要在实际操作后才能真正明白,很多知不是简单样例讲解能够代表的,最主要的是自己在实际项目参与时,或者在平时的开源代码学习、应用中,将编程思想贯彻进去,这才是软件开发的绝妙境界!      此次学习,主要是向着拓展知识面、丰富设计内容、学习高级编程思想去的。整个过程中各种参考和引用是必不可少的,很是感叹这个学习环境,可以断言:只要你认真深入,几乎所有问题都能在这个 ...
      Prototype(原型模式):用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象。      该模式允许一个对象再创建另外一个可定制的对象,根本无需知道任何如何创建的细节,工作原理是:通过将一个原型对象传给那个要发动创建的对象,这个要发动创建的对象通过请求原型对象拷贝它们自己来实施创建。 由于Java提供clone()方法来实现对象的克隆,所以Prototype模式实现一下子变得很简单,具体可以查看参考.此外,还可以应用反射机制来实现之(教材中就是这样).    
     If the application user needs greater run time flexibility, for example to create scripts describing the desired behavior of the system, you can use the Interpreter design pattern. Here, you create and embed a language interpreter into your program.      ......      的确,Intepreter设计模式的应 ...
      The assumption is that you have a primary class hierarchy that is fixed; perhaps it’s from another vendor and you can’t make changes to that hierarchy. However, you’d like to add new polymorphic methods to that hierarchy, which means that normally you’d have to add something to the base ...
      Use serialization to create an undo mechanism.这是教材中唯一一句讲解! 正如Memento(纪念物)的含义提示一样,该设计模式有记忆效果,能恢复原状态!准确来说就是: 在不破坏封装性的前提下,捕获一个对象的内部状态,并在该对象之外保存这个状态。这样以后就可将该对象恢复到原先保存的状态。        该设计模式实际应用举例是:jsp+javabean        在一系统中新增帐户时,在表单中需要填写用户名、密码、联系电话、地址等信息,如果有些字段没有填写或填写错误,当用户点击“提交”按钮时,需要在新增页 ...
       Chain of Responsibility might be thought of as a dynamic generalization of recursion using Strategy objects. You make a call, and each Strategy in a linked sequence tries to satisfy the call. The process ends when one of the strategies is successful or the chain ends. In recursion, ...
      A Command is a function object in its purest sense: a method that’s an object . By wrapping a method in an object, you can pass it to other methods or objects as a parameter, to tell them to perform this particular operation in the process of fulfilling your request. You could sa ...

2011总结

                                  2011年总结      很早就想来总结一下,算是对过去一年作回顾。正所谓:有总结才有所得、方可展望。      这个时间段内,经历过很多挫折,主要是来自专业学习、技术深入等。      从专业知识方面来说:      先是学习C,然后是Java,期间反复有C应用,最有确定了专注Java方向。 原因是,作为最流行语言,Java有很多思想值得借鉴,而且有很多成型思想值得学习,很多资源可供参考! 当然中间还夹杂了Linux、Shell、Oracle、PHP、WebService等相关技术的学习!     从项目经验 ...
Facade模式 : 为子系统中的一组接口提供一个一致的界面.简言之,就是为凌乱、繁杂的接口(或者是类)构造一个统一的接口(或者是类),便于使用、很多时候达到了复用的目的。这在教材中的例子能够看出来,有一句是很好的总结:A tax adviser is a Façade between you and the tax code, and a mediator between you and the tax system.     此外可以参考这个例子 www.jdon.com/designpatterns/designpattern_Facade.htm            ...
       Mediator模式:用一个中介对象来封装一系列的对象交互,使各对象不需要显示地相互调用。简单而言就是封装了多个对象之间的复杂操作,使的两个对象解耦!        http://www.jdon.com/designpatterns/mediator.htm        http://gary0416.iteye.com/blog/913462        以上两个连接都是不错的参考,例子比较很好理解! ( Mediator模式在事件驱动类应用中比较多,例如界面设计GUI.;聊天,消息传递等,在聊天应用中,需要有一个MessageMe ...
      好久之前看过Observer,但是,当时不是很清楚,应该是Java刚刚入门的原因....现在看来啊,是比较优秀、很好的设计模式!       Like the other forms of callback, this contains a hook point where you can change code. The difference is in the observer’s completely dynamic nature. It is often used for the specific case of changes based on other ob ...
    Composite模式,有时又叫做部分-整体模式(Part-Whole)。它将对象组织到树结构中,可以用来描述整体与部分的关系。合成模式可以使客户端将单纯元素与复合元素同等 看待。      这个模式的具体含义是很好理解的,教材中讲解的还行。具体再参考这个案例 一下就更好了!!主要是在具体的实际的中用总结一下!后续......           
    思考了好一阵,总是没有一个合适的答案,感觉没有办法继续往下写了....     先展示一下Bridge设计模式的目的就是:将抽象与其实现解耦,使它们可以独立的适应变化,这是在Gof中的描述(很是通用,但是没有感觉....) ...
接下来的两个模式目的就是:Connecting different types Adapter takes one type and produces an interface to some other type. When you’ve got this , and you need that , Adapter solves the problem. The only requirement is to produce a that , and there are a number of ways you can accomplish this adaptati ...
Global site tag (gtag.js) - Google Analytics