in reply to CGI vs Tk for application backend

You didn't give many details of what you mean by "backend". Do you mean the store's administrative functions, like filling orders, checking inventory, etc?

Of course, I'm biased toward Tk, but there are advantages to using it, especially if it will only be run on 1 machine( i.e. no access needed thru the internet).

The main advantage is that you don't need to hassle with the programming ideosyncracies of the "stateless http protocol", like sending hidden fields, and storing sessions.

Tk will also give you a richer set of widgets to do your backend work. The html widgets are very limited, whereas as Tk will let you do just about anything you can dream up.

The Tk version "may" be more secure, since you are avoiding the unneccesary "apache middleman". If you have to setup a local apache server, for your workers, that can lead to complications....like firewall access, security issues, etc. Additionally, with Tk, you will be able to access more of the local filesystem and commands, without having to resort to using "sudo tricks".

So I would say, the only reason to use a browser interface, is if you want to remotely administer the store. But there too, Tk can access remotely thru encrypted connections.

Just as an example of the value of using Tk, just think about the problem of printing up shipping labels. I think it would be alot easier from a Tk script, than it would be thru a browser.


I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: CGI vs Tk for application backend
by Popcorn Dave (Abbot) on Oct 06, 2005 at 05:20 UTC
    Thanks for that!

    I didn't mean to confuse the term backend, but since it's not a cgi app that is going to be web accessable I considered it a backend app.

    That said, all this app is going to do is grab encrypted e-mails from the mail server, decode them locally, and print up receipts/mailing labels. And if I had users that were more computer savvy, I would be doing this in Tk in a heartbeat. But given that the person using has probably had about 5-10 hours total computer experience, I figured that the browser interface would be preferable.

    Useless trivia: In the 2004 Las Vegas phone book there are approximately 28 pages of ads for massage, but almost 200 for lawyers.