nstcl is a Tcl package which reimplements many of the useful APIs and
commands from AOLserver and OpenACS, making them available for use in
Tcl/Tk applications & scripts.
nstcl is grouped into a set of subpackages, including:
* nstcl-core
* nstcl-database
* nstcl-html
* nstcl-http
* nstcl-misc
* nstcl-nssets
* nstcl-sendmail
* nstcl-templating
* nstcl-time
Most notable of these is the nstcl-database package, and the "ns_db"
API, which provides a common interface to various different database
extensions.
Prior versions of nstcl only supported Oracle, Postgres, and Solid. As of
version 1.0 nstcl now supports the following databases:
* Oracle
* Postgres
* Solid
* Sybase
* SQLite
* MySQL
* ODBC
Extending nstcl to support a new database extension involves writing six
(mostly trivial) procs.
REQUIREMENTS
============
nstcl makes use of [string] subcommands, such as [string map] that first
appeared in Tcl 8.2. As a result, use with a modern Tcl (8.3.4+) is
preferred. However, for those stuck with an older version of Tcl, a set
of so-called "forward compatability" procs are provided that enable nstcl
to function on Tcl 8.0+.
Database access requires a supported database extension. Certain features
of nstcl make use of packages from tcllib. See the README for details.
WHERE TO GET IT
===============
Download nstcl-1.0.tgz from:
http://michael.cleverly.com/nstcl/nstcl-1.0.tz (252 K)
Read the online documentation & README notes at:
http://michael.cleverly.com/nstcl/
LICENSING
=========
nstcl is distributed under the terms of the MIT/X11 license (essentially
the equivalent of the BSD license without the advertising clause).
Enjoy.
Michael
[[Send Tcl/Tk announcements to tcl-an...@mitchell.org
Announcements archived at http://groups.yahoo.com/group/tcl_announce/
Send administrivia to tcl-announ...@mitchell.org
Tcl/Tk at http://tcl.tk/ ]]
> Prior versions of nstcl only supported Oracle, Postgres, and Solid. As of
> version 1.0 nstcl now supports the following databases:
>
> * Oracle
> * Postgres
> * Solid
> * Sybase
> * SQLite
> * MySQL
> * ODBC
Good stuff! Here is a good way to do cross-platform database access.
--
David N. Welton
Consulting: http://www.dedasys.com/
Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
Apache Tcl: http://tcl.apache.org/
Hm, sounds good. Finally something to rival Perl's database interface?
>
> nstcl is distributed under the terms of the MIT/X11 license (essentially
> the equivalent of the BSD license without the advertising clause).
I thought that clause has now been removed from the BSD license?
> > nstcl is distributed under the terms of the MIT/X11 license (essentially
> > the equivalent of the BSD license without the advertising clause).
>
> I thought that clause has now been removed from the BSD license?
Yes, it has/was years ago. I should have written "essentially the
equivalent of the original BSD license ..."
http://www.opensource.org/licenses/bsd-license.html
"Note the new BSD license is thus equivalent to the MIT License, except
for the no-endorsement final clause."
Michael
How about including this into tcllib?
Jochem
--
"First things first, but not necessarily in that order"
-- The Doctor, Doctor Who
I think it wouldn't fit, as it depends heavily on shared libs for the
databases (if i read the webpage correct) and tcllib has script only
packages.
Michael Schlenker
It's just an interface, yes. Hmm. Distributing all the shared libs is
surely not possible, but a common interface to these would be really
nice to have.
Jochem
> > I think it wouldn't fit, as it depends heavily on shared libs for the
> > databases (if i read the webpage correct) and tcllib has script only
> > packages.
>
> It's just an interface, yes. Hmm. Distributing all the shared libs is
> surely not possible, but a common interface to these would be really
> nice to have.
Aside from the database portions of nstcl, the rest is pure Tcl and so
would be eligible for tcllib. Of course, the database api is the reason I
started writing nstcl in the first place to make my job easier working
with Oracle & Postgres both at work.
Michael
> Jochem Huhmann wrote:
> >
> >>>
> >>> * Oracle
> >>> * Postgres
> >>> * Solid
> >>> * Sybase
> >>> * SQLite
> >>> * MySQL
> >>> * ODBC
> >>
> >
> >
>
> packages.
>
> Michael Schlenker
It is also possible to use tcl only code instead shared libs for
database access, but its much more slower. There is an interface for
PostgreSQL access at ftp://aero.vmei.acad.bg/pub/dbase/pgsql/pgsql in
pure tcl code, so you can use in tclets for example, but this
interface had some limitations like only access with TCP connections.
It is also possible to write pure tcl extensions with expect or exec
calls with client tools like psql or sqlplus.
By the way, who is going to write script only packages for tcl without
an API defining access? The performance is much slower. The example
above was developed for a need for cross plataform access (something
estimulated with an API) and since 1999 no longer updated.