adding generic functionality

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Thu Apr 3 08:45:16 CEST 2003

Hi everyone,

I have been trying to implement a model-view pattern, using a process group
to hold together the views and have some thoughts about some issues.

- the model sends a change notification before returning from handle_xxx or
from the state function (if a gen_fsm). Since this is generic functionality,
I started thinking if it could be abstracted as such and reused. The
simplest way is to modify gen_server/gen_fsm, but it seems awkward: we might
end with an endless flora of behaviours, handling every combination of
features. It would be nice if it were possible to plug in such "mix-in"
functionality, but I couldn't find a nice way.

- using process groups is cool, but I started thinking about them as
"channels of communicatio": a bus where processes can connect and
send/receive notifications. It would be nice, I thought, if Joe's idea from
UBF, of using a middle-man to type-check the communication protocols. The
channel is such a middle-man and could be extended to allow this (and maybe
other) addition. Would it be useful?

Any feedback will be very appreciated. Thanks in advance.

More information about the erlang-questions mailing list