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
**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.
*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.
583
587
584
588
**Real world examples:**
585
589
*[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.
**Intent:** Separate the user interface into three interconnected components:
@@ -701,7 +705,7 @@ logic, which updates all of the views that are affected.
701
705

702
706
703
707
**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.
**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
759
764
760
765
**Real world examples:**
761
766
*[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.
769
774

770
775
771
776
**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
**To work on a new pattern** you need to do the following steps:
943
948
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.
945
952
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.
947
956
4. Create a simple class diagram from your example code.
948
957
5. Add description of the pattern in README.md and link to the class diagram.
949
958
6. Create a pull request.
@@ -953,7 +962,9 @@ Flyweight.
953
962
1. Check that the issue has "help wanted" badge
954
963
2. Comment on the issue that you are working on it
955
964
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.
957
968
5. Create a pull request.
958
969
959
970
**For creating/editing UML diagrams** you need [ObjectAid UML Explorer for Eclipse](http://www.objectaid.com/home).
0 commit comments