Skip to Content Java Solaris Communities Partners My Sun Sun Store United States Worldwide

»  1992
»  1993
»  1994
»  1995
»  1996
»  1997
»  1998
»  1999
»  2000
»  2001
»  2002
»  2003
»  2004
»  2005
»  2006

Tcl and Tk

Fiscal 1995 Project Portfolio Report

John Ousterhout
john.ousterhout@eng.sun.com


Overall Objective

To create the infrastructure that allows Tcl and Tk to be used as a universal scripting language for the Internet, so that Tcl/Tk scripts can steer all of the resources, applications, processors, and people of the Internet; and so that scripts can be shipped around the Internet and run safely on any platform where they may land.


Objective for FY95

To build the Tcl/Tk team; port Tcl and Tk to the Macintosh and PC/Windows platforms; construct an interactive builder for Tcl/Tk applications to allow user interfaces to be created graphically using direct manipulation in a style similar to Visual Basic; integrate the Safe-Tcl security extension into the Tcl/Tk core; and to provide evangelism, training, and support to encourage the use of Tcl and Tk for a variety of purposes within Sun.


Description

Tcl is a simple interpreted scripting language with the interesting property that it is embeddable: its interpreter is implemented as a C library package that can easily be incorporated into C and C++ applications. Each application can extend the basic language features with new application-specific features, so that Tcl scripts can then be written to control the application. Tk is a toolkit for creating graphical user interfaces; it is implemented as a set of Tcl extensions. With Tk, graphical user interfaces can be created as Tcl scripts without writing any C code.

Tcl and Tk have become widely used in the UNIX community for several reasons. First, Tk provides a very simple and high-level interface that makes it possible to write GUI applications 5-20x faster than with more traditional toolkits based on C or C++. Second, Tcl's embeddability makes it easy to create powerful command languages for a variety of applications, and its interpretive nature makes it easy to create hypertext and other forms of active content. Third, Tcl and Tk are both freely available and they run on virtually all UNIX platforms.

The goal for this project is to extend Tcl and Tk so that scripts can run on all the interesting platforms of the Internet, not just UNIX workstations. In addition, we will implement security mechanisms so that an incoming script can be executed safely even if it comes from an untrusted sender. Once this has been done, it will become possible to send Tcl/Tk scripts around the Internet to carry out interesting tasks such as workflow, remote device control, automatic purchasing, software installation, and network management. In addition to providing the basic infrastructure for Tcl/Tk applications that span the Internet, we will develop tools to simplify the creation of these applications, and also create a few showcase applications to demonstrate the power of this new programming paradigm.


Accomplishments

  • Assembled the project team.

  • Made major new releases of Tcl and Tk (Tcl 7.4 and Tk 4.0) that fix a large backlog of bugs and missing features (such as image support in Tk).

  • Ported Tcl and Tk to the PC/Windows and Macintosh platforms. The ports currently have almost complete functionality, but they still use the Motif look and feel. The ports will be released in their current form early in FY96, with native look and feel to follow about six months later.

  • Developed a prototype version of SpecTcl, an interactive GUI development system for Tcl and Tk.

  • Prototyped a new Web browser based on Tcl and Tk. The browser is written entirely as a Tcl script; in about 2000 lines of code, it provides functionality similar to that of Netscape and Mosaic (in June '95), and its performance often exceeds that of either Netscape or Mosaic.

  • Integrated the Safe-Tcl security mechanism into the Tcl core and significantly generalized it to support hierarchically nested collections of interpreters. Safe-Tcl allows untrusted scripts to be executed in special "padded cells"; interactions between a padded cell and the rest of the world can be controlled based on the trustworthiness of the script executing in the padded cell.

  • Bootstrapped Tcl/Tk usage within Sun by offering a series of one-day courses and by making Tcl and Tk easily available within the company. More than 30 projects within Sun are now using Tcl and Tk.


References

Publications

Johnson, R. and S. Stanton. "Cross Platform Support in Tk." Proceedings of 3rd Tcl/Tk Workshop (July 1994): 77-84.

Osterhout, J. Tcl and the Tk Toolkit. Massachusetts: Addison-Wesley Publishing Company, Inc.

Uhler, S. "A Graphical User Interface Builder for Tk." Proceedings of 3rd Tcl/Tk Workshop (July 1994): 145-146.

Welch, B. "Customization and Flexibility in the exmh Mail User Interface." Proceedings of 3rd Tcl/Tk Workshop (July 1994): 261-268.

Welch, B. Practical Programming in Tcl and Tk. New Jersey: Prentice-Hall, Inc., 1995.


View previous page

Return to the Table of Contents

View next page


webmaster@sunlabs.eng.sun.com
Would you recommend this Sun site to a friend or colleague?
Contact About Sun News Employment Privacy Terms of Use Trademarks Copyright 1994-2008 Sun Microsystems, Inc.