Hugh Gibson schrieb:
> Our main frame class is used as a common point for implementation of
> singleton functionality, e.g. managing context menus. Typically there are
> some members and a few functions for each case.
>
> I don't want to define singletons classes for each block of functionality.
> One reason for that is that other frames may be defined so a true
> singleton would be no use.
>
> I wondered if using mixins would be a good idea. 
>
> Basically I would strip out the functionality and members associated with
> something like server access and put it in a subsidiary mixin class. It
> would only be used in once place, in the frame, but would simplify the
> frame code immensely (already at 2500 lines). It would also mean that the
> definition of members including construction, destruction and function
> implementation could all be closely related rather than spread throughout
> the file.
>
> The only downside that I can see is the expectation for maintenance
> programmers that functions that are called on the frame from elsewhere
> are defined there. A little grepping will soon sort that out.
>
> Does this seem like a reasonable programming model for use of the mixins?
> Any gotchas or performance issues? 
>
> Hugh
Hi Hugh,

this is totally reasonable. We have already extracted the logging code 
from qx.core.Object into a mixin. This will not impact the performance 
of your class except a few cycles at class definition time. Since all 
mixin methods are shown in the API viewer and marked from which mixin 
they originate, other developers should have no problems to find those 
methods.

Best Fabian

-- 
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger, 
Matthias Greve, Robert Hoffmann, Norbert Lang, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to