Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I've used Perl/Tk for some applications... and I think its a very good GUI toolkit.. but, there are limitations that I've observed..

Firstly, the syntax is a bit awkward to pick up.. at least, I found it to be so.. some of the learning curve in Perl/Tk for me could have been because when I learnt it, I didn't understand OOP in Perl at all.. the concept of objects was unknown to me... but it looks different from the usual Perl code...

Although I hate to say this, I must concede that Swing, in recent years, has overtaken Tk in extensibility and functionality.. Having programmed quite a bit in Swing, it seems to have a lot of more breadth in widget types now than before...

Ok, now, onto the good stuff, and believe me, there is a lot that Tk has going for it.. Spreadsheets, yes, definitely possible...see here for a module on this.. never used it myself, but I know it exists :o) Graphics programs, very definitely.. if you haven't already, fire up the widget examples that came with your Tk distribution and look at the Canvas examples.. I've seen wonderful examples of graphics related programming in Tk.. First person shooters, nope, not really.. can't say I've seen those... Some more experienced monks, please do correct me if I err, but Perl/Tk isn't the fastest for that sort of thing... I'd tell you to look at C or C++ for that sort of thing..

Speed wise, and memory consumption wise, Tk rules.. don't even bother running Swing unless you have 128+ mb of RAM.. but I completed a complex Tk application that ran perfectly on my ancient P200 with just 32mb of RAM on Win95... no swapping out to disk, at all... Part of this is due to what I consider to be a design drawback of Swing, in that it renders each and every component.. Tk takes the much more pragmatic approach of using native components (dialogs etc) where possible, so it runs faster and smaller than its Swing equivalent...

As far as Visual Basic goes, well, I have to say that its much easier to write quick'n'dirty GUI apps using it... although Perl has made advances with the use of tools like SpecTcl and SpecPerl... but there is one major advantage of using Tk over VB, and that is platform independence.. I have not had to change much code (mostly, I haven't had to change any code at all) to get an application to run on both Win32 and Linux..

I'd probably tell you to stick with Tk, its a rewarding GUI toolkit to use, but if you insist, WxWindows has a Perl binding.. I think its in beta, but I have used the Python binding, and I find it to be useful for some GUI building tasks.. YMMV..
HTH


In reply to Re: Limits of Perl/tk? by tinman
in thread Limits of Perl/tk? by Sprad

Title:
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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-29 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found