Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
Python and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Lua, etc
 
Incr-Tcl - Object Oriented extension to Tcl

WHAT IS TCL?

Tcl is an excellent scripting language, based on a true interpreter and a large number of commands. It's found its niche in a number of engineering applications (system testing, IC and circuit design, numerical control work, etc.) where it's often embedded within larger programs written in languages such as C to allow the system user a tailoring capability - indeed, that's the who origin of the language.

The Tk toolkit provides a Graphic User Interface (GUI) that sits on top of Tcl. With Tcl/Tk, you can write effective scripts that are controlled through a series of buttons, sliders, entry boxes, etc. ... allowing a Tcl application to be very easy to use by the widest range of users. Tk uses the look and feel of the platform it's running on, so that Windows users, Motif (Linux) users and Mac users all see windows that look very familiar to them.

Expect is another extension to Tcl. It provides the user with the ability to automatically control other applications, including ones that are designed for purely manual use, in an effective way. A great tool if you want (as we do, for example) to check out a network by "ping"ing all the systems that should be on line.

AND [INCR-TCL]?

As your programs grow, they'll get harder to maintain and it gets harder to share the code too. Named blocks of code (often known as functions, but called procs in Tcl) are a huge help for a while, but eventually even that approach gets tricky to maintain. That's when you want to use Object Oriented programming.

The Tk toolkit has some aspects of OO in its design, and this OO approach is taken further by the [incr-Tcl] extension. Using [incr-Tcl], you can define whole classes of objects on which you can perform operations, and you get a command who's name is the name of the object concerned. Very neat, if a trifle baffling if you're not used to Object Orientation. What it really means is that you can hide the complexities of how you handle certain types of data within the procs concerned, providing the writer of the application program that's going to use that type of data with an easy way of doing so. ((If I was writing the sentence above in proper OO terms, I would have said that you ENCAPSULATE the complexities in METHODS)).

[Incr-Tcl] goes further than Tk too. For example, you have a full inheritance capability. In other words, if you want to define a type of data that's like one that already exists, but has a number of extra or modified features / behaviours, you can define a new type of object that's based on the the one that's already available ... by coding just the changes and not the whole thing again you make a big time saving, and when it comes to maintenance, you've only got one set of procs to change as the rule that "a is like b but with the following changes" is automatically re-applied every time; change "b" and you've automatically changes "a".

WHERE CAN I LEARN MORE ABOUT [INCR-TCL]

At present, [incr-Tcl] is a bit of a niche; not many of the Tcl books cover it and on our public courses we only include an introduction. If you're already familiar with OO techniques and are an experienced user of them in other languages, you'll pick up [incr-Tcl] quite easily once you've learnt Tcl.

If you're NOT already an Object Oriented programmer (in other words, if you've programmed only in structured languages, or you're a newcomer to any programming), then some instruction would be worth its weight in gold. OO is NOT something that's easy to learn for the first time from a book, even supposing you have an appropriate book.

If you have a group of people who need to learn [incr-Tcl], we can arrange a private course.
See our Custom training course page
If you're wanting to learn about [incr-Tcl] and Object Orientation, but you're working on your own or with just one or two others, we can provide you with a top-up "extra day" after your public Tcl and/ or Tk course.
See our extra days page

See also [incr-Tcl] training

Please note that articles in this section of our web site were current and correct to the best of our ability when published, but by the nature of our business may go out of date quite quickly. The quoting of a price, contract term or any other information in this area of our website is NOT an offer to supply now on those terms - please check back via our main web site

Related Material

Tcl/Tk - [incr-Tcl]
  [4460] Using Object Oriented Tcl and the Tk toolkit together - real life example - (2015-03-12)
  [4456] Objects in Tcl - iTcl - updated first steps example - (2015-03-11)
  [3142] Private and Public - and things between - (2011-01-22)
  [1925] Introduction to Object Oriented Programming - (2008-12-06)
  [1819] Calling base class constructors - (2008-10-03)
  [1528] Object Oriented Tcl - (2008-02-02)
  [656] Think about your design even if you don't use full UML - (2006-03-24)
  [290] Object Orientation in Tcl - [incr-Tcl] - (2005-04-24)

Object Orientation and General technical topics - Object Orientation: Individual Objects
  [4650] Why populate object with values as you construct them? - (2016-02-18)
  [4591] From single block to structure and object oriented programming - (2015-12-02)
  [4448] What is the difference between a function and a method? - (2015-03-04)
  [4021] Spike solution, refactored and reusable, Python - Example - (2013-02-28)
  [3721] Naming blocks of code, structures and Object Orientation - efficient coding in manageable chunks - (2012-05-06)
  [3436] Moving from scripting to Object Orientation in Python - (2011-09-13)
  [2651] Calculation within objects - early, last minute, or cached? - (2010-02-26)
  [2393] A first demonstration of OO, including polymorphism - (2009-09-04)
  [2173] Basic OO principles - (2009-05-11)
  [2171] Cleaning up redundant objects - (2009-05-11)
  [1925] Introduction to Object Oriented Programming - (2008-12-06)
  [1864] Object Oriented Perl - First Steps - (2008-11-01)
  [1543] Learning Object Oriented Principles (and perhaps Java) - (2008-02-17)
  [507] Introduction to Object Oriented Programming - (2005-11-27)
  [227] Bellringing and Programming and Objects and Perl - (2005-02-25)

Tcl/Tk - Tcl, Tcl/Tk and Expect - General
  [4616] Still teaching Tcl in 2016? - (2016-01-06)
  [4460] Using Object Oriented Tcl and the Tk toolkit together - real life example - (2015-03-12)
  [4434] Public training courses - upcoming dates - (2015-02-21)
  [4206] Writing the perfect program in Tcl? - (2013-11-13)
  [3286] Should we cover expect and/or Tk on our public Tcl courses? - (2011-05-11)
  [3192] Tcl - Some example of HOW TO in handling data files and formats - (2011-03-04)
  [2681] Tcl - a great engineering language - (2010-03-17)
  [2504] Learning to program in ... - (2009-11-15)
  [2474] Using Tcl and Expect to automate repetitive jobs - (2009-10-24)
  [2429] Tcl scripts / processes on a web server via CGI - (2009-09-27)

resource index - TclTk
Solutions centre home page

You'll find shorter technical items at The Horse's Mouth and delegate's questions answered at the Opentalk forum.

At Well House Consultants, we provide training courses on subjects such as Ruby, Lua, Perl, Python, Linux, C, C++, Tcl/Tk, Tomcat, PHP and MySQL. We're asked (and answer) many questions, and answers to those which are of general interest are published in this area of our site.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2019: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01225 708225 • FAX: 01225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/solutions/tcl-incr ... o-tcl.html • PAGE BUILT: Wed Mar 28 07:47:11 2012 • BUILD SYSTEM: wizard