[erlang-questions] wx_object and OTP design pattern
Wed Sep 10 13:12:16 CEST 2014
What I have done so far is this:
I have an OTP application xxx with the xxx application behaviour, a
supervisor and some gen_servers.
Based on the code from observer, I created a wx application with a
hierarchy of wx_objects in line with functional parts of the 'view' I
want to create. @Craig, I fully agree with you that the whole wx_object
concept is indeed very nice, a specially since I would like to follow
with the MVC design pattern.
From xxx_app.erl, I start the wx application before starting xxx's
The wx application has a application:stop(xxx) in it's terminate
callback to stop xxx when the top frame window is closed.
To communicate with the 'view' from the rest of the xxx application
(model and controller), I guess I should use some kind of pubsub
protocol with named processes. Something in line with pureMVC
(http://puremvc.org/) without the OOP stuff of course..
Any suggestions or comments are highly appreciated.
On 09/09/2014 07:28 PM, Frans Schneider wrote:
> Hi list,
> I want to incorporate wx in my application and was wondering how the
> wx_object behaviour fits into the OTP application structure. Any
> design patterns for this? All examples or applications using wxErlang
> I found do not follow the OTP prinicples.
More information about the erlang-questions