views:

160

answers:

7

I am a "self taught" PHP programmer. So I've never taken any Computer Science classes. I've been doing more things via the command line lately and I'd really like to automate this a little more.

The problem is, I don't even know where to start. I know PHP. I can create web applications. I know how to do stuff on the command line. But I don't know the first thing about creating desktop applications. I need to learn how to create scripts that I can execute from the command line. Also, I need to learn how to create a GUI so I don't have to use the command line to execute the script (or even use a GUI to change variables, etc). I'm only interested in Linux and Mac OS X.

What would you recommend?

Update: I decided to start with creating a bash script and a php script and comparing which was easier to create for command line use. The bash script was much easier, even though I had to learn a new language. These tutorials made it easy to get started with bash:

It was nearly impossible to find a good tutorial on creating a php script for command line use so I guess from experience, I wouldn't suggest going that route.

I haven't started creating desktop applications yet but I'm thinking about looking into Python. I wonder how I can run my bash script from a Python Application...

Any other suggestions or advice on creating GUI desktop applications would be helpful.

+1  A: 

Python, and one of it's portable graphics GUI kits.

Will Hartung
Why Python? Can you give some more explanation?
Andrew
Because it's a decent language, easily approached, widely ported, and has decent bindings to GUIs.
Will Hartung
+1  A: 

PHP has GUI frameworks. Stick with what you know.

alt text

Cheeso
What GUI frameworks?
Andrew
GTK, for one: http://gtk.php.net/
Cheeso
+3  A: 

For scripting, I'd recommend going through a good resource on bash scripting. Here's a super-quick introduction to the subject. http://www.linuxconfig.org/Bash%5Fscripting%5FTutorial

For GUI programming, I personally prefer Python with wxPython. A Python tutorial is here: http://www.diveintopython.org/ and a guide to GUI programming with wxPython is here: http://wiki.wxpython.org/AnotherTutorial#The%5FwxPython%5FLinux%5FTutorial

If you want Mac-specific scripting AppleScript and Automator are useful in addition to shell scripting.

Chinmay Kanchi
You could have put your answers together. Python is a good language for scripting, and it's a (fair) language for GUI programming.
Chip Uni
+2  A: 

The Advanced Bash-Scripting Guide is, in contrast to its name, actually a perfectly good introduction to Bash scripting, especially if you already have a programming background.

wxPython is good for GUI work.

+1  A: 

Andrew --

You should look at the similar questions that have already been asked. The best answers have been brought to the following question:

What is the easiest language to start with?

You can find plenty of other suggestions if you search for programming-languages.

Good luck!

Chip Uni
+1  A: 

Have you considered using C# and Mono (the open-source implementation of the .NET Framework)?

With Mono, you can create console and GUI applications for Windows, Linux, and OS X.

Many popular (and some are base apps on Linux distributions) applications for Linux have been developed with Mono, including:

  1. Gnome Do launcher
  2. Beagle Desktop Search
  3. Banshee music player
  4. F-Spot image viewer

Also, if you learn C# and Mono, you can also use these same skills to write your own iPhone applications using Mono.

If you are a beginner and like to get started with Mono, start here.

Mick
+1  A: 

As someone with no formal training, you might have an easier time getting started with Lua. The main advantages are that

  • Lua was originally designed in part for petroleum geologists, so the syntax is readily accessible to people without formal training in computer science.

  • The system is small enough and simple enough that you can understand everything. This will enable you to spend more time coming up to speed on new concepts and new ideas.

  • There is an excellent book: Roberto Ierusalimschy's Programming in Lua; you can get the previous edition free online.

I've compared Python and Lua elsewhere.

Norman Ramsey