The moo.rd system
January 25th, 2008 | written by RD
When i decided to build a moo.rd system, i wanted to have a Javascript file as modular as possible. Because of this, i created the constructors.js core file, which contains all the “core” moo.rd constructors, as the name says.The core constructors are wrappers whose properties represent the “extended” moo.rd constructors. For example the Custom object is a core constructor, while the Custom.Alert and Custom.Confirm classes are extended constructors. In this way you can choose the Custom.Alert without Custom.Confirm and vice-versa.
There are some others core constructors besides Custom: for example:
- Table, which allows you to download table_rows.js, table_cols.js or table_cells.js , indipendent of each other
- Make, which allows you to download make_table.js, make_list.js or make_select.js , indipendent of each other.
However, when the constructor isn’t a wrapper only, but a “base constructor” which contains a lot of methods, the constructors.js file is no longer a true place for this.
So we have to create a “base” file whose constructor will be extended by other constructors. The base files are simply called “something_base.js”, for example:
- virtual_base.js, contains Virtual.Base class, whose properties will be catched by either Virtual.Box and Virtual.Ajax classes.
If the “extended constructors” are less than two, this will be placed in the same file of “base constructor”, as in the kwick_menu.js file which contains either the Kwick.Base and the Kwick.Menu classes.
Reassuming, moo.rd declare three types of Classes:
- the “core” classes
- the “base” classes
- the “extended” classes
This permits a higher modularity, which is one of the main features of moo.rd.
April 30th, 2009
Ho un problema con Kwick.Menu.
Non trovo aiuti in rete. Come posso fare per chiedere aiuto nel forum?
grazie