Skip to content

Commit c18f720

Browse files
committed
Merge pull request iluwatar#196 from mafagafogigante/mafagafogigante
Better capitalization in the readme.
2 parents 3a0ee1f + 2238369 commit c18f720

File tree

1 file changed

+44
-33
lines changed

1 file changed

+44
-33
lines changed

README.md

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ are several common situations in which the Proxy pattern is applicable
307307

308308
**Typical Use Case:**
309309

310-
* Control access to another object
311-
* Lazy initialization
310+
* control access to another object
311+
* lazy initialization
312312
* implement logging
313313
* facilitate network connection
314314
* to count references to an object
@@ -334,7 +334,7 @@ improves the performance of application to great extent.
334334

335335
**Typical Use Case:**
336336

337-
* When network hits are expensive and time consuming
337+
* when network hits are expensive and time consuming
338338
* lookups of services are done quite frequently
339339
* large number of services are being used
340340

@@ -541,7 +541,7 @@ this behavior in the common parent class - it is defined once in the Servant.
541541
![alt text](./servant/etc/servant-pattern.png "Servant")
542542

543543
**Applicability:** Use the Servant pattern when
544-
* When we want some objects to perform a common action and don't want to define this action as a method in every class.
544+
* when we want some objects to perform a common action and don't want to define this action as a method in every class.
545545

546546
## <a name="null-object">Null Object</a> [&#8593;](#list-of-design-patterns)
547547
**Intent:** In most object-oriented languages, such as Java or C#, references
@@ -556,7 +556,7 @@ Object is very predictable and has no side effects: it does nothing.
556556
![alt text](./null-object/etc/null-object.png "Null Object")
557557

558558
**Applicability:** Use the Null Object pattern when
559-
* You want to avoid explicit null checks and keep the algorithm elegant and easy to read.
559+
* you want to avoid explicit null checks and keep the algorithm elegant and easy to read.
560560

561561
## <a name="event-aggregator">Event Aggregator</a> [&#8593;](#list-of-design-patterns)
562562
**Intent:** A system with lots of objects can lead to complexities when a
@@ -569,7 +569,11 @@ allowing clients to register with just the aggregator.
569569
![alt text](./event-aggregator/etc/classes.png "Event Aggregator")
570570

571571
**Applicability:** Use the Event Aggregator pattern when
572-
* Event Aggregator is a good choice when you have lots of objects that are 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.
572+
* Event Aggregator is a good choice when you have lots of objects that are
573+
potential event sources. Rather than have the observer deal with registering
574+
with them all, you can centralize the registration logic to the Event
575+
Aggregator. As well as simplifying registration, a Event Aggregator also
576+
simplifies the memory management issues in using observers.
573577

574578
## <a name="callback">Callback</a> [&#8593;](#list-of-design-patterns)
575579
**Intent:** Callback is a piece of executable code that is passed as an
@@ -579,7 +583,7 @@ at some convenient time.
579583
![alt text](./callback/etc/callback.png "Callback")
580584

581585
**Applicability:** Use the Callback pattern when
582-
* When some arbitrary synchronous or asynchronous action must be performed after execution of some defined activity.
586+
* when some arbitrary synchronous or asynchronous action must be performed after execution of some defined activity.
583587

584588
**Real world examples:**
585589
* [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.
@@ -604,7 +608,7 @@ only what to do with the resource.
604608
![alt text](./execute-around/etc/execute-around.png "Execute Around")
605609

606610
**Applicability:** Use the Execute Around idiom when
607-
* You use an API that requires methods to be called in pairs such as open/close or allocate/deallocate.
611+
* you use an API that requires methods to be called in pairs such as open/close or allocate/deallocate.
608612

609613
## <a name="property">Property</a> [&#8593;](#list-of-design-patterns)
610614
**Intent:** Create hierarchy of objects and new objects using already existing
@@ -667,8 +671,8 @@ order
667671
![alt text](./specification/etc/specification.png "Specification")
668672

669673
**Applicability:** Use the Specification pattern when
670-
* You need to select a subset of objects based on some criteria, and to refresh the selection at various times
671-
* You need to check that only suitable objects are used for a certain role (validation)
674+
* you need to select a subset of objects based on some criteria, and to refresh the selection at various times
675+
* you need to check that only suitable objects are used for a certain role (validation)
672676

673677
## <a name="tolerant-reader">Tolerant Reader</a> [&#8593;](#list-of-design-patterns)
674678
**Intent:** Tolerant Reader is an integration pattern that helps creating
@@ -679,7 +683,7 @@ changes, the readers must not break.
679683
![alt text](./tolerant-reader/etc/tolerant-reader.png "Tolerant Reader")
680684

681685
**Applicability:** Use the Tolerant Reader pattern when
682-
* The communication schema can evolve and change and yet the receiving side should not break
686+
* the communication schema can evolve and change and yet the receiving side should not break
683687

684688
## <a name="model-view-controller">Model-View-Controller</a> [&#8593;](#list-of-design-patterns)
685689
**Intent:** Separate the user interface into three interconnected components:
@@ -701,7 +705,7 @@ logic, which updates all of the views that are affected.
701705
![alt text](./flux/etc/flux.png "Flux")
702706

703707
**Applicability:** Use the Flux pattern when
704-
* 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.
708+
* 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.
705709

706710
## <a name="double-dispatch">Double Dispatch</a> [&#8593;](#list-of-design-patterns)
707711
**Intent:** Double Dispatch pattern is a way to create maintainable dynamic
@@ -710,7 +714,7 @@ behavior based on receiver and parameter types.
710714
![alt text](./double-dispatch/etc/double-dispatch.png "Double Dispatch")
711715

712716
**Applicability:** Use the Double Dispatch pattern when
713-
* The dynamic behavior is not defined only based on receiving object's type but also on the receiving method's parameter type.
717+
* the dynamic behavior is not defined only based on receiving object's type but also on the receiving method's parameter type.
714718

715719
**Real world examples:**
716720
* [ObjectOutputStream](https://docs.oracle.com/javase/8/docs/api/java/io/ObjectOutputStream.html)
@@ -742,7 +746,7 @@ and eliminating the latency of creating new threads.
742746
![alt text](./thread-pool/etc/thread-pool.png "Thread Pool")
743747

744748
**Applicability:** Use the Thread Pool pattern when
745-
* You have a large number of short-lived tasks to be executed in parallel
749+
* you have a large number of short-lived tasks to be executed in parallel
746750

747751
## <a name="async-method-invocation">Async Method Invocation</a> [&#8593;](#list-of-design-patterns)
748752
**Intent:** Asynchronous method invocation is pattern where the calling thread
@@ -753,9 +757,10 @@ callbacks or waiting until everything is done.
753757
![alt text](./async-method-invocation/etc/async-method-invocation.png "Async Method Invocation")
754758

755759
**Applicability:** Use async method invocation pattern when
756-
* You have multiple independent tasks that can run in parallel
757-
* You need to improve performance of running a group of sequential tasks
758-
* You have limited number of processing capacity or long running tasks and the caller cannot wait the tasks to be ready
760+
* you have multiple independent tasks that can run in parallel
761+
* you need to improve the performance of a group of sequential tasks
762+
* you have limited amount of processing capacity or long running tasks and the
763+
caller should not wait the tasks to be ready
759764

760765
**Real world examples:**
761766
* [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)
@@ -769,7 +774,7 @@ attributes by encapsulating them in single Data object.
769774
![alt text](./private-class-data/etc/private-class-data.png "Private Class Data")
770775

771776
**Applicability:** Use the Private Class Data pattern when
772-
* You want to prevent write access to class data members
777+
* you want to prevent write access to class data members
773778

774779
## <a name="object-pool">Object Pool</a> [&#8593;](#list-of-design-patterns)
775780
**Intent:** When objects are expensive to create and they are needed only for
@@ -780,8 +785,8 @@ are in use and which are available.
780785
![alt text](./object-pool/etc/object-pool.png "Object Pool")
781786

782787
**Applicability:** Use the Object Pool pattern when
783-
* The objects are expensive to create (allocation cost)
784-
* You need a large number of short-lived objects (memory fragmentation)
788+
* the objects are expensive to create (allocation cost)
789+
* you need a large number of short-lived objects (memory fragmentation)
785790

786791
## <a name="dependency-injection">Dependency Injection</a> [&#8593;](#list-of-design-patterns)
787792
**Intent:** Dependency Injection is a software design pattern in which one or
@@ -794,8 +799,8 @@ inversion of control and single responsibility principles.
794799
![alt text](./dependency-injection/etc/dependency-injection.png "Dependency Injection")
795800

796801
**Applicability:** Use the Dependency Injection pattern when
797-
* When you need to remove knowledge of concrete implementation from object
798-
* To enable unit testing of classes in isolation using mock objects or stubs
802+
* when you need to remove knowledge of concrete implementation from object
803+
* to enable unit testing of classes in isolation using mock objects or stubs
799804

800805
## <a name="naked-objects">Naked Objects</a> [&#8593;](#list-of-design-patterns)
801806
**Intent:** The Naked Objects architectural pattern is well suited for rapid
@@ -805,9 +810,9 @@ everything else is autogenerated by the framework.
805810
![alt text](./naked-objects/etc/naked-objects.png "Naked Objects")
806811

807812
**Applicability:** Use the Naked Objects pattern when
808-
* You are prototyping and need fast development cycle
809-
* An autogenerated user interface is good enough
810-
* You want to automatically publish the domain as REST services
813+
* you are prototyping and need fast development cycle
814+
* an autogenerated user interface is good enough
815+
* you want to automatically publish the domain as REST services
811816

812817
**Real world examples:**
813818
* [Apache Isis](https://isis.apache.org/)
@@ -866,11 +871,11 @@ degrading execution efficiency.
866871
![Half-Sync/Half-Async class diagram](./half-sync-half-async/etc/half-sync-half-async.png)
867872

868873
**Applicability:** Use Half-Sync/Half-Async pattern when
869-
* A system possesses following characteristics:
870-
* System must perform tasks in response to external events that occur asynchronously, like hardware interrupts in OS
871-
* It is inefficient to dedicate separate thread of control to perform synchronous I/O for each external source of event
872-
* The higher level tasks in the system can be simplified significantly if I/O is performed synchronously.
873-
* One or more tasks in a system must run in a single thread of control, while other tasks may benefit from multi-threading.
874+
* a system possesses following characteristics:
875+
* the system must perform tasks in response to external events that occur asynchronously, like hardware interrupts in OS
876+
* it is inefficient to dedicate separate thread of control to perform synchronous I/O for each external source of event
877+
* the higher level tasks in the system can be simplified significantly if I/O is performed synchronously.
878+
* one or more tasks in a system must run in a single thread of control, while other tasks may benefit from multi-threading.
874879

875880
**Real world examples:**
876881
* [BSD Unix networking subsystem](http://www.cs.wustl.edu/~schmidt/PDF/PLoP-95.pdf)
@@ -941,9 +946,13 @@ Flyweight.
941946

942947
**To work on a new pattern** you need to do the following steps:
943948

944-
1. If there is no issue for the new pattern yet, raise new issue. Comment on the issue that you are working on it so that others don't start work on the same thing.
949+
1. If there is no issue for the new pattern yet, raise new issue. Comment on
950+
the issue that you are working on it so that others don't start work on the
951+
same thing.
945952
2. Fork the repository.
946-
3. Implement the code changes in your fork. Remember to add sufficient comments documenting the implementation. Reference the issue id e.g. #52 in your commit messages.
953+
3. Implement the code changes in your fork. Remember to add sufficient comments
954+
documenting the implementation. Reference the issue id e.g. #52 in your
955+
commit messages.
947956
4. Create a simple class diagram from your example code.
948957
5. Add description of the pattern in README.md and link to the class diagram.
949958
6. Create a pull request.
@@ -953,7 +962,9 @@ Flyweight.
953962
1. Check that the issue has "help wanted" badge
954963
2. Comment on the issue that you are working on it
955964
3. Fork the repository.
956-
4. Implement the code changes in your fork. Remember to add sufficient comments documenting the implementation. Reference the issue id e.g. #52 in your commit messages.
965+
4. Implement the code changes in your fork. Remember to add sufficient comments
966+
documenting the implementation. Reference the issue id e.g. #52 in your
967+
commit messages.
957968
5. Create a pull request.
958969

959970
**For creating/editing UML diagrams** you need [ObjectAid UML Explorer for Eclipse](http://www.objectaid.com/home).

0 commit comments

Comments
 (0)