Helma Logo
main list history

Version 2 by zumbrunn on 18. April 2006, 17:26

50I've attached a zip <a href="/static/helma.dev/Wiki/Helma%201.5%20Javascript%20Libraries/modules.zip">zip file of the modules directory directory</a> that basically implements this, but have not yet committed this to CVS. There it could either replace apps/helmaLib or get its own CVS module named apps/modules.

Version 1 by zumbrunn on 18. April 2006, 17:24

1The following is a proposal for how the helmaLib should be  restructured and included in the release of Helma 1.5.
2
3The goal of this proposal is to include a library in a format that is open (not zipped) and easily accessible/approachable/transparent for newbies. It should leverage the newly added repository capabilities in a way that is ideal for these kinds of libraries and should allow them to be used efficiently in current and future applications.
4
5For Helma 1.5, the libraries would be spread over two sub-directories in ./helma/modules, so that extensions to the core javascript prototypes would be in ./modules/core/ and other prototypes such as Aspects, File, Ssh, Search, etc, in ./modules/helma/
6
7Applications and modules that depend on any of these libraries would use app.addRepository() in the global scope of there code files (not inside of functions) to let Helma take care of these dependencies.
8
9For example:
10
11    // take care of any dependencies
12    app.addRepository('modules/core/Array.js');
13    app.addRepository('modules/core/String.js');
14    app.addRepository('modules/helma/Search.js');
15    app.addRepository('modules/helma/Zip.js');
16
17Dependencies within the library are automatically taken care of using the same approach. In the above example, Zip.js requires File.js and Search.js requires lucene.jar. The code in the files Array.js and String.js would directly extend these core javascript prototypes.
18
19The file structure would look as follows:
20
21    modules
22      core
23        Array.js
24        Date.js
25        Number.js
26        Object.js
27        String.js
28      helma
29        Aspects.js
30        Chart.js
31        Color.js
32        Database.js
33        File.js
34        Ftp.js
35        Html.js
36        Http.js
37        Image.js
38        Mail.js
39        Search.js
40        Skin.js
41        Ssh.js
42        Url.js
43        Zip.js
44        ganymed-ssh2.jar
45        jxl.jar
46        lucene.jar
47
48In addition, the modules directory in Helma 1.5 would still also contain the helmaTools.zip repository.
49
50I've attached a zip file of the modules directory that basically implements this, but have not yet committed this to CVS. There it could either replace apps/helmaLib or get its own CVS module named apps/modules.
51