On Mon, May 11, 2009 at 10:12 PM, Staz . <[email protected]> wrote: > Ahh, okay. I think I thought "QueryControllers" meaning same as > "ImmutableControllers". But seems you allow to change parameters of > Controllers even through QueryableControllers. Or are those Parameters even > Controller-specific?
Well, they are algorithm-specific. With Qi4j the algorithm becomes a Mixin with a bunch of Properties as Parameters. But the algorithm isn't exposed to the execution context per se, as it is of relevance. > Maybe more generally, I think I might be looking for something like "const" > keyword in C++. Ie, create two roles, which shouldn't be castable from one > to another, "MutableRole" and "ImmutableRole". ImmutableRole should have > same state as MutableRole, and if MutableRole's state is changed, it should > reflect to ImmutableRole's state. So then I just pass ImmutableRole around > to places, where I want to be certain that the code of the users of the > framework can't change the state of some role. Am I stepping into a way too > deep swamp, sort to speak? :) IIRC, what you ask for already exist in several forms in Qi4j. On one hand you can place the mutable and immutable methods in separate interfaces and pass one or the other (or "both") around. The other way is the brand new feature of 'multiple types for entities', which allows more than one interface per Entity instance. > I hope I am not asking for too much. Of course if your project is not > open-source or you can't or don't want to give it out, it's no problem. Yes it is not open-source, but that is not the main reason, since sharing some snippets isn't a big deal. But I have not done enough 'coding' on it yet, mostly just drawings on paper and whiteboard. And I am also on the road (currently in Berlin, soon to Prague) and don't have enough time on these things right now. Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

