You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Intent:** An extension of the Builder pattern that fully guides the user through the creation of the object with no chances of confusion.
212
+
The user experience will be much more improved by the fact that he will only see the next step methods available, NO build method until is the right time to build the object.
**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.
**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.
581
+
* Event Aggregator is a good choice when you have lots of objects that are
582
+
potential event sources. Rather than have the observer deal with registering
583
+
with them all, you can centralize the registration logic to the Event
584
+
Aggregator. As well as simplifying registration, a Event Aggregator also
585
+
simplifies the memory management issues in using observers.
*When some arbitrary synchronous or asynchronous action must be performed after execution of some defined activity.
595
+
*when some arbitrary synchronous or asynchronous action must be performed after execution of some defined activity.
583
596
584
597
**Real world examples:**
585
598
*[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 +617,7 @@ only what to do with the resource.
**Intent:** Separate the user interface into three interconnected components:
@@ -701,7 +714,7 @@ logic, which updates all of the views that are affected.
701
714

702
715
703
716
**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.
717
+
*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.
**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
769
+
* you have multiple independent tasks that can run in parallel
770
+
* you need to improve the performance of a group of sequential tasks
771
+
* you have limited amount of processing capacity or long running tasks and the
772
+
caller should not wait the tasks to be ready
759
773
760
774
**Real world examples:**
761
775
*[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 +783,7 @@ attributes by encapsulating them in single Data object.
769
783

770
784
771
785
**Applicability:** Use the Private Class Data pattern when
772
-
*You want to prevent write access to class data members
786
+
*you want to prevent write access to class data members
**To work on a new pattern** you need to do the following steps:
943
957
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.
958
+
1. If there is no issue for the new pattern yet, raise new issue. Comment on
959
+
the issue that you are working on it so that others don't start work on the
960
+
same thing.
945
961
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.
962
+
3. Implement the code changes in your fork. Remember to add sufficient comments
963
+
documenting the implementation. Reference the issue id e.g. #52 in your
964
+
commit messages.
947
965
4. Create a simple class diagram from your example code.
948
966
5. Add description of the pattern in README.md and link to the class diagram.
949
967
6. Create a pull request.
@@ -953,7 +971,9 @@ Flyweight.
953
971
1. Check that the issue has "help wanted" badge
954
972
2. Comment on the issue that you are working on it
955
973
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.
974
+
4. Implement the code changes in your fork. Remember to add sufficient comments
975
+
documenting the implementation. Reference the issue id e.g. #52 in your
976
+
commit messages.
957
977
5. Create a pull request.
958
978
959
979
**For creating/editing UML diagrams** you need [ObjectAid UML Explorer for Eclipse](http://www.objectaid.com/home).
@@ -997,6 +1017,7 @@ other words, version numbers are used only for project planning sake.
997
1017
*[Patterns of Enterprise Application Architecture](http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420)
0 commit comments