How To Write Tclets

How To Write Tclets

Note: This tutorial is not yet updated to reflect the features of the brand new 2.0 release. Come back soon for updates or see the main plugin page!

We've put together this site to teach you, the web professional, how to write Tclets, little Tcl programs running in a web browser. Oh-No, not another nerdy computer language, you say. You already know HTML, a little JavaScript and maybe even Perl, to do CGI. Do you have to learn yet another tool and all its idiosyncrasies? Or perhaps you're not a programmer and don't want to have to become one. Why should you want to try this Tcl stuff?

Here is the simple reason why you want to do just that. As a web professional, you know that HTML and JavasScript do not provide the interactive experience your users demand. And perhaps Java is too complex for what you're trying to do. Yet you want to enliven your web pages and create compelling sites that will draw people to come back again and again. And you want to cater to the widest possible audience, irrespective of what kind of computer or browser visitors to your web site are using.

What to do? Tcl and the Tcl plugin provide the tools you need to solve this problem and much more.

Writing Tclets is very easy. You don't need programming experience, and you will be producing simple Tclets within ten minutes. Tcl is a very widely used, simple to learn and use, mature, robust, and portable scripting language. The Tcl plugin provides a rich set of features and enables you to create applications for your web site with less effort that with any other tool, including those that claim not to require "programming". Because it is an interpreted language, Tcl significantly shortens your development cycle by eliminating some phases entirely and simplifying others. With its unparalleled set of GUI, networking and safety features, it is eminently suited to creating industrial strength distributed web applications. And the Tcl plugin solves your application deployment problem, because it is available for all major browsers on all major desktop platforms, and your Tclets will run without change inside the plugin on all platforms. Finally, the plugin is free for personal use and Tcl is well supported by Sun Microsystems Inc.; what more do you want?

OK, So What Will I Learn Here?

During your visit here you will learn:

What Tcl and Tk can do for you and why they're cool.
How to write Tclets and how to put them into web pages.
What special commands are available in Tclets.
About security, Safe Tcl, Safe Tk and security policies.

Organization Of This Site

Here's a short roadmap for this site:

The introduction starts here.
How to embed Tclets into your web pages.
Introducing Tcl and Tk, and a short Tcl tutorial.
A tour of Tk's features.
Security issues, and protecting yourself using Safe Tcl, Safe Tk and security policies.
How you use Safe Tcl and security policies.
See how we wrote the demos for the plugin.
A choice of applications using the Tcl plugin at other sites.
How to configure and administer the Tcl plugin.
The frequently asked questions page with answers to your questions.