[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [e4-dev] A missing framework piece: contexts?
|
John Arthorne schrieb:
"Bag" is just a Smalltalk term for an unordered collection.
Essentially a context is just a map, with extra logic for tracking
dynamic changes, injection, and a notion of a parent context. If the
most local context can't supply a value, it delegates to the parent.
As Kevin suggested this allows modeling of things like the widget
hierarchy where a tab in a view might be one context, the view itself
another context, another context for the window, etc, up to a global
application context. You're right that the injection logic can (and
probably should) be separated from the context logic since it's
unlikely to change.
Hey this sounds like JavaScript's prototype based inheritance :-) Steve
Yegge has a great blog post about this pattern
<http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html>.
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, Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Oliver Mauss, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren