SR Technology WTK Repo
Top-level Files of trunk
Not logged in

Files in the top-level directory from the latest check-in of branch trunk


Requires TclOO.  Run tclsh8.5 server.tcl and open your browser to http://localhost:9001


I've recently started putting together a Tk-over-jQuery routine I'm calling web Tk (wtk). The idea is having full Tcl running on a server, with a Tk-like layer that sends commands to code running in a browser.

For those of you who remember it, this is conceptually similar to ProxyTk (see http://www.markroseman.com/pubs/proxytk.pdf).

An important thing is that its not tied into any particular web server or other communication channel; in fact, it just assumes there is a communication channel of some sort. This might be an AJAX connection pair, WebSockets, socket.io, etc. Or it might not even be a remote communication. You could well have a desktop/iPad app whose UI is a web view, and the "communication" between "server" and "client" might be just a procedure call.

The implementation is based on TclOO, and the demo uses simple Ajax communication over a generic minihttpd.tcl-derived web server. TclOO translates the "tk-like" commands into Javascript/jQuery calls with fairly minimal code. This is important as I want to make this very easy for people to extend, wrap other jQuery widgets, etc.

It's still at what I'd consider the proof of concept stage, but it feels very promising.


Notes:

Starting the wtk app server:

Utilizing netbin64 which contain all the dependencies, start the wtk server with the command:
  ./netbin64 server.tcl
  
or if you have all the dependencies you can use a standard tclsh install by running:
  tclsh8.6 server.tcl
  
Running the demo in a browser:

In a web browser, use a url corresponding to the demo app:
  http://localhost:9001/demo.tcl