锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久亚洲AV成人无码国产,亚洲看片无码在线视频,亚洲AⅤ永久无码精品AAhttp://m.tkk7.com/dedian/category/11495.html-- 鍏蟲敞鎼滅儲寮曟搸鐨勫紑鍙?/description>zh-cnWed, 28 Feb 2007 07:45:37 GMTWed, 28 Feb 2007 07:45:37 GMT60Design Patterns - 8 - Proxyhttp://m.tkk7.com/dedian/archive/2006/05/12/45757.htmlDedianDedianThu, 11 May 2006 20:10:00 GMThttp://m.tkk7.com/dedian/archive/2006/05/12/45757.htmlhttp://m.tkk7.com/dedian/comments/45757.htmlhttp://m.tkk7.com/dedian/archive/2006/05/12/45757.html#Feedback0http://m.tkk7.com/dedian/comments/commentRss/45757.htmlhttp://m.tkk7.com/dedian/services/trackbacks/45757.html
To control access to an object, provide a surrogate or placeholder (proxy) for it. As a mostly used strategy, Proxy can defer the creation and initialization of the object until it is on demand.

Structure:

Similar to adapter, client includes an object of proxy to access, and proxy includes a real object that proxy represents.

Difference from Adapter:

Adapter provides a different interface to the object it adapts. In contrast, Proxy provides the same interface as its subject. As a protection of real object, Proxy can refuse to perform an operation that the subject will perform.

Example:
http://www.javaworld.com/javaworld/jw-02-2002/jw-0222-designpatterns.html

Reference:
Book: (GoF)Design Patterns
http://en.wikipedia.org/wiki/Proxy_design_pattern
http://www.inf.bme.hu/ooret/1999osz/DesignPatterns/Proxy4/
http://alumni.media.mit.edu/~tpminka/patterns/Proxy.html




Dedian 2006-05-12 04:10 鍙戣〃璇勮
]]>
Design Patterns - 7 - Mediatorhttp://m.tkk7.com/dedian/archive/2006/05/12/45756.htmlDedianDedianThu, 11 May 2006 19:24:00 GMThttp://m.tkk7.com/dedian/archive/2006/05/12/45756.htmlhttp://m.tkk7.com/dedian/comments/45756.htmlhttp://m.tkk7.com/dedian/archive/2006/05/12/45756.html#Feedback0http://m.tkk7.com/dedian/comments/commentRss/45756.htmlhttp://m.tkk7.com/dedian/services/trackbacks/45756.html
Encapsulate a set of objects which interact with each other. The benefit to do this is keeping objects from communicating with each other directly. All the messages between objects should be sent to mediator at first and then mediator will control and coordinate those interaction. Also, mediator can handle external interaction request and decide which object to response the external request.

Structure:

star topology: Mediator class is as a hub which connects to a set of classes (colleague classes).

Difference from Facade Pattern:

Facade differs from Mediator in that it abstracts a subsystem of objects to provide a more convenient interface. Its protocol is unidirectional. That is, Facade objects make requests of the subsystem classes but not vice versa. In contrast, Mediator enables cooperative behavior that colleague objects don't or can't provide, and the protocol is multidirectional.

reference:

Gamma, E., R. Helm, R. Johnson, J. Vlissides (1995). Design Patterns. Addison Wesley. ISBN 0.201-63361-2
http://sern.ucalgary.ca/courses/seng/443/W02/assignments/Mediator/
http://my.execpc.com/~gopalan/design/behavioral/mediator/mediator.html


Dedian 2006-05-12 03:24 鍙戣〃璇勮
]]>
Design Patterns - 6 - Facadehttp://m.tkk7.com/dedian/archive/2006/04/20/42092.htmlDedianDedianThu, 20 Apr 2006 02:04:00 GMThttp://m.tkk7.com/dedian/archive/2006/04/20/42092.htmlhttp://m.tkk7.com/dedian/comments/42092.htmlhttp://m.tkk7.com/dedian/archive/2006/04/20/42092.html#Feedback0http://m.tkk7.com/dedian/comments/commentRss/42092.htmlhttp://m.tkk7.com/dedian/services/trackbacks/42092.html Defines a higher-level interface to hide subsystem's complexities and provides an easy interface for client to use.

Case study:
Compiler subsystem

Structure:
-- The facade and backend classes(subsystem classes) are in a separate package from the client.
-- The backend API is package-private
-- The facade API is public.

Implementation:
consider following two issues when implementing a facade:
-- Reducing client-subsystem coupling.
-- Public versus private subsystem classes.

reference:
http://www.allapplabs.com/java_design_patterns/facade_pattern.htm


Dedian 2006-04-20 10:04 鍙戣〃璇勮
]]>
Design Patterns - 5 - Decoratorhttp://m.tkk7.com/dedian/archive/2006/04/20/42066.htmlDedianDedianThu, 20 Apr 2006 00:53:00 GMThttp://m.tkk7.com/dedian/archive/2006/04/20/42066.htmlhttp://m.tkk7.com/dedian/comments/42066.htmlhttp://m.tkk7.com/dedian/archive/2006/04/20/42066.html#Feedback0http://m.tkk7.com/dedian/comments/commentRss/42066.htmlhttp://m.tkk7.com/dedian/services/trackbacks/42066.html Attach additional responsiblities to an object dynamically, which thus provide a flexible alternative to subclassing for extending functionality.

Structure:
Typically, there will be a parameter to pass original object to decorator object in its constructor, then decorator can implement additional functions within its own interface and apply to original object.

when to use:

-- when subclassing is not avaible
-- when the responsibilities (for different functions) are required flexiable and dynamical
-- can not predict combination of extending functionality. (We can not design subclasses for all combination of potential additional functionalities at compile time)

reference:
Book: Design Pattern (GoF)
http://en.wikipedia.org/wiki/Decorator_pattern

Dedian 2006-04-20 08:53 鍙戣〃璇勮
]]>
Design Patterns - 4 - Compositehttp://m.tkk7.com/dedian/archive/2006/04/20/42064.htmlDedianDedianThu, 20 Apr 2006 00:52:00 GMThttp://m.tkk7.com/dedian/archive/2006/04/20/42064.htmlhttp://m.tkk7.com/dedian/comments/42064.htmlhttp://m.tkk7.com/dedian/archive/2006/04/20/42064.html#Feedback0http://m.tkk7.com/dedian/comments/commentRss/42064.htmlhttp://m.tkk7.com/dedian/services/trackbacks/42064.html Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compostions of objects uniformly.

Structure:
The composite object contains other primitive objects(or say Components), and has the same operation as in those primitive objects. Thus we can operater the composite object with the same operations as a whole. Or in other word, composite object is a container of primitive ojects and itself is derived from same base (abstract) class as primitives, so that it can have same operations as primitives. Actually, we can say that the abstract class represents both primitives and their containers

Implementation:
-- Extend a base class that represents primitive objects. And the same operation(override function) will be implemented by iterating over that collection and invoking the appropriate method for each component in the collection.
-- Add & Remove function (for component collection) will be defined in base class, though it is meaninglessful for leaf classes.

reference:
http://www.javaworld.com/javaworld/jw-09-2002/jw-0913-designpatterns.html
http://www.codeproject.com/useritems/Composite.asp

example:
http://java.sun.com/blueprints/patterns/CompositeView.html

Dedian 2006-04-20 08:52 鍙戣〃璇勮
]]>
Design Patterns - 3 - Bridgehttp://m.tkk7.com/dedian/archive/2006/04/19/42003.htmlDedianDedianWed, 19 Apr 2006 12:52:00 GMThttp://m.tkk7.com/dedian/archive/2006/04/19/42003.htmlhttp://m.tkk7.com/dedian/comments/42003.htmlhttp://m.tkk7.com/dedian/archive/2006/04/19/42003.html#Feedback0http://m.tkk7.com/dedian/comments/commentRss/42003.htmlhttp://m.tkk7.com/dedian/services/trackbacks/42003.htmlDecouple an abstraction from its implementation so that the two can vary independently.

To think about this situation that an abstract class has two categories of inheritance. Each category can be a seperate hierarchical inheritance聽tree, if we聽derive all the subclasses from the abstract class, it will make complex聽when we need to get some sub-classes that contains facades from two categories. So we need seperate those subclasses into differenct categories, typically one into implementation hierarchy while another into abstraction hierarchy which can聽employ subclasses of implementation hierarchy. No matter how, the relationship between different hierarchies is a bridge. From this point, the bridge pattern design lets different hierarchies can evolve seperately.

The structure of the Adapter Pattern (object adapter) may look similar to the Bridge Pattern. However, the adapter is meant to change the interface of an existing object and is mainly intended to make unrelated classes work together.

reference:
book:"Design Patterns鈥?Gamma et al.
http://en.wikipedia.org/wiki/Bridge_pattern
http://www.c-sharpcorner.com/Language/BridgePatternsinCSRVS.asp
http://www.codeproject.com/gen/design/bridge.asp


Dedian 2006-04-19 20:52 鍙戣〃璇勮
]]>
Design Patterns - 2 - Adapterhttp://m.tkk7.com/dedian/archive/2006/04/19/42000.htmlDedianDedianWed, 19 Apr 2006 12:37:00 GMThttp://m.tkk7.com/dedian/archive/2006/04/19/42000.htmlhttp://m.tkk7.com/dedian/comments/42000.htmlhttp://m.tkk7.com/dedian/archive/2006/04/19/42000.html#Feedback0http://m.tkk7.com/dedian/comments/commentRss/42000.htmlhttp://m.tkk7.com/dedian/services/trackbacks/42000.html
Object Adapter:

-- use compositional technique
-- by composing interface B's instance within interface A (target interface, adapter) and implement interface A in terms of B's interface(adaptee). Interface A is Object Adapter which enables the client (the class or object to use Interface A) and the adaptee(Interface B) to be completely decoupled from each other.

Class Adapter:

-- use multiple inheritance
-- Notice that Java is not supporting true multiple inheritance, there must be one inheritance is from Java Interface(implementation) not Java class. So take above Object Adapter as example, if client want to access Interface B, the adpater Interface A will inherit from class(Class Adapter) which Client can access, and inherit the implementation of Interface B(Adaptee). So Interface A can have a funtion to call functions in Interface B, and so that Interface will not have an object of Interface B, that is the difference from Object Adapter method.

reference:
http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/adapter.htm



Dedian 2006-04-19 20:37 鍙戣〃璇勮
]]>
Design Patterns - 1 - Abstract Factory (Creatioanl)http://m.tkk7.com/dedian/archive/2006/04/19/41999.htmlDedianDedianWed, 19 Apr 2006 12:33:00 GMThttp://m.tkk7.com/dedian/archive/2006/04/19/41999.htmlhttp://m.tkk7.com/dedian/comments/41999.htmlhttp://m.tkk7.com/dedian/archive/2006/04/19/41999.html#Feedback0http://m.tkk7.com/dedian/comments/commentRss/41999.htmlhttp://m.tkk7.com/dedian/services/trackbacks/41999.html
reference:

http://gsraj.tripod.com/design/creational/factory/factory.html
http://en.wikipedia.org/wiki/Factory_method_pattern
http://www.developer.com/java/other/article.php/626001
http://www.javacamp.org/designPattern/factory.html


Dedian 2006-04-19 20:33 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 成人免费观看一区二区| a一级爱做片免费| 免费黄色网址网站| 78成人精品电影在线播放日韩精品电影一区亚洲 | 一级毛片人与动免费观看| 国产精品国产午夜免费福利看| 亚洲日韩乱码中文字幕| 免费看美女让人桶尿口| 成人精品国产亚洲欧洲| 亚洲日本中文字幕一区二区三区 | 亚洲偷偷自拍高清| 好吊妞998视频免费观看在线| 精品亚洲成A人无码成A在线观看| 国产精品免费观看| MM1313亚洲国产精品| 亚洲精品视频久久久| 永久免费AV无码网站国产| 亚洲精品午夜久久久伊人| 麻豆国产精品免费视频| 亚洲欧洲国产综合AV无码久久 | 免费无码黄网站在线观看| 亚洲av永久无码| 亚洲天堂中文字幕在线| 精品国产污污免费网站| 亚洲成a人片在线网站| 青草草在线视频永久免费| 人妻免费久久久久久久了| 亚洲国产精品va在线播放| 国产成人yy免费视频| 色妞www精品视频免费看| 亚洲国产精品一区第二页| 18禁免费无码无遮挡不卡网站 | 国产美女被遭强高潮免费网站| 国产精品无码免费专区午夜| 内射少妇36P亚洲区| 狠狠久久永久免费观看| 两个人看的www免费视频中文| 亚洲中文无码av永久| 亚洲AV日韩精品一区二区三区| 日本在线看片免费| 国产成人高清亚洲一区91|