xjs 0.0.1 Release

Update newer versions of xjs have now been released.

This week I enhanced the xjs documentation system. I've also made a clear separation between the core xjs distribution and the community contributed modules.

The install instructions have been updated for the xjs 0.0.1 release.

Documentation system

The documentation system is something like javadoc and uses @ directives. Here is a little sample from the Logger module.

/**

@name    Logger
@version 0.0.1
@author  Peter Michaux
@email   petermichaux@gmail.com
@summary <p>A logger utility</p>
@introduction
<p>A logger utility with level control</p>

<pre><code>var log = new Logger('/path/to/some/file.log');
log.info('processing your request');
log.level = Logger.ERROR;
log.error('big problems');
log.info('this message will not log because log.level is higher than info level');</code></pre>

<p>Currently there are the following levels shown here in order:</p>

<ol style="list-style-type:none;">
  <li>Logger.SILENT - no messages logged</li>
  <li>Logger.ERROR</li>
  <li>Logger.WARN</li>
  <li>Logger.INFO - all messages logged</li>
</ol>

*/

/**
@property Logger
@parameter file The name of the log file to send output messages.
@description
<p>A contructor function that creates an object that can be sent messages for logging.</p>
<pre><code>var log = new Logger('/path/to/some/file.log');</code></pre>
*/

You can see the results of this documentation on the central site: Logger-0.0.1.html

I haven't had a chance yet to write too much documentation for the xjs core modules or my other modules like Synergy but these documents will appear. If you are writing your own module have a look in the Logger module to see how it works.

$ svn co http://dev.michaux.ca/svn/modules/Logger

If you have questions about writing documentation feel free to ask on the xjs-talk Google group.

Separating the xjs core and other modules.

The xjs project started as a directory of files as I was learning about the Rhino JavaScript engine and Jetty web server. Over the past month these files have been gaining structure and separation into the xjs module system. This week the final separation finally happened. I moved my extra modules like PostgreSQL, Synergy, YUICompressor out of the xjs repository and created a separate repository for my other modules.

You can still checkout the xjs core distribution with

svn co http://dev.michaux.ca/svn/xjs

My extra modules are now available with

svn co http://dev.michaux.ca/svn/modules

With this change the xjs core is now much smaller and may even shrink more in the future. The idea is a very small core with a JavaScript interpreter and enough other code to make building and installing modules possible. All higher level modules are installed with sudo xmod install ModName.

Keeping the core small will hopefully make it easier for others to join in the fun of working on the xjs core to make sure it grows to be the best quality code possible.

Comments

Have something to write? Comment on this article.