Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Okay, like I said, I have done some stuff with perl's Tk module. I've also done GUI programming in C with Gtk+.

GUI API's are "widget" oriented. A button is a widget. A text entry is a widget. A window is also a widget. Some widgets "belong" to other widgets -- perl's Tk module is object oriented. Usually there is considered to be a "top level" widget which is the eventual ancestor of all other widgets. The top level widget is a window.

So the widgets are perl objects created from widget classes, which some classes inherit from others. Ie, no, each window is not a package unto itself. TkCodex is pretty complex and in fact does use a database (via Storable, not SQL) but it is still all one file (1300 lines/45k -- I am not totally proud of the sometimes sloppy/dense looking code, but I still use it on a near daily basis and it has not required any bug fixes in a year).

That is the general scheme of all GUI libraries, whether in perl or not (altho in C there are no formal objects/classes, the idea is same). I would recommend Tk because it is a common perl package, and it is highly functional without being to hard to use. Gtk will likely match your destktop better on a linux box, and has probably some additional capacities if you want to embed 3D graphics, et al. Outside of linux, it may "clash" and is possibly harder to learn/use than Tk (certainly, the C library is...). Qt would be a good choice on windows or mac, but I notice perl/Qt has been unmaintained for a long time.

I also know there are tk and gtk programmers here at perlmonks -- they helped me. So take your pick and if you have a problem, this is the place to get assistance. Like I said before, and I can't stress this enough, do a small experimental project FIRST before you start fooling around seriously. Life will be much easier that way and the time it takes will be saved later because of the learning. An address book, or anything else you can think of to make into an SQL database, is ideal. You do not need to separate the GUI and the db code into separate packages (altho you can if you want). You just use the GUI buttons or whatever to issue queries, insertions, what-have-you (I'm presuming you've already done a bit of SQLite manipulation in perl using DBI), and you can display strings using "label" or "textarea" widgets.

In reply to Re^3: Is there a Perl MVVM or MVP framework? by halfcountplus
in thread Is there a Perl MVVM or MVP framework? by romandas

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2023-09-28 21:50 GMT
Find Nodes?
    Voting Booth?

    No recent polls found