From scripting to compiling... I hope
October 2, 2006 6:59 AM   Subscribe

I've got a couple of ideas for useful computer applications, and having moved over to Mac, would like to develop them for OS X. However, I'm completely unfamiliar with developing stand alone programs (I pretty much only work in PHP, though occasionally Perl and have grazed Ruby and Python). Where would I start to learn how to create my own complied apps? C? C++? Any book or artcle repositories you all would suggest?
posted by Ikazuchi to Computers & Internet (7 answers total) 4 users marked this as a favorite
 
Nothing says that to develop stand-alone applications you need use a compiled language. When you say you work in PHP I'm guessing you mean in a web development environment... PHP can be used to write command-line apps as well. There are also various GUI bindings for PHP, Perl, Ruby and Python which allow you to develop programs with graphical interfaces. There are a lot of desktop programs out there which are mostly written in Python.

Given the speed of modern computers using an interpreted language won't set you back by much in terms of speed, unless you're writing something that really needs to be efficient. But if you do wish to write something in a compiled language, the easiest jump from PHP is perhaps Java (actually byte-compiled, but close enough). Beyond that, go ahead and learn C/C++ too.

Another option is to actually look for a compiler for the languages you already know... there is a commercial PHP one (Roadsend) and also an open source one that doesn't quite work yet.

Basically, its usually not very necessary to choose a language to use based on whether or not it can be compiled. Instead, look at what features the languages provide, and what you need or want, and go from there.

Have fun!
posted by destrius at 7:16 AM on October 2, 2006


Assuming you want to make programs that actually fit in with OS X well:
The traditional OS X option is to learn Objective-C with Cocoa. It's not that hard to get the hang of if you have a decent book to hand. There aren't that many people that can help you out with Objective-C though, so you may find it easier to take the Java route, which is also well supported by OS X. Then you can get any of the myriad books on that, and get support from Java programmers of other systems too.

You should check out Apple's dev site at developer.apple.com and sign up for a free account there.

Avoid C++. It handles objects in a different way to Objective-C, and you'll probably confuse yourself, even though the two can be used together in the form of Objective-C++. It's much better to just take the Objective-C route and stick to it.

I got my Obj-C book from O'Reilly. It's probably seen an update or two, but it's probably worth getting started on a few of Apple's tutorials from their website before digging in to a book as Apple has this habit of throwing more and more stuff into Cocoa which makes the programmer's life much easier, and some of the books still take you the older and harder way round things.
posted by edd at 7:38 AM on October 2, 2006


If you want to write apps for the Mac, Apple provides frameworks for much of what you'd want to get done. These are written mostly in Objective-C.

Sign up for a free Apple Developer Account, and poke around Apple's extensive tutorials, introductions, and guides. That'll give you a good introduction.
posted by voidcontext at 7:38 AM on October 2, 2006


Most "real" software development on OS X is done in Objective-C using XCode as the IDE.

This is pretty specialized stuff, since it's only useful for OS X development. You may be better served using Java since it's cross-platform.
posted by smackfu at 7:38 AM on October 2, 2006


Ikazucki, check out this thread, and this other thread, both on programming for the Mac.
posted by voidcontext at 7:43 AM on October 2, 2006


Most "real" software development on OS X is done in Objective-C using XCode as the IDE.

Most real software development on OS X is done in C and Objective-C, you mean. Just ask the QuickTime list or AppKit.
posted by secret about box at 11:08 AM on October 2, 2006


Ditto the sentiment that it's not inevitable that you must develop in a compile-to-binary language to write stand-alone desktop apps. Even if speed is important, it might still be perfectly acceptable to write most of it in a dynamically-typed interpreted language and write a couple of number-crunchy bits in C. But if it's important to you to not distribute the source, then you'll definitely want compile-to-binary.

So far as I know, all of Perl, Python, and Ruby ship with OS X by default these days. But different versions of OS X have different versions of the languages and their standard libraries. Trying to write code that works the same across all of these versions is trouble waiting to happen... but as someone who hasn't touched C in more than a decade, it's the trouble I'd choose.
posted by Zed_Lopez at 1:49 PM on October 2, 2006


« Older Is my ipod pushing up the daisies?   |   How can I easily get info on our networked... Newer »
This thread is closed to new comments.