Questions tagged as 'observer-pattern'

1
answer

Listeners are an Observer implementation?

I'm trying to understand the Observer concept and its implementation, and I ended up finding this example where listeners is used instead of the observable and observer classes: Thisgraphichasbeenremovedfrom , where an altern...
asked by 27.04.2016 / 19:31
1
answer

Is there any technical reason for the Observer pattern or the like not being used independently of the observed object?

We often use things we do not even think about because it's like this. I do not like to place mechanism pendants on an object that is domain specific. If I have a screen control or a client that has some action that triggers an event my no...
asked by 30.07.2018 / 15:16
1
answer

Alternative to Observable and Observer in Java 9

For testing purposes, I'm porting an application from version 7 to version 9 of Java. This application has some features that use Observer and Observable . I noticed that both have become obsolete: @Deprecated(since="9") pub...
asked by 06.10.2017 / 16:04
1
answer

Observer can be considered a break in encapsulation?

Observer uses abstraction and interfaces . Let's suppose that a Observer "watches" the changes of state of certain classe and informs them to another external agent, we can consider this a break of encapsulation, since...
asked by 15.09.2016 / 16:25
1
answer

What are the correct practices for manipulating events in PHP?

I've created some classes and an interface to handle events for a small MVC application. My intention is to implement the Observer pattern, but I do not know if you agree, since I still confuse it with PHP. In the following code, did I do it the...
asked by 30.12.2013 / 01:38
1
answer

Design pattern Observer applied to events

I'm studying the design patterns and I'm trying to apply a real situation to them. And an example I made was in the event scenario: In this scenario every event has participants to register. So, I have implemented the Observer standar...
asked by 24.12.2014 / 11:07
1
answer

How to implement the Observer pattern in practice with database?

I'm studying some design patterns, and right now I'm learning about the observer pattern . I've read books, I've seen some lessons on Youtube, I've done the examples and everything. But now I'd like to implement in practice inserting data in...
asked by 10.03.2016 / 21:26
0
answers

Error starting Vraptor 4

Uploading the application by Tomcat 7 triggers the following stacktrace : mai 25, 2018 3:42:43 PM org.apache.catalina.core.StandardContext filterStart GRAVE: Exception starting filter vraptor javax.enterprise.event.ObserverExcepti...
asked by 25.05.2018 / 21:21