The best way is to learn design patterns. It's time consuming and sometimes painful. :)
Good starting point is wikipedia http://en.wikipedia.org/wiki/Design_pattern_(computer_science) or buy books. I use factory method for GUI to return menus, toolbars or whatever and add it to my composite object. I tend to write most of methods that fits in single screen view. That way I can improve readability and speed of development. ---------------------- extend: qx.ui.container.Composite members: { __createToolbar() { var toolbar = new qx.ui.toolbar.ToolBar; return toolbar; } }, construct: function() { this.add(this.__createToolbar()); } -------------------- Ian Horst Jean-Baptiste BRIAUD - Novlog wrote: > OK, but how do you do that ? > That was my question :-) > > Is there an include concept in qooXdoo or js ? > > Is creating classes the only way to break element into files ? > > On 11 Sep 2008, at 20:36, Jim Hunter wrote: > >> Breaking up a large file or a large method up into smaller ones is >> rarely a bad idea. It will make editing easier and provide more >> clarity in your code. My application resides in about 35 of my own >> classes, each one with their own file. >> >> Jim >> >> >> On Thu, Sep 11, 2008 at 11:32 AM, Jean-Baptiste BRIAUD - Novlog >> <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: >> >> Hi, >> >> I'm now having a big (I feel too big) javascript file. >> I'm wondering how to improve the structuration and modularity. >> >> For example, just the menu there is a fair amount of line. >> SHould I do a class just for that and use it on the application >> class ? >> This would allow me to split in 2 files in that example. >> >> Is there other way ? >> >> Can I break my current one class javascript file into several files (a >> js include if it exist) even if I keep one class ? >> >> Thanks ! >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win >> great prizes >> Grand prize is a trip for two to an Open Source event anywhere in >> the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> <http://moblin-contest.org/redirect.php?banner_id=100&url=/> >> _______________________________________________ >> qooxdoo-devel mailing list >> [email protected] >> <mailto:[email protected]> >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >> >> >> >> >> -- >> Jim Hunter >> >> DAILY THOUGHT: SOME PEOPLE ARE LIKE SLINKIES - NOT REALLY GOOD >> FOR ANYTHING BUT THEY BRING A SMILE TO YOUR FACE WHEN PUSHED DOWN THE >> STAIRS >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________ >> >> <http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________> >> qooxdoo-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
