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 ob
yep, pure OO beauty :)
Sebastian
Am 11.09.2008 um 21:27 schrieb Jean-Baptiste BRIAUD - Novlog:
OK, so its pure OO approach and there is no "hack" like splitting
the code of one class into several file except by usiing Mixin but
the doc state that the code in Mixin should be generic.
Any
OK, so its pure OO approach and there is no "hack" like splitting the
code of one class into several file except by usiing Mixin but the doc
state that the code in Mixin should be generic.
Anyway, pure OO approach is perfect :-)
On 11 Sep 2008, at 21:18, Sebastian Werner wrote:
You can use
You can use Mixins in your application class as well and this way move
parts of your code out of the application code. But even better would
be to break your class into multiple classes where each one does a
specific part (and this well ;))
Sebastian
Am 11.09.2008 um 21:15 schrieb Jean-B
I didn't know Mixin but I still have a question : can I split the
application class file in several files without creating other classes?
On 11 Sep 2008, at 20:56, Sebastian Werner wrote:
Jean-Baptiste,
you can have a look into our documentation. Mixins would be a good
concept as well.
F
Jean-Baptiste,
you can have a look into our documentation. Mixins would be a good
concept as well.
For a good introductioral read start with:
http://qooxdoo.org/documentation/0.8/oo_introduction
followed by:
http://qooxdoo.org/documentation/0.8/mixins
Hope this helps.
Sebastian
Am 11.0
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 ide
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
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 t