Hey, > Let's take the specific case of Qooxdoo. Now I'm interrogating myself about > the fact of if is better or not to use inheritance from the Window class for > every window of my application, or use Mixins with specific functions that > create every window without inheritance. I wonder if there is a performance > gain avoiding inheritance or not. Well, its hard to tell whats better to use. I guess that something which has to suit the exact needs. In general, I would not base my class design decisions on performance thoughts. Anyway, there is no known performance difference between using inheritance or not. So you can go the way you want.
> For smaller simple windows it's kind of a better way to keep all the window > implementations on a single file, but for windows with more complex forms > it's not so good for managing the code. Agree. If you have complex forms, you can always move that form into a separate class and use that class within your window e.g. > When I implement a class i need to think that the class is reused multiple > times, if not i feel like it's a waste to instantiate a class that inherits > from another just once (like a Window class). Think of code management and not of pure coding. Maybe its just more maintainable to have everything in its own little world. > So i've become a kind of addicted to Mixins that implements specific widgets > without using inheritance. In general, I would only use mixins if the code is used in more than one place. If not, thats somehow a split of responsibility which makes it hard to maintain in my opinion. > Just tell me if you think this is a bad habit or not, or if i'm completely > crazy... meh :-P I think thats more a thing of taste than of "right" or "wrong". ;) Regards, Martin ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
