Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Removed observer pattern, in favour of mediator #9344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

liuggio
Copy link
Contributor

@liuggio liuggio commented Oct 19, 2013

Q A
Doc fix? yes
New docs? no
Applies to *
Fixed tickets

I don't think this is the best tool to implement the observer pattern.

I just have copied the sentence from:
https://github.com/symfony/symfony-docs/edit/2.3/components/event_dispatcher/introduction.rst

but maybe could be improved with something like:

"Symfony Event Dispatcher is a tool that allows to make your projects truly extensible, facilitating the implementation of Mediator pattern and Publish subscribe pattern"

[edit-1]
I think this could be modified also here:
https://github.com/symfony/symfony-marketing/edit/master/views/en/get_started/components.html.twig

EventDispatcher implements a lightweight version of the Observer design
pattern.
The Symfony2 Event Dispatcher component implements the Mediator pattern
in a simple and effective way to make all these things possible and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part of the sentence looks weird to me: 'to make all these things possible '-> these refers to what?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is taken from the docs, where it probably makes more sense since there are two paragraphs before this sentence.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just leave out "to make all these things possible":

The Symfony2 EventDispatcher component implements the Mediator pattern in a simple and effective way to make your projects truly extensible.

@cordoval
Copy link
Contributor

@liuggio please better to PR the docs or the marketing repos first.

I think this is clear as it is formerly stated, notice the word lightweight.

@stof
Copy link
Member

stof commented Nov 29, 2013

@cordoval qualifying it as lightweight does not make it implement the Observer pattern.

the doc has already been updated months ago. As said in the PR description, the new sentence is the one used in the doc currently

@fabpot
Copy link
Member

fabpot commented Nov 30, 2013

I've made the changes in #9661 and rebased it on 2.2

@fabpot fabpot closed this Nov 30, 2013
fabpot added a commit that referenced this pull request Nov 30, 2013
This PR was merged into the 2.2 branch.

Discussion
----------

Removed observer pattern, in favour of mediator

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | *
| Fixed tickets | #9344

I don't think this is the best tool to implement the observer pattern.

I just have copied the sentence from:
https://github.com/symfony/symfony-docs/edit/2.3/components/event_dispatcher/introduction.rst

but maybe could be improved with something like:

"Symfony Event Dispatcher is a tool that allows to make your projects truly extensible, facilitating the implementation of Mediator pattern and Publish subscribe pattern"

[edit-1]
I think this could be modified also here:
https://github.com/symfony/symfony-marketing/edit/master/views/en/get_started/components.html.twig

Commits
-------

ab3e231 [EventDispatcher] tweaked README
b9ad62e removed observer pattern, in favour of mediator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants