You lost me at hello! "It's a lot easier if your class just implements what it needs and leave the inheritance to the class framework that is implementing the interfaces."
Can you break this down a little? TIA --- In [email protected], "Michael Schmalle" <[EMAIL PROTECTED]> wrote: > > > But in general I think implementation inheritance is over-used and > multiple inheritance can get you into trouble. > WORD! > > Especially in UIComponent designs, I would discourage the use of extends > with interfaces. > > It's a lot easier if your class just implements what it needs and leave > the inheritance to the class framework that is implementing the interfaces. > > This is not to say don't, but careful design of User Interface interface > frameworks is needed. Adobe did a pretty good job at this. > > If you were around in the Flex 2 betas especially the alpha you saw how > the scrubbed the interfaces and completely refactored out > some inheritance they used in the interface framework. > > Mike > > On Fri, Oct 10, 2008 at 11:14 AM, Richard Rodseth <[EMAIL PROTECTED]>wrote: > > > Except that "pseudo" sounds disparaging, and I actually like an object > > model which has multiple inheritance of interfaces and single inheritance of > > implementations (same as Java, and maybe C# too?). Multiple inheritance of > > implementation results in ambiguity. Composition/delegation is a better > > approach in my view. Lots of literature about this that the original poster > > can read. > > > > Having said that, I did have one occasion in my career when I followed an > > example from Bertrand Meyer's book and implemented a tree node in C++ as a > > link and a list. But in general I think implementation inheritance is > > over-used and multiple inheritance can get you into trouble. > > > > > > On Fri, Oct 10, 2008 at 7:57 AM, Ryan Gravener <[EMAIL PROTECTED]>wrote: > > > >> Pseudo multiple inheritance. > >> > >> Ryan Gravener > >> http://twitter.com/ryangravener > >> > >> > >> > >> On Fri, Oct 10, 2008 at 10:23 AM, Richard Rodseth <[EMAIL PROTECTED]>wrote: > >> > >>> And sometimes you even have interfaces with no methods. In this case > >>> it's a "marker" (often a parent of other interfaces) and when used in method > >>> signatures you get type checking. > >>> > >>> > >>> On Fri, Oct 10, 2008 at 6:26 AM, Michael Schmalle < > >>> [EMAIL PROTECTED]> wrote: > >>> > >>>> Hi, > >>>> It's ICommand. > >>>> > >>>> The reason is you can stack interfaces on top of each other allowing > >>>> more decoupling to the implementing concrete classes. > >>>> > >>>> This interface is obvious. Any class that implements it needs eval() and > >>>> only eval. It's like a singleton declaration of implementation. > >>>> > >>>> If you jammed this evel() method into IUIComponent, maybe all components > >>>> don't need eval. Make sense? > >>>> > >>>> Also another good example of this type of interface in the flex > >>>> framework is IDataRenderer, it's only declared property is 'data'. > >>>> > >>>> Mike > >>>> > >>>> On Fri, Oct 10, 2008 at 9:19 AM, flexaustin <[EMAIL PROTECTED]>wrote: > >>>> > >>>>> I was wondering if someone can explain why you would need an > >>>>> interface > >>>>> so short? > >>>>> > >>>>> INTERFACE: > >>>>> > >>>>> package my.package.area > >>>>> { > >>>>> /** > >>>>> * Interface for methods that evaluate an object and return a result. > >>>>> */ > >>>>> public interface IEval > >>>>> { > >>>>> /** > >>>>> * Evaluates the input object > >>>>> * @o the object to evaluate > >>>>> * @return the computed result value > >>>>> */ > >>>>> function eval(o:Object=null):*; > >>>>> > >>>>> } // end of interface IEval > >>>>> } > >>>>> > >>>>> USAGE OF INTERFACE: > >>>>> > >>>>> if (value is IEval) { value = IEval(value).eval(o) }; > >>>>> > >>>>> Cairngorm has a short interface like this as well, though I cannot > >>>>> remember what it is. In Cairngorm they say its for naming or to make > >>>>> the code easier to understand? I am just not sure why you would do > >>>>> this? Help me see the light! > >>>>> > >>>>> TIA > >>>>> > >>>>> > >>>> > >>>> > >>>> -- > >>>> Teoti Graphix, LLC > >>>> http://www.teotigraphix.com > >>>> > >>>> Teoti Graphix Blog > >>>> http://www.blog.teotigraphix.com > >>>> > >>>> You can find more by solving the problem then by 'asking the question'. > >>>> > >>> > >>> > >> > > > > > > > > -- > Teoti Graphix, LLC > http://www.teotigraphix.com > > Teoti Graphix Blog > http://www.blog.teotigraphix.com > > You can find more by solving the problem then by 'asking the question'. >

