Home > Archive > PerlTk > August 2006 > L2Tk (List to Tk) build Perl/Tk applications from a batch script.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
L2Tk (List to Tk) build Perl/Tk applications from a batch script.
|
|
| Crosswire Labs 2006-08-25, 6:59 pm |
| Howdy,
I have written this beast over a period of several months, and is still
quite a mess. But it does a huge amount of work when used to develop Tk
apps. So I'm just posting here to see if anybody would be interested in
seeing this thing on sourceforge or CPAN.
In a nutshell, This is a few scripts and about 20 -30 template modules.
The script takes a .csv list of user defined class names, the class
from which they derive, their parent widget, and abbreviated geometry
strings. The script then makes some very basic architecture assumptions
and builds a large percentage of the application from templates.
IMHO, with some feature stabalization it could help make Perl/Tk more
viable for more hardcore application development. L2Tk has the
following benefits:
1. Every widget is constructed derived. The .pm is created and the
constructors prebuilt.
2. The widget tree is flat instead of heierarchical, with one Table
including all the widgets
available within every widget. Mainwindow is withdrawn, and a
Toplevel is spoofed in
its place.
3. HTML::Template was pressed into service for Perl templates, and it
actually works
suprisingly well. Templates have a Perl boot-strapping header. So
users can
extend templates to include whatever data sources they like.
4. Default geometry is all handled in the batch file using Tk::Gpack
abbreviated strings.
So if you don't like how it looks, change the batch file, rerun,
and you have a whole
new GUI. This supports pack() grid() and place()
5. It defines a default callback Translations module, and prepopulates
it with callbacks for
every widget defined in the batch file. All widgets also use the
Translations module,
which has set/get autoloaded functions. Hooking A to B is usually
just a matter of
defining an anonymous subroutine.
6. It assumes that the user will want some external data source access,
so a
a generic database class is constructed and forwarded to all
widgets. This class
is expected to be the data-source class the user is hooking into,
whether it is an
actual database, a socket or whatever.
If you actually do some design work first, you can cut coding for a
medium sized project nearly in half with this thing.
L2Tk was not designed before I wrote it, and it looks that way in the
source too :-) Optimally if this was intigrated as a backend to one of
the WYSIWYG Perl/Tk IDE's out there it would be brutally powerfull. But
for now I'm just looking for interested helpers to get the feature set
and source code stabalized.
So... Anybody there?
Matt Sibley
Crosswire Labs
Real Gear for Real Exams
http://www.crosswire.com
| |
| felix.da.ru 2006-08-27, 3:59 am |
| Hi,
You can find some Perl/Tk code generators published on PerlTk.org and
CPAN:
ZooZ and VPTK_W are WYSIWYG editors that instantly produce ready-to-run
code.
So, you decide: re-invent it or re-use.
-Felix.da.ru
Crosswire Labs wrote:
> Howdy,
>
> I have written this beast over a period of several months, and is still
> quite a mess. But it does a huge amount of work when used to develop Tk
> apps. So I'm just posting here to see if anybody would be interested in
> seeing this thing on sourceforge or CPAN.
<skipped>
> If you actually do some design work first, you can cut coding for a
> medium sized project nearly in half with this thing.
>
> L2Tk was not designed before I wrote it, and it looks that way in the
> source too :-) Optimally if this was intigrated as a backend to one of
> the WYSIWYG Perl/Tk IDE's out there it would be brutally powerfull. But
> for now I'm just looking for interested helpers to get the feature set
> and source code stabalized.
>
> So... Anybody there?
>
> Matt Sibley
> Crosswire Labs
> Real Gear for Real Exams
> http://www.crosswire.com
|
|
|
|
|