Thread: advice picking a toolkit

  1. #1
    Registered User
    Join Date
    Feb 2004
    Posts
    42

    advice picking a toolkit

    Hey there.. i have some projects in mind. I will use php as i am more fluent on it that i ever been in C or C++.
    Now, i need a toolkit to make some client side aplications and probably some fast development IDE.

    The options are:
    GTK (glade)
    XUL
    winbinder
    wxwidgets

    or i can use some other... wich one do you prefer and why?
    I will chose the one that's easyer to use...

  2. #2
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    you want to code a clientside application in a server side scripting language?

    why?

    gtk/gdk [ glade] perl, c, c++ languages only.

    XUL, Mozilla's java interface specification language. requires using the mozilla development tools and using either java or c/c++

    wxwidgets, a c++ widget set for c++ programming, there is limited support for python in wxwidgets.

    if you are seriously concidering using php to code a clientside application, you will need to put the php interpreter in as a requirement for use on the client system. only usually installed as a webserver module, and usually only on linux boxes.
    you will need to have cli scripting support installed as well for php, which is not the norm.

    an ide for developing in php.. only the commercial product from Zend.
    or code charge studio. [ also commercial ]
    both are limited to developing website scripts.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

  3. #3
    Registered User
    Join Date
    Feb 2004
    Posts
    42
    mm, jaqui... you should check out what you can do with php nowadays. It sounds like it has been a llooooooooooooong time since you checked on that.

    PHP is not a server side language, it's a general purpose language, that is writen in php.net in the front page.
    Nowadays nobody installs php as a server module, that is actualy getting deprecated.
    You can compile php code.
    If you compile it the PHP itself ( the interpreter ) is no longer requiered, obviously.
    You dont need to run it on a linux box.
    wxwidgets can be used with php, just as they are used in python.

    There is plents of IDE's nowadays with suport for php besides zend studio. Eclipse, kdeveloper, etc etc

    Code:
    gtk/gdk [ glade] perl, c, c++ languages only.
    ?????
    gtk can perfectly be used by php

    Anyway, why php? It's easyer, more programatic, it has more handy functions and i am more confrotable with it than i ever been with any other language.

    XUL requires the use of java or C/C++ ??? damn.

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by PedroTuga
    PHP is not a server side language, it's a general purpose language, that is writen in php.net in the front page.
    They can claim that they're a general-purpose language, but that doesn't make it right. PHP is heavily optimized for server-side processing. Sure, you can write client apps with it, but the simple requirement that every code file is wrapped by <%php ... %> should make it clear that this is, in fact, a use PHP was not originally intended for.

    Nowadays nobody installs php as a server module,
    Except everyone I know who uses PHP. (And believe me, that's a lot of people.)

    that is actualy getting deprecated.
    Where'd you hear that?

    You can compile php code.
    To executable code? Last I heard, the native PHP compiler was still highly experimental. The bytecode still needs the interpreter.

    If you compile it the PHP itself ( the interpreter ) is no longer requiered, obviously.
    Not at all obviously. Java, C#, Python, they're all compiled and still need the virtual machine.

    You dont need to run it on a linux box.
    Huh? PHP has been cross-platform for years.

    more programatic,
    What's that supposed to mean?

    it has more handy functions
    and no organization for them. I'd rather use Python.

    and i am more confrotable with it than i ever been with any other language.
    That, at least, is a good reason.

    XUL requires the use of java or C/C++ ??? damn.
    Nope, not really. If you have XULRunner, you can do most of your stuff in JavaScript.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Nowadays nobody installs php as a server module,
    Do you know a web server without PHP support?
    that is actualy getting deprecated.
    Deprecated, but everyone does it.
    You can compile php code.
    Which is not the point of it. (And as CornedBee said, it's still in beta testing and needs the interpreter).
    If you compile it the PHP itself ( the interpreter ) is no longer requiered, obviously.
    >>Not at all obviously. Java, C#, Python, they're all compiled and still need the virtual machine.
    That's one reason why they're slow.
    You dont need to run it on a linux box.
    >>Huh? PHP has been cross-platform for years.
    Yeah, it's running on my XP for two years by now.
    more programatic,
    Talk in English.
    it has more handy functions
    >>and no organization for them. I'd rather use Python.
    Umm... organization? I just use the functions, what's the organization for? You'd prefer it to be more OOP?
    and i am more confrotable with it than i ever been with any other language.
    >>That, at least, is a good reason.
    Sometimes I think it is too easy... but it's damn useful
    Last edited by maxorator; 11-13-2006 at 12:41 PM.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  6. #6
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Yes?
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by maxorator
    That's one reason why they're slow.
    I've seen both Java and C# programs beat C++ programs.
    But then, I've seen C++ programs totally blow away Java and C# programs.

    It depends. In my experience there is more speed to be gained by good programming practices and experience in C++ than in the VM languages.


    Python, now, is too dynamic to ever really contest the static languages. Although there are some extremely interesting advances in VM technology there, due to dynamic profiling and code rewriting. Virtual function calls, for example, can be faster in these languages than in C++ under some circumstances. (I would take careful profiling of many applications to find out how common these circumstances are.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #8
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    My choice is wxWidgets. I'm too lazy to explain...
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  9. #9
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    I've seen both Java and C# programs beat C++ programs.
    How can Java or C# interpreter interpret the java code to machine code faster than C++, if C++ already is machine code?
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  10. #10
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    How can Java or C# interpreter interpret the java code to machine code faster than C++, if C++ already is machine code?
    Err... C++ is not machine code. I think what CornedBee means is that it is not only the language and its interpreter/compiler/VM (etc) that counts, but also other factors such as the algorithms used (the choice and correct implementation of which comes from "good programming practices and experience"). Then there are certain optimisations that may be possible in such languages but which are less feasible in a language whose code is directly compiled to machine code, as was mentioned.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  11. #11
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I'd wager that some operations can be made very efficient on a "static" VM environment when compared to native compilers ability to optimize code. An application that relies heavily on these calls will necessarily beat native code whith less than desirable optimizations.

    Another thing is application usage as opposed to code performance. Most (I think) VMs use Just In Time compilation. This is an excellent time to compile. A lot more is known about the application state and optimization decisions, like function inlining for instance, can be more accurately made.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  12. #12
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    How can Java or C# interpreter interpret the java code to machine code faster than C++, if C++ already is machine code?
    I mean if you compile a C++ program, then it is machine code.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  13. #13
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    I mean if you compile a C++ program, then it is machine code.
    AFAIK, assembly/binary is machine code. C and C++ have a runtime environment just like C# or Java. The difference is that C and C++ RMs are part of the OS.

    I could be quite wrong, but I thought I read something like that somewhere. I'll try and find a link.
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  14. #14
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    C runtime doesn't do much. Only some functions like strcpy(), _beginthread and some other standard functions.
    I don't think there's a special runtime for C++.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  15. #15
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    You are quite wrong. You are all quite wrong. (Muahahaha!)

    First, the execution environment has nothing at all to do with the programming language. There are C interpreters. There's gcj, which compiles Java to native code. Whether a programming language is compiled or not is, unless the standard contains any requirements, solely a question of the implementation.

    That said, C and C++ are typically compiled to native code. They don't have runtimes as in "code that is necessary to even make sense of the stuff that's there". The executables are essentially in the same format as the OS kernel - a bit of management stuff here or there which the loader takes care of, but after the loading, which is done once, it's just a matter of sending the code as-is to the CPU.
    They do have runtimes in the sense of "libraries that just about every program uses and therefore must be present". Those are the C and C++ standard libraries.

    Java and C#, on the other hand, are typically compiled to a bytecode that makes no sense to the CPU at all. A runtime environment, a virtual machine, is necessary to act as a bridge. The VM can be a bytecode interpreter, a JIT compiler, both, or perhaps something else we've not yet invented.

    So that's how it works by default.


    Now for the speed issue. It's an interesting observation that the Sun Java 5 Hotspot VM tends to execute code faster than native binaries produced by gcj. Now, gcj has not, AFAIK, been a very well-tended product. In other words, it's far from as efficient it could be. But the VM has a few advantages it makes good use of that have to do with the inherently greater dynamicity (not a word, I know) of byte code.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Advice on C Programming with MSVC++ 2008
    By IT_Guy in forum Windows Programming
    Replies: 1
    Last Post: 03-06-2009, 04:23 AM
  2. Semaphores, need advice on implementation.
    By Swerve in forum C++ Programming
    Replies: 2
    Last Post: 01-13-2009, 01:54 AM
  3. File IO with .Net SDK and platform SDK
    By AtomRiot in forum Windows Programming
    Replies: 5
    Last Post: 12-14-2004, 10:18 AM
  4. girl friend advice (prob. the wrong place)
    By B0bDole in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 10-22-2004, 06:38 PM
  5. looking for advice on selling golf balls
    By lambs4 in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 05-30-2004, 04:03 PM