Version 0 of Software creation with Tcl/Tk

Updated 2009-06-13 23:52:45 by FabricioRocha

Fabricio Rocha - 13 Jun 2009 Maybe you want to keep track of your expenses in a way that GnuCash can't help you. Maybe you have an apparently great idea for something that could be done on your PC but it seems that nobody thought the same before. You can imagine the interface, the dialogs. You can even imagine how nice your program would be, what other people would think of it, what about a website...

In other words: you want to create a new software. You know a little bit of Tcl/Tk and you feel it is the best tool for moving your ideas from your mind to reality. But... how to do it? Where to start? Is there a library that could help? How to use it? How to organize your code? Can you draw your own icons or would you like to find some for free? How could the interface look better? Which procedures to write first? How can you take advantage of some Tcl peculiarities? How can you leave room for future versions, how to avoid a crash if your program reaches something that you don't want to implement immediately?

There is a bunch of questions that fill your head when you feel the bite of the programming bug, but it is not so easy to find answers for them, and even professional programmers sometimes find themselves in doubts. There is a good number of coding standards guides, but much less information about software architecture and design, and the documents in this category are mostly driven to company-sized development, big databases, etc; not to the lone programmer which wants to create a little desktop or mobile application.

I propose this page in the hope that more experienced Tclers can teach and discuss with newbies and intermediate users which practices they use when creating new apps, what must be avoided, how to create good interfaces, how to keep focus on the important things, and so on. It should not become a coding guide like how-to-name-your-variables, nor a bunch of copied-and-pasted procs; but a more generic guide on how to go from an idea to a running software. Far from being the definite cake recipe; but a good way to start.

Developing and polishing the idea

The interface

Fabricio Rocha 13 Jun 2009 - Paper prototyping is the first thing I use when thinking about an interface. Just get a notepad, a pencil, draw an empty window and start drawing widgets and writing tiny letters on them. I know there is a good number of people who uses Tcl/Tk itself for prototyping, and then it becomes a matter of adding backstage functionality later; but I'm still not at this stage and I really miss a visual interface designer for Tk (VisualTcl is quite outdated).

What to consider before starting to code

Try to find if there is something like the software you want to create? Try to find libraries which might be used?

Useful tools for Tclers

Files and directories

Split the code in multiple files... or not?

Development tips

Copy procedure names on paper? Run again whenever a new procedure is added?

Coding standards

There are some pages in the Wiki which go into details about programming style in the sense of making the code more readable and easy to maintain: Tips for writing quality software

Using other people's code

Where to find useful code? Do you have to tell the authors? How to distribute libraries with your software?

Documentation and website


enter categories here