View · Search · Index
 
Dear Community,

Since releasing the Next Scripting Framework (NSF) 2.0b5, we have
received more feedback from early adopters. Many thanks for the
helpful and the constructive comments!

Since the release of 2.0b5, there have been more than 450 commits to
our code repository. The implementation is very stable and has been
used for more than two years in production of our large-scale,
multi-threaded web environment inside NaviServer. Most of the changes
happened in NX and, therefore, on the NSF scripting level, without the
need to modify the NSF C layer. The implementation of XOTcl 2 has
changed very little. The Next Scripting Framework was tested with Tcl
8.5.17 and Tcl 8.6.2 on Linux, Mac OS X, and in Windows enviroments
(MinGW, VC12).

Below are the most notable differences in NSF/NX 2.0 final relative to
2.0b5:

a) Pluralism reform:

   Use plural names for structural features of objects and classes,
   whenever potentially multiple elements are provided or
   returned. This rule applies now consistently throughout NX. Here are
   examples from the introspection interface:

       /cls/ info superclasses
       /cls/ info subclasses
       /cls/ info mixins
       /obj/ info object mixins
       /cls/ info filters
       /obj/ info object filters

   Similarly, there the plural is used for configure options, e.g.:

       nx::Class create Foo -superclasses {C D}

   Note that abbreviations are allowed as well:

       nx::Class create Foo -superclass {C D}

b) Dispatch by arity is gone in NX.

   XOTcl and earlier versions of NX supported a dispatch-by-arity
   mechanism for relation slots:

       o mixin;            # arity 1: get value
       o mixin M1;        # arity 2: set value
       o mixin add M1;    # arity 3: use arg 2 for slot methods

   The problem with this approach is that it is not straight forward
   to provide meaningful error messages. In addition, one might be
   irritated about the result of e.g. "o mixin add" (leaving out a
   class to be added).  In the final release, we removed the entailed
   complexity by relying on a fixed arity of 3 (last form above) for
   the default slot methods:

       add, clear, delete, get, guard, set

c) Support for querying computed parameters of methods.  

   Earlier versions of NX had several methods to query the parameters
   for configuring objects of different classes. The configure
   parameters are determined by the inheritance order in the class
   hierarchy and are relevant during object creation (e.g.
   methods "create" or "new").

   Now, these configure parameter can be queried using the standard
   parameter introspection interface for e.g. "new", "create", or
   "configure", such as in:
   
     nx::Object info lookup parameters create
 
   The above command call returns the parameters which can be provided
   to an "nx::Object create ..." invocation. Furthermore, these
   computed parameters are returned in error messages.

d) Support abbreviations of non-positional parameter names (for plain
   methods, nsf::proc, or "... configure...").  

   To avoid surprises, especially for computed argument lists, the
   minimal number of optional trailing characters is set to 4.
   
e) Updated MongoDB interface:
   
   The interface was extended in various ways and is now based on
   mongo-c-driver 1.0.2 and was tested with MongoDB 2.6.5. The driver
   can be used nicely with e.g. Naviserver by using the c-driver
   supported connection pool.

f) API changes:

       nx::Object info lookup parameters create
           /cls/ mixins ...
           /obj/ object mixins ...
           /cls/ filters ...
           /obj/ object filters ...

    Simplified info methods for interceptors:

           /cls/ info mixin classes                 -> /cls/ info mixins
           /cls/ info filter methods                -> /cls/ info filters
           /obj/ info object mixin classes      -> /obj/ info object mixins

    Dropped methods:

           /cls/ info mixin guard
           /obj/ info object mixin guard
           /cls/ info filter guard
           /obj/ info object filter guard
        
    Instead, use the "-guards" option of "... info ?object? mixins|filters ...".

     Added methods:

           /cls/ mixins classes
           /cls/ filters methods
           /obj/ object filters methods
           /obj/ object mixins classes

g) Added API documentation:

   Using tcllib's doctools markup and dtplite, we now provide manpages
   for:
       nx::Object
       nx::Class
       nx::current
       nx::next
       nx::configure

The Next Scripting Framework 2.0.0 (containing NX and XOTcl 2.0.0) can
be obtained from https://next-scripting.org/ 

The detailed ChangeLog can be downloaded from
https://next-scripting.org/xowiki/download/file/ChangeLog-2.0b5-2.0.0 

Best regards
- Gustaf Neumann
- Stefan Sobernig