SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 38
  1. #1
    Probably eating pie mitsubishi's Avatar
    Join Date
    Sep 2001
    Location
    England, UK
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is GTK worth learning?

    With PHP pretty much learnt, it's time for me to move on, but to what?

    As PHP is the only language I know (well apart from locomotive BASIC ) PHP-GTK seems like an easy entry into applicatiion development, but has lots of down sides, eg:
    still in development,
    no compiler in sight,
    limited (?)

    But its not really a new language, just some classes to learn.

    So is GTK worth it or should I (or any PHPer) just miss it out and go straight for something more meaty like C++?

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    Ontario, Canada
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    php-gtk is something worth playing with, and making an app to pass around an intranet. But for a full applicaiton with commercial purposes you should use one of the established programming languages like C/C++, delphi, etc.
    Web Hound
    $x='010000010110001101101001011001000101001001100101011010010110011101101110';
    for($i=0;$i<strlen($x);$i+=8)print(chr(bindec(substr($x,$i,8))));

  3. #3
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I concur. Although there are many programmers out there who write GUI applications in a scripting language (like Python or Perl), I would personally never do that myself. Use the right tool for the job, I say. So use PHP for web sites, Perl/Python/Ruby for scripting, and C++ for GUI applications. In any case don't learn VB, because it stinks.

    Vincent

  4. #4
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    Ontario, Canada
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol, I actually think of VB as a "Windows Macro Langauge"
    I learnt it when I was in grade 10, my third language, after english and Turbo Pascal ( I learnt on my own from a book when I was 12 )
    Web Hound
    $x='010000010110001101101001011001000101001001100101011010010110011101101110';
    for($i=0;$i<strlen($x);$i+=8)print(chr(bindec(substr($x,$i,8))));

  5. #5
    SitePoint Zealot
    Join Date
    May 2001
    Location
    UK
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the right tool for the job
    Just wondering why you don't think PHP is good enough for scripting? If firepages sore that don't think he'd be happy!!

  6. #6
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think there's nothing wrong with using PHP for scripting, except that I don't have a PHP interpreter on any of my machines...

    Perl is installed on almost any Unix machine, and on a lot of Windows machines as well. Python probably comes second (while Ruby is much nicer IMHO). PHP is only available on every Windows machine that has a PHP-enabled web server.

    As I compiled and installed PHP as an Apache module, I don't have a PHP executable (CGI binary), so I can't execute PHP scripts from the command line. I don't need to anyway, since I already have Perl, Ruby and Python.

    I know I could compile PHP as a CGI binary, but I don't really want to do that, as that would mean installing PHP TWICE everytime a new version comes out.

    Vincent

  7. #7
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    Ontario, Canada
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MPK, Vincent is refering to Shell Scripting for things like install or configuration scripts on a unix base, that is what Perl has been doing for 10+ years
    Web Hound
    $x='010000010110001101101001011001000101001001100101011010010110011101101110';
    for($i=0;$i<strlen($x);$i+=8)print(chr(bindec(substr($x,$i,8))));

  8. #8
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    Ontario, Canada
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lmao @ us posting at same time
    Web Hound
    $x='010000010110001101101001011001000101001001100101011010010110011101101110';
    for($i=0;$i<strlen($x);$i+=8)print(chr(bindec(substr($x,$i,8))));

  9. #9
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right! If that wasn't that clear from my post, sorry for that.

    BTW AcidReign: the image in your signature doesn't work.

    Vincent

  10. #10
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Going back the the question for a moment:

    So is GTK worth it or should I (or any PHPer) just miss it out and go straight for something more meaty like C++?
    Personally I think PHP-GTK is worth it, as long as you are using it "just for fun" or for simple utilities which tie into your website in some way.

    What PHP-GTK has going for it is in a few minutes of getting started with it you can have your first Windowed app staring back at you. Not so C++ - it's going to take a fair amount of reading and practice before you have your first Windowed app running (disclaimer: I've no experience of Visual C++ or similar).

    PHP-GTK also has access to all the free PHP libraries, for nice things like XML-RPC to get your app to communicate with your website. To get access to the equivalent in C++ may cost $ and have a steeper learning curve.

    The jury is still out on whether PHP-GTK will ever get serious, but rumour is the Zend 2.0 engine will do alot for it (the Zend 2.0 being the solution to all of PHP's woes at the moment )

  11. #11
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Going back the the question for a moment
    And spoil all the fun?

    Not so C++ - it's going to take a fair amount of reading and practice before you have your first Windowed app running
    That's true, especially when you're going to try Visual C++. There's nothing wrong with C++, but all class libraries Microsoft has come up with thus far (MFC, ATL, and so on) are a real mess. For the Windows platform, I would suggest Delphi (Object Pascal) or C++ Builder. Those use the same class library (CLX), which WAS designed by someone with more than half a brain.

    For Linux, I'd suggest Qt. It has the easiest-to-use GUI class library by far, albeit a bit slow at some points. GTK is butt-ugly (like most of the rest of the GNOME software internals), so skip that. Qt is also available for Windows as a free version, but then you must also release your apps free, unless you buy an expensive license.

    There are many other GUI class libraries, of which FLTK and wxWindows are worth mentioning. But anyhow, going from PHP to C++ will require a lot of reading...

    To get access to the equivalent in C++ may cost $ and have a steeper learning curve.
    That part about the learning curve is certainly true, as I mentioned above, but the $ part isn't!

    Vincent

  12. #12
    Probably eating pie mitsubishi's Avatar
    Join Date
    Sep 2001
    Location
    England, UK
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, looks like most people don't take PHP-GTK too seriously, but it clearly isn't as powerful as something at a lower level. Actually I'm going to learn it no matter what got said, its no great leap from PHP, just wanted some opinions.

    But C++ should be next for me? How would I go about that

  13. #13
    .NET inside archigamer's Avatar
    Join Date
    Jan 2002
    Location
    Strongsville OH
    Posts
    1,534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its been 2 years since i studied the c++ language (i never used it just used it as a learning language to grasp the concepts of computer programming.) i would go with java if i were you no $ involved infact one of the best book for it is available free at www.bruceeckel.com. also a good ide for it is free, gets you into good coding habits, truly oop like .net is. and is easier to understand than a person new to c++.

    edit: you can also download his c++ book which is very good.
    Web Finesse Studios
    Professional, business oriented web hosting and development.

  14. #14
    SitePoint Zealot
    Join Date
    May 2001
    Location
    UK
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I used Turbo Pascal to learn the basics of programming, I found it very friendly and a good introduction. I think it would be quite easy for somebody competitent in PHP. I guess todays alternative is Delphi.

    "I know I could compile PHP as a CGI binary, but I don't really want to do that, as that would mean installing PHP TWICE everytime a new version comes out."
    I have both, its not that bad (though i use software to upgrade it). I use PHP for cron on customers scrtips, and have bought several scripts which do the same. It works well. With my scripts for compatability I make a perl alternative, but the scripts I have bought don't.

  15. #15
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by voostind
    I concur. Although there are many programmers out there who write GUI applications in a scripting language (like Python or Perl), I would personally never do that myself. Use the right tool for the job, I say. So use PHP for web sites, Perl/Python/Ruby for scripting, and C++ for GUI applications. In any case don't learn VB, because it stinks.
    I think that Python is a great GUI application language... It is easy, portable, stable, fast, and can be used on various platforms with one windowing toolkit. I can write a program in Python in a few days that would take weeks to do in C++. Why?? Because I would have to write all of the windowing calls myself.. (Unless I wanted to use a high priced IDE). So in my case the best tool for the job is Python.

  16. #16
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, that's always a matter of opinion, isn't it? In my (humble) opinion, Python isn't fast at all, it's dead slow on a computer more than a year old. But I do agree that writing applications in it can be very quick (although Ruby is much, much nicer I think). Still, I wouldn't use a scripting language for professional window applications. Those simply scream for a compiler.

    Vincent

  17. #17
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    That's just it... Python can be compiled. When compiled into an .exe file it is fast as #$%^#!!

  18. #18
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm sorry, but that isn't true. Compiling Python (or Perl) only builds a large executable with a built in interpreter and a large block of bytecode. It's a tiny bit faster than interpreted code, but that's all. There's no real compilation going one. Heck, that isn't even possible due to the nature of the language (late binding, dynamic typing, and so on).

    Besides, Python is friggin' ugly... If you want to do real OO in scripting, try Ruby. I say that even when the 'inventor' of Python was Dutchman, like me.

    Vincent

  19. #19
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    From what I have read, the executable created by py2exe is faster than some C programs and is not bytecode.

    I do use Ruby but I like Python because it is something I have grown comfortable with.

  20. #20
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From what I have read, the executable created by py2exe is faster than some C programs and is not bytecode.
    Where did you read that? From the py2exe homepage:

    py2exe uses python's modulefinder to load your script and find all python and extension modules needed to run it. Pure python modules are compiled into .pyc or .pyo files in a temporary directory. Compiled extension modules (.pyd) are also found and parsed for binary dependencies.


    A zip-compatible archive is built, containing all files from this directory as well as your script, and appended to a custom python interpreter supplied with py2exe.
    Anyway, the discussion here is similar to the one where Java bytecode is compared to C(++) code. Java can never be faster, since the pipeline is longer (there's this Java Virtual Machine). If the Java code is faster (in very few cases this is so), then the only conclusion that can be drawn from that is that the C++ compiler that was used didn't produce optimized code, that's all.

    I do use Ruby but I like Python because it is something I have grown comfortable with.
    I know the feeling. I still use Perl every now and then...

    Vincent

  21. #21
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    I don't know where I read it. But I understand what you are saying and it makes perfect sense. And I am not trying to preach that everyone should use Python to write large GUI programs that do things like networks and large tasks, I was just trying to get people to look to Python as an option. Kind of shamelessly plugging it.

  22. #22
    Talk to the /dev/null Theiggsta's Avatar
    Join Date
    Mar 2001
    Location
    Tampa, FL
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I suggest you forget about GTK and Python, Ruby is a very good language and is where Perl will soon be heading, a pure OO language. If ruby isint to your liking, go for Perl for a change of pace. Perl and PHP are a great combo in a server application and looks great on a resume.

    Since you've done PHP, why not try C++? it would be great practice and allows you to easy jump over to Java later on. The choice is yours, but thats my opinions and Vincent makes a good point.
    Aaron "Theiggsta" Kalin
    Pixel Martini
    Ruby and Rails Developer

  23. #23
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    I know C++ and VC++. Truth is, I don't like VC++ at all. It is too "Windows" for me. I like Perl but once again we are at that age old question.... Is pure OOP all it is cracked up to be? Is it a necessity? My humble opinion is no. So I don't need pure OOP right now, maybe later but not this instant.

  24. #24
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by voostind

    Besides, Python is friggin' ugly...
    why's that vincent?

  25. #25
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One reason is the syntax: using spaces to identify blocks. Whoever thought of that should be taken out and shot. It's very easy to make mistakes with that. (I know, because I've programmed in Haskell, which uses the same kind of syntax)

    Another reason is that Python isn't really an object-oriented only language, although many claim it is. It's a mix between a procedural language and an object-oriented language, just like Perl and PHP. Perl looks even worse than Python, or would you say Perl is nice to look at? Of the three PHP has the least weird syntax, and therefore looks best.

    Now Ruby, that's a beautiful language. OO only.

    In the end, it's all personal opinions of course, so you can safely disregard mine in this area

    Vincent


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •