Fratres sapientissimi,
I have the following general problem. I use Perl because I totally agree with its philosophy of ""optimize for the common case", "get the work done quickly" and "practicality over beauty". I was always told to use Tk for user interface. But Tk is highly unperlish, IMHO. Tk is cleary not optimized to:
- create a UI to your program as quickily as possible
- have the users enter data as quickly as possible (full keyboard support) and as error-prone as possible (regexp-based validation of data entry fields)
Take, for example, a simple message box. I want to ask my user a simple question. Then I just want to enter something like
alert('Are you sure you want to quit?','Yes','No'); and: 1) not necessarily have a parent window 2) if I do have one, then inherit the title from it 3) always have the first button as default 4) have the possibility to change between buttons with the arrows keys and choose with Enter as it's much faster. That would be perlish, I think: fast, simple, practical, doing what you want to do instead of having to specify details that can be safely defaulted to the common case.
If the alert() sound familiar to you, then maybe you used Clipper '87 in the eighties and early nineties. Yes, maybe Clipper is the only cool programming language that had no effect on Perl. And the Clipper user interface is very perlish - in contrary to Tk.
A really perlish/clipperish user interface does not require you to painfully program (or draw) widgets. Instead, it assumes:
- most of the time, you want to create a window (or a textmode screen, it does not really matter which) to list (in a scrollable way) something: records in a database table, your e-mails, mp3-s in a playlist, or the main menu of your program. And you want to do something with them, and for that it is a good solution to have multi-level menus on the top of the window/textmode screen. In Clipper '87 it was called "browse".
- You want to enter some data on a form. For this, you can have a window/textmode screen, with regexp-based validation of fields, going from one field to the next one by pressing Enter, and the form is posted by pressing Enter on the last data entry field. In Clipper '87 they were called "mask".
If a UI library is heavily optimized for this two type of window/screen objects, to create them with as few lines of code as possible, with fixed width fonts etc. now that would be very perlish for the programmer, because it's necessarily ugly, it's fast, efficient and practical, and very good for the user, especially for masks, which really speed up data entry.
Unfortunately, I could not find such a module.
Can you suggest me one or at least explain, why not?
Semper humilis,
Shenpen
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.