#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2007
    Posts
    113
    Rep Power
    8

    What programming language should I use?


    Hello,

    I need a quick pointer for a suitable programming language to learn.

    I need something that I can use for developing PC-located applications with a graphical user interface.

    Example applications:
    - text editor
    - upload/download assistant (to be used by users of my community website to interact with their account or with other site users from their PC)
    etc.

    I am coming mainly from a PHP server-scripting background.

    I have looked into C++ a few times in the past, but something that repeatedly has been a stumble block for me in C++ is how to create GUIs. So this time I am looking for something simpler than C++.

    A programming language that:
    - is suitable for producing executables
    - won't require any special interpreter to be installed on a person's PC for the programs created to run
    - is suitable and easy to use for creating GUIs

    Thanks.
  2. #2
  3. Moderator Emeritus
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Austin, TX
    Posts
    7,188
    Rep Power
    2265
    If the PC's you're working with are all running Windows (and as much as it pains me to say this) I'd recommend looking into Visual Basic. It'll allow you to tap into all of the Windows API calls, meaning you can rapidly create the functionality you mention in your post. There are drag-and-drop features in Visual Studio that will get you up and running w/ the specs you want quickly. The downside to this approach is any development "skills" you pickup using VB / VS to create Windows apps won't easily translate into other areas. But, you'll be able to work pretty quickly.

    If you're working in an environment where the OS isn't 100% Windows, your best bet is to go the Java route, allowing you to create a GUI-based application which will run on multiple OSes. The upshot to using Java is the development skills you learn will be very useful in a variety of other environments; the downside is creating the functionality you mention will take a bit longer.

    Hope that helps...
    DrGroove, Devshed Moderator | New to Devshed? Read the User Guide | Connect with me on LinkedIn
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    My language of choice is Python. It is both easy to learn AND easy to use. These are not the same thing - VB is easy to learn, but is a pain to develop programs of more than moderate size or complexity.

    Python has a choice of GUI frameworks - the most popular are Qt and wxPython, both of which have GUI designers available. It is an interpreted language, but there is a program called py2exe which will bundle the interpreter and your code into a single installable application.

    There is also IronPython which runs on .Net. The .Net runtime should be installed by default on Windows systems from XP SP2 onwards so should not need to be downloaded by most of your users.

    As drgroove says, there is also the Java option. Personally I dislike Java the language, but there are a lot of alternative languages that run on the JVM including Jython (yep, Python again). I am currently looking at Clojure, which is an implementation of Lisp on the JVM. Lisp is not to everyone's taste, but it is an incredibly powerful language, in many ways even more so than Python. Other popular JVM languages include Scala and JRuby. IMHO all of them are better languages than Java, and they all give you access to the huge set of libraries that are available to Java.

    Dave
  6. #4
  7. Moderator Emeritus
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Austin, TX
    Posts
    7,188
    Rep Power
    2265
    DevCoach, you can always be counted on to recommend Python

    Well, if we're going to go the 4GL route, and you already know PHP, for that matter you could use the GUI facilities available for PHP, and stick with what you know. Frankly, I see little reason to learn another 4GL language (PHP, Ruby, Python, Perl, ColdFusion, ASP) if you already know one.

    Knowing one 4GL language is great, for purposes of rapid web development. However, at some point you're going to have to learn a more (dare I say) powerful language, be it C, C++, Java, or (again, as much as I hate to recommend anything Microsoft) VB. Why? Because at some point you'll hit a brick wall with the 4GL language, and you'll need to know another language.

    In this case, the brick wall is GUI development. Sure, you can do GUI development with Python. You can also do GUI's with PHP. I wouldn't recommend it, though, for a litany of reasons.

    tcjohans, it's time to expand your horizons a bit, and learn a more powerful language. Personally I'd go w/ Java or C++, but if you're under a tight deadline, and working in a 100% Windows shop, you might as well aim for VB.

    No offense, DevCoach - I think Python is great, too, but you know what they say... if all you have is a hammer...
    DrGroove, Devshed Moderator | New to Devshed? Read the User Guide | Connect with me on LinkedIn
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    Originally Posted by drgroove
    Knowing one 4GL language is great, for purposes of rapid web development. However, at some point you're going to have to learn a more (dare I say) powerful language, be it C, C++, Java, or (again, as much as I hate to recommend anything Microsoft) VB. Why? Because at some point you'll hit a brick wall with the 4GL language, and you'll need to know another language.
    I think we have profoundly different definitions of "powerful". I like to stick with the definition from physics - work done per unit of time.

    By that definition a more powerful language is one that lets you get more done in the same time. Studies have shown that once a programmer is proficient in a language he will code at about the same number of lines per day, regardless of the language used. This means that a language that is more expressive and takes fewer lines of code to implement the same functionality is, by definition, more powerful than one that takes many more lines. By this measure languages like Python or Ruby are more powerful than C++ or Java, typically by about a factor of 5.

    I am curious as to your definition of language power, and the reasons that C++ and Java are more powerful than the likes of Python or Ruby.

    Originally Posted by drgroove
    In this case, the brick wall is GUI development. Sure, you can do GUI development with Python. You can also do GUI's with PHP. I wouldn't recommend it, though, for a litany of reasons.
    I have done quite a bit of GUI development with wxPython and not had any problems. I would be interested in hearing your litany of reasons.

    I agree with the comment "if the only tool you have is a hammer..." - I think any serious programmer should learn a wide range of languages. I have programmed professionally in C, C++, Java, Assembler, Perl, Python and several other languages, and learnt several more for my own interest. I am not claiming that Python is the best or only language that you should use, but in my experience it is the one I find the most productive. I think Ruby is similarly productive, but is so similar in scope to Python that I don't have a compelling reason to switch.

    Clojure is interesting because it can combine the productivity of a dynamic language with the runtime efficiency of Java.

    Dave
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2005
    Location
    Bay Area, California
    Posts
    841
    Rep Power
    1682
    On this side note, I would argue that a language like Python has a bell-shaped productivity curve. While it is better at the small scale, it does become less productive as the development team becomes larger. The performance issues, such as its poor concurrency support, can become an issue. The weak typing provides rich expression support easily, but does make it harder to have a contract-first model which can mean refactoring becomes more challenging.

    Much of the expressibility is possible in a language like Java, too, if the libraries (utilities, frameworks) are written well. The productivity gains are there at the beginning and when little thought to the design is made, but do drop off and can be matched with thoughtful development. And that's the rub, most development is done
    haphazardly leaving it to others to clean-up the mess.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    Originally Posted by NovaX
    On this side note, I would argue that a language like Python has a bell-shaped productivity curve. While it is better at the small scale, it does become less productive as the development team becomes larger. The performance issues, such as its poor concurrency support, can become an issue. The weak typing provides rich expression support easily, but does make it harder to have a contract-first model which can mean refactoring becomes more challenging.
    Do you know this from experience on working on large Python projects, or is it a hypothesis? I have worked on a sizeable Python project (~250,000 lines of Python code, a dozen or so developers) and have not found it to be a problem.

    Also what is a large project in Java is only a medium sized project in Python - the 250,000 lines of would be 1 million+ lines of Java, and probably would need a much bigger team to develop.

    I agree that the performance of Python is not as good as Java so would not use pure Python for high performance number crunching. But for most things I have found it to be good enough. It is also easy to mix Python with C or C++ for the performance critical parts - Python is widely used in the scientific community and for movie CGI generation.

    I agree that Python threading does not make good use of multi-core systems, at least for the C implementation - IronPython and Jython do not have issues. Anyway threads are not a good answer to concurrency, either in Python or Java. In many cases it is better to spawn multiple communicating processes and there are plenty of Python libraries to do that.

    Originally Posted by NovaX
    Much of the expressibility is possible in a language like Java, too, if the libraries (utilities, frameworks) are written well. The productivity gains are there at the beginning and when little thought to the design is made, but do drop off and can be matched with thoughtful development. And that's the rub, most development is done
    haphazardly leaving it to others to clean-up the mess.
    Good libraries can help to some extent, but can only go so far if the language itself is inherently bloated. Besides dynamic languages hosted on the JVM can use the same libraries but in a more expressive way.

    Dave
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2007
    Posts
    113
    Rep Power
    8
    Thank you for the great feedback, all!

    Python with wxPython, Java, C++ and Clojure all sound interesting, and I will check up all of them in a little more detail before I decide.

    In case I do go for C++ or Java, does anyone know if there happen to be any good, easy-to-use, and free libraries around for GUI development for these languages?

    By the way, I am developing on Windows Vista, if that is relevant.
  16. #9
  17. Moderator Emeritus
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Austin, TX
    Posts
    7,188
    Rep Power
    2265
    Originally Posted by tcjohans
    Thank you for the great feedback, all!

    Python with wxPython, Java, C++ and Clojure all sound interesting, and I will check up all of them in a little more detail before I decide.

    In case I do go for C++ or Java, does anyone know if there happen to be any good, easy-to-use, and free libraries around for GUI development for these languages?

    By the way, I am developing on Windows Vista, if that is relevant.
    I'd recommend Java + SWT (sent you a private message regarding this); you can use Eclipse as your IDE. All free, very powerful. Plus, the skills you learn coding Java and SWT will actually come in useful in your career, as many companies leverage Java + SWT for enterprise GUI development.
    DrGroove, Devshed Moderator | New to Devshed? Read the User Guide | Connect with me on LinkedIn
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2009
    Posts
    127
    Rep Power
    13
    For quick GUI dev as a PHP user, try VB. I know a load of languages to varying degrees (python, C++, bash script, visual basic, PHP, C, PASCAL, FORTRAN, BASIC, Action Script 3, Javascript, 6502 assembly...) but when I need to prototype a GUI thing fast on Windows, I use VB.

    Comments on this post

    • drgroove agrees : the path of least resistance :D

IMN logo majestic logo threadwatch logo seochat tools logo