I'm working on a project to allow remote updates of the Ext.data.Model class based from a node.js server running Ext. I've extended the Ext.util.Observable mixin into two classes: Subscriber and Publisher.
I've defined a separate model class that would mixin the Publisher or Subscriber class based on where it's running (e.g. Publisher on the server, Subscriber on the client).
The goal is to have the Model class not really care or be aware about which mixin it's using. This way I can swap in the behavior I need based on whether we're on the server or client, and use the same Model class for both.
So, I'm trying to alias the mixin, e.g.
And swap in the behavior based on whether I'm running on the server or the client, e.g.:
But alias doesn't seem to work for mixins. Ideally I'd like the models to be (somewhat) independent of their publisher or subscriber behaviors. Any thoughts or recommendations?
if (inServerEnv === true)