@@ -7,24 +7,30 @@ permalink: /patterns/data-bus/ # the permalink to the pattern, to keep this unif
7
7
# both categories and tags are Yaml Lists
8
8
# you can either just pick one or write a list with '-'s
9
9
# usable categories and tags are listed here: https://github.com/iluwatar/java-design-patterns/blob/gh-pages/_config.yml
10
- categories: creational # categories of the pattern
10
+ categories: Architectural # categories of the pattern
11
11
tags: # tags of the pattern
12
- - best
13
- - ever
14
- - awesome
12
+ - Java
13
+ - Difficulty-Intermediate
15
14
---
16
15
17
16
## Intent
18
- Makes your code awesome
19
17
20
- ![ alt text] ( ./etc/best_pattern.png " Best Pattern Ever ")
18
+ Allows send of messages/events between components of an application
19
+ without them needing to know about each other. They only need to know
20
+ about the type of the message/event being sent.
21
+
22
+ ![ data bus pattern uml diagram] ( ./etc/data-bus.urm.png " Data Bus pattern ")
21
23
22
24
## Applicability
23
- Use the Best Pattern Ever pattern when
25
+ Use Data Bus pattern when
24
26
25
- * you want to be the best
26
- * you need to ...
27
+ * you want your components to decide themselves which messages/events they want to receive
28
+ * you want to have many-to-many communication
29
+ * you want your components to know nothing about each other
27
30
28
- ## Real world examples
31
+ ## Related Patterns
32
+ Data Bus is similar to
29
33
30
- * [ Nowhere] ( http://no.where.com )
34
+ * Mediator pattern with Data Bus Members deciding for themselves if they want to accept any given message
35
+ * Observer pattern but supporting many-to-many communication
36
+ * Publish/Subscribe pattern with the Data Bus decoupling the publisher and the subscriber
0 commit comments