From fdb9be1e7698f60aa230aa7006be8301144bc74b Mon Sep 17 00:00:00 2001 From: Markus Date: Sat, 15 Aug 2015 18:03:05 +0200 Subject: [PATCH] Work towards #56: Add permalink to every pattern This makes cleaner URLs thanks to jekyll --- abstract-factory/index.md | 3 ++- adapter/index.md | 3 ++- async-method-invocation/index.md | 3 ++- bridge/index.md | 3 ++- builder/index.md | 3 ++- business-delegate/index.md | 3 ++- callback/index.md | 3 ++- chain-of-responsibility/index.md | 3 ++- command/index.md | 3 ++- composite/index.md | 3 ++- dao/index.md | 3 ++- decorator/index.md | 3 ++- dependency-injection/index.md | 3 ++- double-checked-locking/index.md | 3 ++- double-dispatch/index.md | 3 ++- event-aggregator/index.md | 3 ++- execute-around/index.md | 3 ++- facade/index.md | 3 ++- factory-method/index.md | 3 ++- flux/index.md | 3 ++- flyweight/index.md | 3 ++- front-controller/index.md | 3 ++- half-sync-half-async/index.md | 3 ++- idioms/index.md | 24 ------------------- intercepting-filter/index.md | 3 ++- interpreter/index.md | 3 ++- introduction/index.md | 4 +++- iterator/index.md | 3 ++- lazy-loading/index.md | 3 ++- mediator/index.md | 3 ++- memento/index.md | 3 ++- model-view-controller/index.md | 3 ++- model-view-presenter/index.md | 3 ++- multiton/index.md | 3 ++- naked-objects/index.md | 3 ++- null-object/index.md | 3 ++- object-pool/index.md | 3 ++- observer/index.md | 3 ++- poison-pill/index.md | 3 ++- private-class-data/index.md | 3 ++- property/index.md | 3 ++- prototype/index.md | 3 ++- proxy/index.md | 3 ++- repository/index.md | 3 ++- .../index.md | 3 ++- servant/index.md | 3 ++- service-layer/index.md | 3 ++- service-locator/index.md | 3 ++- singleton/index.md | 3 ++- specification/index.md | 3 ++- state/index.md | 3 ++- step-builder/index.md | 3 ++- strategy/index.md | 3 ++- template-method/index.md | 3 ++- thread-pool/index.md | 3 ++- tolerant-reader/index.md | 3 ++- visitor/index.md | 3 ++- 57 files changed, 113 insertions(+), 80 deletions(-) delete mode 100644 idioms/index.md diff --git a/abstract-factory/index.md b/abstract-factory/index.md index ae053b2a2..412e16009 100644 --- a/abstract-factory/index.md +++ b/abstract-factory/index.md @@ -2,6 +2,7 @@ layout: pattern title: Abstract Factory folder: abstract-factory +permalink: /patterns/abstract-factory/ categories: - pattern_cat - creational @@ -22,4 +23,4 @@ objects without specifying their concrete classes. **Real world examples:** -* [javax.xml.parsers.DocumentBuilderFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/parsers/DocumentBuilderFactory.html) \ No newline at end of file +* [javax.xml.parsers.DocumentBuilderFactory](http://docs.oracle.com/javase/8/docs/api/javax/xml/parsers/DocumentBuilderFactory.html) diff --git a/adapter/index.md b/adapter/index.md index b8d2741cc..f1e4043b6 100644 --- a/adapter/index.md +++ b/adapter/index.md @@ -2,6 +2,7 @@ layout: pattern title: Adapter folder: adapter +permalink: /patterns/adapter/ categories: pattern_cat tags: pattern_tag --- @@ -20,4 +21,4 @@ incompatible interfaces. **Real world examples:** -* [java.util.Arrays#asList()](http://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#asList%28T...%29) \ No newline at end of file +* [java.util.Arrays#asList()](http://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html#asList%28T...%29) diff --git a/async-method-invocation/index.md b/async-method-invocation/index.md index 00812d310..0ea60c168 100644 --- a/async-method-invocation/index.md +++ b/async-method-invocation/index.md @@ -2,6 +2,7 @@ layout: pattern title: Async Method Invocation folder: async-method-invocation +permalink: /patterns/async-method-invocation/ categories: pattern_cat tags: pattern_tag --- @@ -23,4 +24,4 @@ callbacks or waiting until everything is done. **Real world examples:** * [FutureTask](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/FutureTask.html), [CompletableFuture](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) and [ExecutorService](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html) (Java) -* [Task-based Asynchronous Pattern](https://msdn.microsoft.com/en-us/library/hh873175.aspx) (.NET) \ No newline at end of file +* [Task-based Asynchronous Pattern](https://msdn.microsoft.com/en-us/library/hh873175.aspx) (.NET) diff --git a/bridge/index.md b/bridge/index.md index d0a1e0ea1..b2319e22e 100644 --- a/bridge/index.md +++ b/bridge/index.md @@ -2,6 +2,7 @@ layout: pattern title: Bridge folder: bridge +permalink: /patterns/bridge/ categories: pattern_cat tags: pattern_tag --- @@ -18,4 +19,4 @@ vary independently. * both the abstractions and their implementations should be extensible by subclassing. In this case, the Bridge pattern lets you combine the different abstractions and implementations and extend them independently * changes in the implementation of an abstraction should have no impact on clients; that is, their code should not have to be recompiled. * you have a proliferation of classes. Such a class hierarchy indicates the need for splitting an object into two parts. Rumbaugh uses the term "nested generalizations" to refer to such class hierarchies -* you want to share an implementation among multiple objects (perhaps using reference counting), and this fact should be hidden from the client. A simple example is Coplien's String class, in which multiple objects can share the same string representation. \ No newline at end of file +* you want to share an implementation among multiple objects (perhaps using reference counting), and this fact should be hidden from the client. A simple example is Coplien's String class, in which multiple objects can share the same string representation. diff --git a/builder/index.md b/builder/index.md index 0a5254ce1..78fb61fea 100644 --- a/builder/index.md +++ b/builder/index.md @@ -2,6 +2,7 @@ layout: pattern title: Builder folder: builder +permalink: /patterns/builder/ categories: creational tags: pattern_tag --- @@ -20,4 +21,4 @@ representations. **Real world examples:** * [java.lang.StringBuilder](http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html) -* [Apache Camel builders](https://github.com/apache/camel/tree/0e195428ee04531be27a0b659005e3aa8d159d23/camel-core/src/main/java/org/apache/camel/builder) \ No newline at end of file +* [Apache Camel builders](https://github.com/apache/camel/tree/0e195428ee04531be27a0b659005e3aa8d159d23/camel-core/src/main/java/org/apache/camel/builder) diff --git a/business-delegate/index.md b/business-delegate/index.md index 23c92b89e..37b118e15 100644 --- a/business-delegate/index.md +++ b/business-delegate/index.md @@ -2,6 +2,7 @@ layout: pattern title: Business Delegate folder: business-delegate +permalink: /patterns/business-delegate/ categories: pattern_cat tags: pattern_tag --- @@ -17,4 +18,4 @@ and interact with the business objects that make up the application. * you want loose coupling between presentation and business tiers * you want to orchestrate calls to multiple business services -* you want to encapsulate service lookups and service calls \ No newline at end of file +* you want to encapsulate service lookups and service calls diff --git a/callback/index.md b/callback/index.md index b8a4f2808..1d65e1514 100644 --- a/callback/index.md +++ b/callback/index.md @@ -2,6 +2,7 @@ layout: pattern title: Callback folder: callback +permalink: /patterns/callback/ categories: pattern_cat tags: pattern_tag --- @@ -18,4 +19,4 @@ at some convenient time. **Real world examples:** -* [CyclicBarrier] (http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CyclicBarrier.html#CyclicBarrier%28int,%20java.lang.Runnable%29) constructor can accept callback that will be triggered every time when barrier is tripped. \ No newline at end of file +* [CyclicBarrier] (http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CyclicBarrier.html#CyclicBarrier%28int,%20java.lang.Runnable%29) constructor can accept callback that will be triggered every time when barrier is tripped. diff --git a/chain-of-responsibility/index.md b/chain-of-responsibility/index.md index 234815506..3ee2a3c64 100644 --- a/chain-of-responsibility/index.md +++ b/chain-of-responsibility/index.md @@ -2,6 +2,7 @@ layout: pattern title: Chain of responsibility folder: chain-of-responsibility +permalink: /patterns/chain-of-responsibility/ categories: pattern_cat tags: pattern_tag --- @@ -21,4 +22,4 @@ objects and pass the request along the chain until an object handles it. **Real world examples:** * [java.util.logging.Logger#log()](http://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html#log%28java.util.logging.Level,%20java.lang.String%29) -* [Apache Commons Chain](https://commons.apache.org/proper/commons-chain/index.html) \ No newline at end of file +* [Apache Commons Chain](https://commons.apache.org/proper/commons-chain/index.html) diff --git a/command/index.md b/command/index.md index 21422da35..a675a30c7 100644 --- a/command/index.md +++ b/command/index.md @@ -2,6 +2,7 @@ layout: pattern title: Command folder: command +permalink: /patterns/command/ categories: pattern_cat tags: pattern_tag --- @@ -28,4 +29,4 @@ support undoable operations. **Real world examples:** -* [java.lang.Runnable](http://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html) \ No newline at end of file +* [java.lang.Runnable](http://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html) diff --git a/composite/index.md b/composite/index.md index d987aa27c..f50c32dd3 100644 --- a/composite/index.md +++ b/composite/index.md @@ -2,6 +2,7 @@ layout: pattern title: Composite folder: composite +permalink: /patterns/composite/ categories: pattern_cat tags: pattern_tag --- @@ -20,4 +21,4 @@ of objects uniformly. **Real world examples:** * [java.awt.Container](http://docs.oracle.com/javase/8/docs/api/java/awt/Container.html) and [java.awt.Component](http://docs.oracle.com/javase/8/docs/api/java/awt/Component.html) -* [Apache Wicket](https://github.com/apache/wicket) component tree, see [Component](https://github.com/apache/wicket/blob/91e154702ab1ff3481ef6cbb04c6044814b7e130/wicket-core/src/main/java/org/apache/wicket/Component.java) and [MarkupContainer](https://github.com/apache/wicket/blob/b60ec64d0b50a611a9549809c9ab216f0ffa3ae3/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java) \ No newline at end of file +* [Apache Wicket](https://github.com/apache/wicket) component tree, see [Component](https://github.com/apache/wicket/blob/91e154702ab1ff3481ef6cbb04c6044814b7e130/wicket-core/src/main/java/org/apache/wicket/Component.java) and [MarkupContainer](https://github.com/apache/wicket/blob/b60ec64d0b50a611a9549809c9ab216f0ffa3ae3/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java) diff --git a/dao/index.md b/dao/index.md index 3d6b10d3f..8058f7c7c 100644 --- a/dao/index.md +++ b/dao/index.md @@ -2,6 +2,7 @@ layout: pattern title: Data Access Object folder: dao +permalink: /patterns/dao/ categories: pattern_cat tags: pattern_tag --- @@ -14,4 +15,4 @@ other persistence mechanism. **Applicability:** Use the Data Access Object in any of the following situations * when you want to consolidate how the data layer is accessed -* when you want to avoid writing multiple data retrieval/persistence layers \ No newline at end of file +* when you want to avoid writing multiple data retrieval/persistence layers diff --git a/decorator/index.md b/decorator/index.md index 3674e5d4a..95ad2dced 100644 --- a/decorator/index.md +++ b/decorator/index.md @@ -2,6 +2,7 @@ layout: pattern title: Decorator folder: decorator +permalink: /patterns/decorator/ categories: pattern_cat tags: pattern_tag --- @@ -16,4 +17,4 @@ functionality. * to add responsibilities to individual objects dynamically and transparently, that is, without affecting other objects * for responsibilities that can be withdrawn -* when extension by subclassing is impractical. Sometimes a large number of independent extensions are possible and would produce an explosion of subclasses to support every combination. Or a class definition may be hidden or otherwise unavailable for subclassing \ No newline at end of file +* when extension by subclassing is impractical. Sometimes a large number of independent extensions are possible and would produce an explosion of subclasses to support every combination. Or a class definition may be hidden or otherwise unavailable for subclassing diff --git a/dependency-injection/index.md b/dependency-injection/index.md index d0b238818..3b2853c75 100644 --- a/dependency-injection/index.md +++ b/dependency-injection/index.md @@ -2,6 +2,7 @@ layout: pattern title: Dependency Injection folder: dependency-injection +permalink: /patterns/dependency-injection/ categories: pattern_cat tags: pattern_tag --- @@ -18,4 +19,4 @@ inversion of control and single responsibility principles. **Applicability:** Use the Dependency Injection pattern when * when you need to remove knowledge of concrete implementation from object -* to enable unit testing of classes in isolation using mock objects or stubs \ No newline at end of file +* to enable unit testing of classes in isolation using mock objects or stubs diff --git a/double-checked-locking/index.md b/double-checked-locking/index.md index 8af9e6af0..92fb22b01 100644 --- a/double-checked-locking/index.md +++ b/double-checked-locking/index.md @@ -2,6 +2,7 @@ layout: pattern title: Double Checked Locking folder: double-checked-locking +permalink: /patterns/double-checked-locking/ categories: pattern_cat tags: pattern_tag --- @@ -16,4 +17,4 @@ actual locking logic proceed. **Applicability:** Use the Double Checked Locking pattern when * there is a concurrent access in object creation, e.g. singleton, where you want to create single instance of the same class and checking if it's null or not maybe not be enough when there are two or more threads that checks if instance is null or not. -* there is a concurrent access on a method where method's behaviour changes according to the some constraints and these constraint change within this method. \ No newline at end of file +* there is a concurrent access on a method where method's behaviour changes according to the some constraints and these constraint change within this method. diff --git a/double-dispatch/index.md b/double-dispatch/index.md index 8c6586590..842913738 100644 --- a/double-dispatch/index.md +++ b/double-dispatch/index.md @@ -2,6 +2,7 @@ layout: pattern title: Double Dispatch folder: double-dispatch +permalink: /patterns/double-dispatch/ categories: pattern_cat tags: pattern_tag --- @@ -17,4 +18,4 @@ behavior based on receiver and parameter types. **Real world examples:** -* [ObjectOutputStream](https://docs.oracle.com/javase/8/docs/api/java/io/ObjectOutputStream.html) \ No newline at end of file +* [ObjectOutputStream](https://docs.oracle.com/javase/8/docs/api/java/io/ObjectOutputStream.html) diff --git a/event-aggregator/index.md b/event-aggregator/index.md index a6fd9fb22..d4a2395bd 100644 --- a/event-aggregator/index.md +++ b/event-aggregator/index.md @@ -2,6 +2,7 @@ layout: pattern title: Event Aggregator folder: event-aggregator +permalink: /patterns/event-aggregator/ categories: pattern_cat tags: pattern_tag --- @@ -21,4 +22,4 @@ allowing clients to register with just the aggregator. potential event sources. Rather than have the observer deal with registering with them all, you can centralize the registration logic to the Event Aggregator. As well as simplifying registration, a Event Aggregator also - simplifies the memory management issues in using observers. \ No newline at end of file + simplifies the memory management issues in using observers. diff --git a/execute-around/index.md b/execute-around/index.md index 949f424c3..ec4c040bf 100644 --- a/execute-around/index.md +++ b/execute-around/index.md @@ -2,6 +2,7 @@ layout: pattern title: Execute Around folder: execute-around +permalink: /patterns/execute-around/ categories: pattern_cat tags: pattern_tag --- @@ -15,4 +16,4 @@ only what to do with the resource. **Applicability:** Use the Execute Around idiom when -* you use an API that requires methods to be called in pairs such as open/close or allocate/deallocate. \ No newline at end of file +* you use an API that requires methods to be called in pairs such as open/close or allocate/deallocate. diff --git a/facade/index.md b/facade/index.md index 8a9a9c1b9..7e0d3100a 100644 --- a/facade/index.md +++ b/facade/index.md @@ -2,6 +2,7 @@ layout: pattern title: Facade folder: facade +permalink: /patterns/facade/ categories: pattern_cat tags: pattern_tag --- @@ -15,4 +16,4 @@ Facade defines a higher-level interface that makes the subsystem easier to use. * you want to provide a simple interface to a complex subsystem. Subsystems often get more complex as they evolve. Most patterns, when applied, result in more and smaller classes. This makes the subsystem more reusable and easier to customize, but it also becomes harder to use for clients that don't need to customize it. A facade can provide a simple default view of the subsystem that is good enough for most clients. Only clients needing more customizability will need to look beyond the facade. * there are many dependencies between clients and the implementation classes of an abstraction. Introduce a facade to decouple the subsystem from clients and other subsystems, thereby promoting subsystem independence and portability. -* you want to layer your subsystems. Use a facade to define an entry point to each subsystem level. If subsystems are dependent, the you can simplify the dependencies between them by making them communicate with each other solely through their facades \ No newline at end of file +* you want to layer your subsystems. Use a facade to define an entry point to each subsystem level. If subsystems are dependent, the you can simplify the dependencies between them by making them communicate with each other solely through their facades diff --git a/factory-method/index.md b/factory-method/index.md index e80382b9c..11ad77dda 100644 --- a/factory-method/index.md +++ b/factory-method/index.md @@ -2,6 +2,7 @@ layout: pattern title: Factory Method folder: factory-method +permalink: /patterns/factory-method/ categories: creational tags: pattern_tag --- @@ -16,4 +17,4 @@ instantiation to subclasses. * a class can't anticipate the class of objects it must create * a class wants its subclasses to specify the objects it creates -* classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate \ No newline at end of file +* classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate diff --git a/flux/index.md b/flux/index.md index f91c0ef00..fec262dce 100644 --- a/flux/index.md +++ b/flux/index.md @@ -2,6 +2,7 @@ layout: pattern title: Flux folder: flux +permalink: /patterns/flux/ categories: pattern_cat tags: pattern_tag --- @@ -15,4 +16,4 @@ logic, which updates all of the views that are affected. **Applicability:** Use the Flux pattern when -* you want to focus on creating explicit and understandable update paths for your application's data, which makes tracing changes during development simpler and makes bugs easier to track down and fix. \ No newline at end of file +* you want to focus on creating explicit and understandable update paths for your application's data, which makes tracing changes during development simpler and makes bugs easier to track down and fix. diff --git a/flyweight/index.md b/flyweight/index.md index c1d2439a7..a2a4ca575 100644 --- a/flyweight/index.md +++ b/flyweight/index.md @@ -2,6 +2,7 @@ layout: pattern title: Flyweight folder: flyweight +permalink: /patterns/flyweight/ categories: pattern_cat tags: pattern_tag --- @@ -22,4 +23,4 @@ true **Real world examples:** -* [java.lang.Integer#valueOf(int)](http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html#valueOf%28int%29) \ No newline at end of file +* [java.lang.Integer#valueOf(int)](http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html#valueOf%28int%29) diff --git a/front-controller/index.md b/front-controller/index.md index 0a77a5ef3..221da0404 100644 --- a/front-controller/index.md +++ b/front-controller/index.md @@ -2,6 +2,7 @@ layout: pattern title: Front Controller folder: front-controller +permalink: /patterns/front-controller/ categories: pattern_cat tags: pattern_tag --- @@ -20,4 +21,4 @@ internationalization, routing and logging in a single place. **Real world examples:** -* [Apache Struts](https://struts.apache.org/) \ No newline at end of file +* [Apache Struts](https://struts.apache.org/) diff --git a/half-sync-half-async/index.md b/half-sync-half-async/index.md index a9cd97698..ef3677fce 100644 --- a/half-sync-half-async/index.md +++ b/half-sync-half-async/index.md @@ -2,6 +2,7 @@ layout: pattern title: Half-Sync/Half-Async folder: half-sync-half-async +permalink: /patterns/half-sync-half-async/ categories: pattern_cat tags: pattern_tag --- @@ -24,4 +25,4 @@ degrading execution efficiency. * [BSD Unix networking subsystem](http://www.cs.wustl.edu/~schmidt/PDF/PLoP-95.pdf) * [Real Time CORBA](http://www.omg.org/news/meetings/workshops/presentations/realtime2001/4-3_Pyarali_thread-pool.pdf) -* [Android AsyncTask framework](http://developer.android.com/reference/android/os/AsyncTask.html) \ No newline at end of file +* [Android AsyncTask framework](http://developer.android.com/reference/android/os/AsyncTask.html) diff --git a/idioms/index.md b/idioms/index.md deleted file mode 100644 index 68b689117..000000000 --- a/idioms/index.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -layout: pattern -title: Idioms -folder: idioms -categories: pattern_cat -tags: pattern_tag ---- - - -A programming idiom is a means of expressing a recurring construct in one or -more programming languages. Generally speaking, a programming idiom is an -expression of a simple task, algorithm, or data structure that is not a built-in -feature in the programming language being used, or, conversely, the use of an -unusual or notable feature that is built into a programming language. What -distinguishes idioms from patterns is generally the size, the idioms tend to be -something small while the patterns are larger. - -* [Execute Around](#execute-around) -* [Poison Pill](#poison-pill) -* [Callback](#callback) -* [Lazy Loading](#lazy-loading) -* [Double Dispatch](#double-dispatch) -* [Resource Acquisition Is Initialization](#resource-acquisition-is-initialization) -* [Private Class Data](#private-class-data) \ No newline at end of file diff --git a/intercepting-filter/index.md b/intercepting-filter/index.md index 1badb0521..6ceb97277 100644 --- a/intercepting-filter/index.md +++ b/intercepting-filter/index.md @@ -2,6 +2,7 @@ layout: pattern title: Intercepting Filter folder: intercepting-filter +permalink: /patterns/intercepting-filter/ categories: pattern_cat tags: pattern_tag --- @@ -15,4 +16,4 @@ post-processing to requests from a client to a target * a system uses pre-processing or post-processing requests * a system should do the authentication/ authorization/ logging or tracking of request and then pass the requests to corresponding handlers -* you want a modular approach to configuring pre-processing and post-processing schemes \ No newline at end of file +* you want a modular approach to configuring pre-processing and post-processing schemes diff --git a/interpreter/index.md b/interpreter/index.md index dcd0d9f46..d1d0babaf 100644 --- a/interpreter/index.md +++ b/interpreter/index.md @@ -2,6 +2,7 @@ layout: pattern title: Interpreter folder: interpreter +permalink: /patterns/interpreter/ categories: pattern_cat tags: pattern_tag --- @@ -16,4 +17,4 @@ language. interpret, and you can represent statements in the language as abstract syntax trees. The Interpreter pattern works best when * the grammar is simple. For complex grammars, the class hierarchy for the grammar becomes large and unmanageable. Tools such as parser generators are a better alternative in such cases. They can interpret expressions without building abstract syntax trees, which can save space and possibly time -* efficiency is not a critical concern. The most efficient interpreters are usually not implemented by interpreting parse trees directly but by first translating them into another form. For example, regular expressions are often transformed into state machines. But even then, the translator can be implemented by the Interpreter pattern, so the pattern is still applicable \ No newline at end of file +* efficiency is not a critical concern. The most efficient interpreters are usually not implemented by interpreting parse trees directly but by first translating them into another form. For example, regular expressions are often transformed into state machines. But even then, the translator can be implemented by the Interpreter pattern, so the pattern is still applicable diff --git a/introduction/index.md b/introduction/index.md index 8ca2aea0e..14df55cee 100644 --- a/introduction/index.md +++ b/introduction/index.md @@ -2,6 +2,8 @@ layout: pattern title: Introduction folder: introduction +permalink: /patterns/introduction/ +permalink: /patterns/introduction/ categories: pattern_cat tags: pattern_tag --- @@ -15,4 +17,4 @@ development paradigms. Reusing design patterns helps to prevent subtle issues that can cause major problems, and it also improves code readability for coders and architects who -are familiar with the patterns. \ No newline at end of file +are familiar with the patterns. diff --git a/iterator/index.md b/iterator/index.md index 75d9223d1..d8005cc23 100644 --- a/iterator/index.md +++ b/iterator/index.md @@ -2,6 +2,7 @@ layout: pattern title: Iterator folder: iterator +permalink: /patterns/iterator/ categories: pattern_cat tags: pattern_tag --- @@ -19,4 +20,4 @@ sequentially without exposing its underlying representation. **Real world examples:** -* [java.util.Iterator](http://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html) \ No newline at end of file +* [java.util.Iterator](http://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html) diff --git a/lazy-loading/index.md b/lazy-loading/index.md index 4a14d83d6..c1ecc1cf5 100644 --- a/lazy-loading/index.md +++ b/lazy-loading/index.md @@ -2,6 +2,7 @@ layout: pattern title: Lazy Loading folder: lazy-loading +permalink: /patterns/lazy-loading/ categories: pattern_cat tags: pattern_tag --- @@ -19,4 +20,4 @@ appropriately used. **Real world examples:** -* JPA annotations @OneToOne, @OneToMany, @ManyToOne, @ManyToMany and fetch = FetchType.LAZY \ No newline at end of file +* JPA annotations @OneToOne, @OneToMany, @ManyToOne, @ManyToMany and fetch = FetchType.LAZY diff --git a/mediator/index.md b/mediator/index.md index f112d68ff..ce1119eab 100644 --- a/mediator/index.md +++ b/mediator/index.md @@ -2,6 +2,7 @@ layout: pattern title: Mediator folder: mediator +permalink: /patterns/mediator/ categories: pattern_cat tags: pattern_tag --- @@ -16,4 +17,4 @@ other explicitly, and it lets you vary their interaction independently. * a set of objects communicate in well-defined but complex ways. The resulting interdependencies are unstructured and difficult to understand * reusing an object is difficult because it refers to and communicates with many other objects -* a behavior that's distributed between several classes should be customizable without a lot of subclassing \ No newline at end of file +* a behavior that's distributed between several classes should be customizable without a lot of subclassing diff --git a/memento/index.md b/memento/index.md index 5c7bbb618..beb447fc9 100644 --- a/memento/index.md +++ b/memento/index.md @@ -2,6 +2,7 @@ layout: pattern title: Memento folder: memento +permalink: /patterns/memento/ categories: pattern_cat tags: pattern_tag --- @@ -18,4 +19,4 @@ object's internal state so that the object can be restored to this state later. **Real world examples:** -* [java.util.Date](http://docs.oracle.com/javase/8/docs/api/java/util/Date.html) \ No newline at end of file +* [java.util.Date](http://docs.oracle.com/javase/8/docs/api/java/util/Date.html) diff --git a/model-view-controller/index.md b/model-view-controller/index.md index 39a370258..cb85bad19 100644 --- a/model-view-controller/index.md +++ b/model-view-controller/index.md @@ -2,6 +2,7 @@ layout: pattern title: Model-View-Controller folder: model-view-controller +permalink: /patterns/model-view-controller/ categories: pattern_cat tags: pattern_tag --- @@ -15,4 +16,4 @@ display. **Applicability:** Use the Model-View-Controller pattern when -* you want to clearly separate the domain data from its user interface representation \ No newline at end of file +* you want to clearly separate the domain data from its user interface representation diff --git a/model-view-presenter/index.md b/model-view-presenter/index.md index 85b72029b..35b62a391 100644 --- a/model-view-presenter/index.md +++ b/model-view-presenter/index.md @@ -2,6 +2,7 @@ layout: pattern title: Model-View-Presenter folder: model-view-presenter +permalink: /patterns/model-view-presenter/ categories: pattern_cat tags: pattern_tag --- @@ -14,4 +15,4 @@ developers to build and test user interfaces. **Applicability:** Use the Model-View-Presenter in any of the following situations * when you want to improve the "Separation of Concerns" principle in presentation logic -* when a user interface development and testing is necessary. \ No newline at end of file +* when a user interface development and testing is necessary. diff --git a/multiton/index.md b/multiton/index.md index 23ddc714a..854d75de3 100644 --- a/multiton/index.md +++ b/multiton/index.md @@ -2,6 +2,7 @@ layout: pattern title: Multiton folder: multiton +permalink: /patterns/multiton/ categories: pattern_cat tags: pattern_tag --- @@ -13,4 +14,4 @@ global point of access to them. **Applicability:** Use the Multiton pattern when -* there must be specific number of instances of a class, and they must be accessible to clients from a well-known access point \ No newline at end of file +* there must be specific number of instances of a class, and they must be accessible to clients from a well-known access point diff --git a/naked-objects/index.md b/naked-objects/index.md index db7a48b48..160e68add 100644 --- a/naked-objects/index.md +++ b/naked-objects/index.md @@ -2,6 +2,7 @@ layout: pattern title: Naked Objects folder: naked-objects +permalink: /patterns/naked-objects/ categories: pattern_cat tags: pattern_tag --- @@ -20,4 +21,4 @@ everything else is autogenerated by the framework. **Real world examples:** -* [Apache Isis](https://isis.apache.org/) \ No newline at end of file +* [Apache Isis](https://isis.apache.org/) diff --git a/null-object/index.md b/null-object/index.md index 0ffb4395f..9888eeaf7 100644 --- a/null-object/index.md +++ b/null-object/index.md @@ -2,6 +2,7 @@ layout: pattern title: Null Object folder: null-object +permalink: /patterns/null-object/ categories: pattern_cat tags: pattern_tag --- @@ -19,4 +20,4 @@ Object is very predictable and has no side effects: it does nothing. **Applicability:** Use the Null Object pattern when -* you want to avoid explicit null checks and keep the algorithm elegant and easy to read. \ No newline at end of file +* you want to avoid explicit null checks and keep the algorithm elegant and easy to read. diff --git a/object-pool/index.md b/object-pool/index.md index 7521ce66f..a812d3fa1 100644 --- a/object-pool/index.md +++ b/object-pool/index.md @@ -2,6 +2,7 @@ layout: pattern title: Object Pool folder: object-pool +permalink: /patterns/object-pool/ categories: pattern_cat tags: pattern_tag --- @@ -16,4 +17,4 @@ are in use and which are available. **Applicability:** Use the Object Pool pattern when * the objects are expensive to create (allocation cost) -* you need a large number of short-lived objects (memory fragmentation) \ No newline at end of file +* you need a large number of short-lived objects (memory fragmentation) diff --git a/observer/index.md b/observer/index.md index 16bcfcd67..ea6de55ae 100644 --- a/observer/index.md +++ b/observer/index.md @@ -2,6 +2,7 @@ layout: pattern title: Observer folder: observer +permalink: /patterns/observer/ categories: pattern_cat tags: pattern_tag --- @@ -24,4 +25,4 @@ automatically. **Real world examples:** -* [java.util.Observer](http://docs.oracle.com/javase/8/docs/api/java/util/Observer.html) \ No newline at end of file +* [java.util.Observer](http://docs.oracle.com/javase/8/docs/api/java/util/Observer.html) diff --git a/poison-pill/index.md b/poison-pill/index.md index ab151dc5d..7d3b02bf4 100644 --- a/poison-pill/index.md +++ b/poison-pill/index.md @@ -2,6 +2,7 @@ layout: pattern title: Poison Pill folder: poison-pill +permalink: /patterns/poison-pill/ categories: pattern_cat tags: pattern_tag --- @@ -17,4 +18,4 @@ graceful shutdown for separate distributed consumption process. **Real world examples:** -* [akka.actor.PoisonPill](http://doc.akka.io/docs/akka/2.1.4/java/untyped-actors.html) \ No newline at end of file +* [akka.actor.PoisonPill](http://doc.akka.io/docs/akka/2.1.4/java/untyped-actors.html) diff --git a/private-class-data/index.md b/private-class-data/index.md index 4f83a0c32..b90ae654d 100644 --- a/private-class-data/index.md +++ b/private-class-data/index.md @@ -2,6 +2,7 @@ layout: pattern title: Private Class Data folder: private-class-data +permalink: /patterns/private-class-data/ categories: pattern_cat tags: pattern_tag --- @@ -14,4 +15,4 @@ attributes by encapsulating them in single Data object. **Applicability:** Use the Private Class Data pattern when -* you want to prevent write access to class data members \ No newline at end of file +* you want to prevent write access to class data members diff --git a/property/index.md b/property/index.md index 6e92c35f8..4ebb3e74a 100644 --- a/property/index.md +++ b/property/index.md @@ -2,6 +2,7 @@ layout: pattern title: Property folder: property +permalink: /patterns/property/ categories: pattern_cat tags: pattern_tag --- @@ -17,4 +18,4 @@ objects as parents. **Real world examples:** -* [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) prototype inheritance \ No newline at end of file +* [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) prototype inheritance diff --git a/prototype/index.md b/prototype/index.md index aeb4b69b0..e0b500188 100644 --- a/prototype/index.md +++ b/prototype/index.md @@ -2,6 +2,7 @@ layout: pattern title: Prototype folder: prototype +permalink: /patterns/prototype/ categories: pattern_cat tags: pattern_tag --- @@ -19,4 +20,4 @@ instance, and create new objects by copying this prototype. **Real world examples:** -* [java.lang.Object#clone()](http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone%28%29) \ No newline at end of file +* [java.lang.Object#clone()](http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone%28%29) diff --git a/proxy/index.md b/proxy/index.md index 8f907d563..54d16b37c 100644 --- a/proxy/index.md +++ b/proxy/index.md @@ -2,6 +2,7 @@ layout: pattern title: Proxy folder: proxy +permalink: /patterns/proxy/ categories: pattern_cat tags: pattern_tag --- @@ -30,4 +31,4 @@ are several common situations in which the Proxy pattern is applicable **Real world examples:** * [java.lang.reflect.Proxy](http://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Proxy.html) -* [Apache Commons Proxy](https://commons.apache.org/proper/commons-proxy/) \ No newline at end of file +* [Apache Commons Proxy](https://commons.apache.org/proper/commons-proxy/) diff --git a/repository/index.md b/repository/index.md index 0fbd39d30..320509f5e 100644 --- a/repository/index.md +++ b/repository/index.md @@ -2,6 +2,7 @@ layout: pattern title: Repository folder: repository +permalink: /patterns/repository/ categories: pattern_cat tags: pattern_tag --- @@ -23,4 +24,4 @@ querying is utilized. **Real world examples:** -* [Spring Data](http://projects.spring.io/spring-data/) \ No newline at end of file +* [Spring Data](http://projects.spring.io/spring-data/) diff --git a/resource-acquisition-is-initialization/index.md b/resource-acquisition-is-initialization/index.md index d5fb509c6..7b283ab8c 100644 --- a/resource-acquisition-is-initialization/index.md +++ b/resource-acquisition-is-initialization/index.md @@ -2,6 +2,7 @@ layout: pattern title: Resource Acquisition Is Initialization folder: resource-acquisition-is-initialization +permalink: /patterns/resource-acquisition-is-initialization/ categories: pattern_cat tags: pattern_tag --- @@ -12,4 +13,4 @@ tags: pattern_tag **Applicability:** Use the Resource Acquisition Is Initialization pattern when -* you have resources that must be closed in every condition \ No newline at end of file +* you have resources that must be closed in every condition diff --git a/servant/index.md b/servant/index.md index ff0339d00..3d2d6ead2 100644 --- a/servant/index.md +++ b/servant/index.md @@ -2,6 +2,7 @@ layout: pattern title: Servant folder: servant +permalink: /patterns/servant/ categories: pattern_cat tags: pattern_tag --- @@ -14,4 +15,4 @@ this behavior in the common parent class - it is defined once in the Servant. **Applicability:** Use the Servant pattern when -* when we want some objects to perform a common action and don't want to define this action as a method in every class. \ No newline at end of file +* when we want some objects to perform a common action and don't want to define this action as a method in every class. diff --git a/service-layer/index.md b/service-layer/index.md index 0c1a09163..1ce533b37 100644 --- a/service-layer/index.md +++ b/service-layer/index.md @@ -2,6 +2,7 @@ layout: pattern title: Service Layer folder: service-layer +permalink: /patterns/service-layer/ categories: pattern_cat tags: pattern_tag --- @@ -18,4 +19,4 @@ its business logic. The Service Layer fulfills this role. **Applicability:** Use the Service Layer pattern when * you want to encapsulate domain logic under API -* you need to implement multiple interfaces with common logic and data \ No newline at end of file +* you need to implement multiple interfaces with common logic and data diff --git a/service-locator/index.md b/service-locator/index.md index c091b3440..5e002fe67 100644 --- a/service-locator/index.md +++ b/service-locator/index.md @@ -2,6 +2,7 @@ layout: pattern title: Service Locator folder: service-locator +permalink: /patterns/service-locator/ categories: pattern_cat tags: pattern_tag --- @@ -24,4 +25,4 @@ improves the performance of application to great extent. * when network hits are expensive and time consuming * lookups of services are done quite frequently -* large number of services are being used \ No newline at end of file +* large number of services are being used diff --git a/singleton/index.md b/singleton/index.md index a06b4efcc..dad14ecd4 100644 --- a/singleton/index.md +++ b/singleton/index.md @@ -2,6 +2,7 @@ layout: pattern title: Singleton folder: singleton +permalink: /patterns/singleton/ categories: pattern_cat tags: pattern_tag --- @@ -24,4 +25,4 @@ access to it. **Real world examples:** -* [java.lang.Runtime#getRuntime()](http://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#getRuntime%28%29) \ No newline at end of file +* [java.lang.Runtime#getRuntime()](http://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#getRuntime%28%29) diff --git a/specification/index.md b/specification/index.md index 1ad6cd3f7..9c4d1c2f6 100644 --- a/specification/index.md +++ b/specification/index.md @@ -2,6 +2,7 @@ layout: pattern title: Specification folder: specification +permalink: /patterns/specification/ categories: pattern_cat tags: pattern_tag --- @@ -16,4 +17,4 @@ order **Applicability:** Use the Specification pattern when * you need to select a subset of objects based on some criteria, and to refresh the selection at various times -* you need to check that only suitable objects are used for a certain role (validation) \ No newline at end of file +* you need to check that only suitable objects are used for a certain role (validation) diff --git a/state/index.md b/state/index.md index 8bafb0fe1..5142645fa 100644 --- a/state/index.md +++ b/state/index.md @@ -2,6 +2,7 @@ layout: pattern title: State folder: state +permalink: /patterns/state/ categories: pattern_cat tags: pattern_tag --- @@ -14,4 +15,4 @@ changes. The object will appear to change its class. **Applicability:** Use the State pattern in either of the following cases * an object's behavior depends on its state, and it must change its behavior at run-time depending on that state -* operations have large, multipart conditional statements that depend on the object's state. This state is usually represented by one or more enumerated constants. Often, several operations will contain this same conditional structure. The State pattern puts each branch of the conditional in a separate class. This lets you treat the object's state as an object in its own right that can vary independently from other objects. \ No newline at end of file +* operations have large, multipart conditional statements that depend on the object's state. This state is usually represented by one or more enumerated constants. Often, several operations will contain this same conditional structure. The State pattern puts each branch of the conditional in a separate class. This lets you treat the object's state as an object in its own right that can vary independently from other objects. diff --git a/step-builder/index.md b/step-builder/index.md index ce805fe07..5a7a42246 100644 --- a/step-builder/index.md +++ b/step-builder/index.md @@ -2,6 +2,7 @@ layout: pattern title: Step Builder folder: step-builder +permalink: /patterns/step-builder/ categories: pattern_cat tags: pattern_tag --- @@ -11,4 +12,4 @@ The user experience will be much more improved by the fact that he will only see ![alt text](./etc/step-builder.png "Step Builder") -**Applicability:** Use the Step Builder pattern when the algorithm for creating a complex object should be independent of the parts that make up the object and how they're assembled the construction process must allow different representations for the object that's constructed when in the process of constructing the order is important. \ No newline at end of file +**Applicability:** Use the Step Builder pattern when the algorithm for creating a complex object should be independent of the parts that make up the object and how they're assembled the construction process must allow different representations for the object that's constructed when in the process of constructing the order is important. diff --git a/strategy/index.md b/strategy/index.md index ecd6623fa..0cc720138 100644 --- a/strategy/index.md +++ b/strategy/index.md @@ -2,6 +2,7 @@ layout: pattern title: Strategy folder: strategy +permalink: /patterns/strategy/ categories: pattern_cat tags: pattern_tag --- @@ -17,4 +18,4 @@ that use it. * many related classes differ only in their behavior. Strategies provide a way to configure a class either one of many behaviors * you need different variants of an algorithm. for example, you might define algorithms reflecting different space/time trade-offs. Strategies can be used when these variants are implemented as a class hierarchy of algorithms * an algorithm uses data that clients shouldn't know about. Use the Strategy pattern to avoid exposing complex, algorithm-specific data structures -* a class defines many behaviors, and these appear as multiple conditional statements in its operations. Instead of many conditionals, move related conditional branches into their own Strategy class \ No newline at end of file +* a class defines many behaviors, and these appear as multiple conditional statements in its operations. Instead of many conditionals, move related conditional branches into their own Strategy class diff --git a/template-method/index.md b/template-method/index.md index 42f22f46f..ff4c14332 100644 --- a/template-method/index.md +++ b/template-method/index.md @@ -2,6 +2,7 @@ layout: pattern title: Template method folder: template-method +permalink: /patterns/template-method/ categories: pattern_cat tags: pattern_tag --- @@ -16,4 +17,4 @@ an algorithm without changing the algorithm's structure. * to implement the invariant parts of an algorithm once and leave it up to subclasses to implement the behavior that can vary * when common behavior among subclasses should be factored and localized in a common class to avoid code duplication. This is good example of "refactoring to generalize" as described by Opdyke and Johnson. You first identify the differences in the existing code and then separate the differences into new operations. Finally, you replace the differing code with a template method that calls one of these new operations -* to control subclasses extensions. You can define a template method that calls "hook" operations at specific points, thereby permitting extensions only at those points \ No newline at end of file +* to control subclasses extensions. You can define a template method that calls "hook" operations at specific points, thereby permitting extensions only at those points diff --git a/thread-pool/index.md b/thread-pool/index.md index 70ccd2231..107d07850 100644 --- a/thread-pool/index.md +++ b/thread-pool/index.md @@ -2,6 +2,7 @@ layout: pattern title: Thread Pool folder: thread-pool +permalink: /patterns/thread-pool/ categories: pattern_cat tags: pattern_tag --- @@ -16,4 +17,4 @@ and eliminating the latency of creating new threads. **Applicability:** Use the Thread Pool pattern when -* you have a large number of short-lived tasks to be executed in parallel \ No newline at end of file +* you have a large number of short-lived tasks to be executed in parallel diff --git a/tolerant-reader/index.md b/tolerant-reader/index.md index 3c04840b2..f8d4d77df 100644 --- a/tolerant-reader/index.md +++ b/tolerant-reader/index.md @@ -2,6 +2,7 @@ layout: pattern title: Tolerant Reader folder: tolerant-reader +permalink: /patterns/tolerant-reader/ categories: pattern_cat tags: pattern_tag --- @@ -15,4 +16,4 @@ changes, the readers must not break. **Applicability:** Use the Tolerant Reader pattern when -* the communication schema can evolve and change and yet the receiving side should not break \ No newline at end of file +* the communication schema can evolve and change and yet the receiving side should not break diff --git a/visitor/index.md b/visitor/index.md index d263fb80c..6b1516135 100644 --- a/visitor/index.md +++ b/visitor/index.md @@ -2,6 +2,7 @@ layout: pattern title: Visitor folder: visitor +permalink: /patterns/visitor/ categories: pattern_cat tags: pattern_tag --- @@ -20,4 +21,4 @@ of the elements on which it operates. **Real world examples:** -* [Apache Wicket](https://github.com/apache/wicket) component tree, see [MarkupContainer](https://github.com/apache/wicket/blob/b60ec64d0b50a611a9549809c9ab216f0ffa3ae3/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java) \ No newline at end of file +* [Apache Wicket](https://github.com/apache/wicket) component tree, see [MarkupContainer](https://github.com/apache/wicket/blob/b60ec64d0b50a611a9549809c9ab216f0ffa3ae3/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java)