lamas
lamas

Reputation: 41

"Real" and non-embedded use of Ruby, Python and their friends

So I'm aware of the big ammount of general-purpose scripting languages like Ruby, Python, Perl, maybe even PHP, etc. that actually claim being usable for creating desktop applications too.

I think my question can be answered clearly

best regards, lamas

Upvotes: 3

Views: 498

Answers (7)

daotoad
daotoad

Reputation: 27194

The company I work for uses Perl and Tk with PerlApp to build executable packages to produce or major software application.

Perl beats C and C++ for simplicity of code. You can do things in one line of Perl that take 20 lines of C.

We've used WxPerl for a few smaller projects. We'd like to move fully to WxPerl, but existing code works, so the move has a low priority until Wx can give us something we need that Tk can't.

Python is popular for building GUI apps, too. You may have heard about Chandler. That's a big Python app. There are many others as well.

Ruby is also a suitable choice.

PHP is breaking into the world of command line apps. I am not sure about the power or flexibility of its GUI toolkits.

Upvotes: 6

Ven'Tatsu
Ven'Tatsu

Reputation: 3635

I would recommend you not try to look for a language that is best for GUI apps but instead look for the language that you like the most and then use that to write your app.

Ruby, Python, Perl all have GUI tool kits available to them. Most of them have access to the same often used tool kits like TK, GTK, and Wx. The look and feel of a an app will be dependent more on the GUI tool kit than on the language, and performance wise your likely to see more impact for how you write your app than language choice.

If your comfortable with C++ then you should also look at C# or Java as options. While not scripting languages they have many of the same benefits like memory management and more sane string implementations.

Upvotes: 2

bta
bta

Reputation: 45087

I have used a number of programs that were developed using scripted languages. Several embedded device vendors ship my group Windows-based configuration and debugging utilities written in TCL. Google's drawing program SketchUp has a lot of Ruby inside it (and users can create add-ons using Ruby). I have seen many Linux applications written in Python. There are many more examples out there, but often times finished applications are bundled up to the point where you can't really tell what's powering it on the inside.

Yes, there can be advantages to working with scripted languages. Some scripted languages make it easier to do specific tasks; for example, text processing is much easier (IMO) in a language like Ruby that has regular expression support and a robust String class than it is in plain old C. Generating a UI using a scripted language may make it easier to support multiple platforms, as all the platform-specific code is taken care of inside the language interpreter or pre-compiled libraries. For example, our suppliers who build TCL-based apps claim they can build the UI for an app using TCL in a fraction of the time it would take them to build it in C++ or VB, and then they can port it to Linux almost effortlessly.

On the other hand there are a few things that scripted languages typically aren't suited for, such as writing drivers or doing anything that requires low-level hardware access.

Most importantly, however, is this: modern languages have become quite powerful to the point where choice of language doesn't make as big of a difference as it used to be. Use the language you are most comfortable with. The learning curve associated with learning a new language will usually have a much larger impact on your project.

Upvotes: 1

Eric Strom
Eric Strom

Reputation: 40152

The languages you list aren't really scripting languages, as that tends to describe languages designed to work inside of a larger framework (like javascript) that provides its interface to the world. While you can certainly write scripts in those languages, each is a proper programming language (referred to as a dynamic or interpreted language, in contrast to compiled languages like C or C++).

There are many mature gui toolkits for creating desktop apps with interpreted languages. A search for any of those languages with "gui" on SO will yield many results.

The advantage of the languages you list are rapid development and concise code.

The advantage of compiled languages is mainly speed, and deeper ties with the internals of the operating system. But for most desktop apps, the ease of development in an interpreted language outweighs any small performance gains (unless you are writing a cpu intensive app, in which case, write the cpu heavy bits in C, and then call them from the interpreted language, which can handle the gui)

Many interpreted languages offer easy escapes to C or other languages (often with a nice inline syntax).

I would encourage you to take a look at some examples on http://rosettacode.org to see the fundamental differences between how programs come together with the languages you are interested in.

Upvotes: 4

klew
klew

Reputation: 14977

Some part of MPICH2 is written in Python. I didn't check everything, but many parts of it used for running mpi applications are written it Python. Maybe MPICH2 is not used by everyone, but for sure it is good piece of software.

Upvotes: 0

S.Lott
S.Lott

Reputation: 391992

http://www.pygtk.org/applications.html

Seems like a really long list of GUI applications in Python using just one of the frameworks.

Upvotes: 0

ChristopheD
ChristopheD

Reputation: 116267

Python (combined with PyQt) is a very solid combination for GUI desktop applications (note that while QT is LGPL, PyQt (the Python bindings) is dual licensed: GPL or commercial).

It offers the same (GUI library-wise) as Qt on C++ but with Python's specific strenghts. I'll list some of the more obvious ones:

  • rapid prototyping
  • extremely readable (hence maintainable) code

Should I stick with C(++) for desktop apps?

In general: no, unless you want to / need to (for a specific reason).

Upvotes: 3

Related Questions