

Ask YC: What do you use to develop applications for Macs? - ciscoriordan

What tools do you use to develop applications for Macs? When developing on Windows, I've used Microsoft's .NET platform and Visual Studio. Now that I have bought a Mac, I want to become familiar with Mac dev tools. What are Apple's counter parts to .NET and Visual Studio?
======
tlrobinson
OS X has some great development tools and frameworks.

First of all, Xcode comes with gcc, gdb, make, and all the other usual Unix
developer tools. And of course PHP, Python, Perl, Ruby, Java (and others?)

But for GUI applications Cocoa is an excellent API built on a great language,
Objective-C. Objective-C is a thin layer on top of C that adds very dynamic
object oriented features (actually somewhat similar to Ruby). It might take a
little while to get used to the syntax, but it's actually quite readable and
pleasant.

Cocoa is pretty verbose, but between the named parameters (sort of) and
verbose API names, it ends up being _very_ readable code, almost like you're
reading sentences of English. Some people don't like it, especially at first.

Apple has lots of documentation for iPhone devs too, which is also useful for
new OS X devs. In particular:

* The video entitled "iPhone Application Development - Getting Started" @ <http://developer.apple.com/iphone/index.action>

* [http://developer.apple.com/iphone/gettingstarted/docs/object...](http://developer.apple.com/iphone/gettingstarted/docs/objectivecprimer.action)

More detail on Objective-C:
[http://developer.apple.com/documentation/Cocoa/Conceptual/Ob...](http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/)

And Cocoa:
[http://developer.apple.com/referencelibrary/GettingStarted/G...](http://developer.apple.com/referencelibrary/GettingStarted/GS_Cocoa/index.html)

------
makecheck
Xcode and vim for editing, Perl and Python for automation.

The nice thing about Xcode is that when you don't need or otherwise want to
avoid the GUI integration, you can: build rules can run anything you want,
like a makefile or other script, and even show you the raw output in a
terminal-like split view. Apple provides command-line access
(/usr/bin/xcodebuild) for those cases where you want to start with an IDE-
style project but still have direct build control from outside scripts. I've
only dabbled in VS2005, but Microsoft's environment never seemed "avoidable"
in the same way. The GUI tangled with every aspect of the project. It was so
awkward that I once cranked open "vim" from Linux (over SSH) to edit raw
VS2005 XML, and it was much faster than tweaking the project through the GUI!

Speaking of "vim", I often use this for editing on Mac OS X. It depends on the
type of edit, I suppose; Xcode has some strengths (e.g. pulling a whole
function out is easier with the mouse, and I often do edits based on project
search results). But "vim" is deceptively simple, and is ideal for many kinds
of edits. It has some pretty addictive features, like simple paren-matching
with "%" even when in the middle of a function name.

It's _really_ nice that Mac OS X ships with many scripting languages, because
your project can depend on them. For instance, you can automate many tasks in
Python and Perl, and other Mac developers can still build your code without a
headache. Windows sucks for this; if you share a bunch of code that's heavily
automated with scripts, odds are people will have to download and build all
the interpreters you're using (and of course, you probably need a batch file
to run it, because #!/usr/bin/perl is meaningless to Windows). It's just a
completely different environment...I find Mac development infinitely more
productive for many reasons but the Unix tool set _alone_ is an unbelievable
starting point.

------
frankus
The short answer is XCode, which comes on the OS install disk as an optional
install (called something like "Developer Tools").

The long answer is that unless you're porting an existing C++ app, you'll want
to learn Cocoa if you want to write GUI apps. It's both the only supported
64-bit API, and what the iPhone uses. There are bindings for Ruby and Python,
but the native language is Objective-C. There's also a semi-supported Scheme-
like language called [Nu](<http://programming.nu/>).

The [Purple Newfie]([http://books.google.com/books?id=ns6tB-
uXuxcC&dq=learnin...](http://books.google.com/books?id=ns6tB-
uXuxcC&dq=learning+cocoa+with+objective+c&pg=PP1&ots=kBxjE38vkz&sig=R3cFCQq96aPdC8-uRCImtaK0-Uk&hl=en&prev=http://www.google.com/search?client=safari&rls=en-
us&q=learning+cocoa+with+objective+c&ie=UTF-8&oe=UTF-8&sa=X&oi=print&ct=title&cad=one-
book-with-thumbnail)) book is pretty good for going the Objective-C route, but
quite dated at this point.

Once you've worked through the book, you might play around with Core Data
([http://developer.apple.com/documentation/Cocoa/Conceptual/Co...](http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/index.html))
and Cocoa Bindings
([http://developer.apple.com/documentation/Cocoa/Conceptual/Co...](http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/)),
which the book totally doesn't cover but are very cool for rapid development.

And if you're deranged like me you might enjoy just randomly playing around
with Interface Builder first to get a feel for what's possible without too
much coding.

------
run4yourlives
Whoa, stop right there.

Mac is very similar to Linux in the way most users approach the dev.
environment. That is: souped up editors in favour of full IDE's. That being
said XCode (from apple) would be the VS of the mac world for cocoa apps. Of
course Eclipse is present as well.

Most popular and "macish" though is text-mate. That's what all the cool kids
use.

Having moved from windows previously, I can tell you that the level of
integration and features from VS and the like is not found on either Mac or
Linux. That will take some getting used to, but I've found that it's not too
much of a big deal once you get over the initial shock.

------
nuggien
When I used windows, it was emacs. When I used solaris in college, it was
emacs. When I use linux at work, it's emacs. So obviously when I use my mac at
home, it's emacs. Emacs now and forever.

------
wheels
XCode.

If you're using VisualStudio on Windows, XCode is what you'll want on Mac. The
other comments here about Emacs and whatnot aren't really relevant because if
you were a die-hard Emacs / CLI guy you'd be using them on Windows too.

~~~
dous
I actually use Emacs for editing code on Windows when I work on Python or Ruby
stuff. :)

I don't really use .Net or VS but yes, I agree that he should definitely take
a look at Xcode.

------
johnm
If you're actually building Mac-specific applications then XCode should be in
the loop since it can help a lot with the Mac-specific shme.

If you're developing web applications or anything portable then use whatever
you like. You can find for Mac versions of the standards: Emacs -> Aquamacs,
Vim -> MacVim, etc.

There are some Mac-only development tools in various categories so you might
want to check out sites like MacUpdate, Macworld, MacMerc. For example, if you
pair program with others, definitely check out SubEthaEdit.

------
dfranke
Haven't used a Mac in a couple years, but when I did: XCode for writing native
programs, Aquamacs for everything else.

------
dous
Xcode to organize the project, Emacs for editing, Make (with targets that use
xcodebuild to do the actual building and stuff).

It's kinda weird, I know, but I just prefer to use Emacs for editing instead
of Xcode.

~~~
Zak
That doesn't seem weird to me at all. I recently had to work on a project
involving PHP and couldn't find a good PHP mode for Emacs (any suggestions, in
case I have to do it again?). I ended up doing some of it in another editor
and was constantly trying to use Emacs keybindings. It's hard to go to
anything else when you're hooked on Emacs.

------
silencio
xcode. textmate if you want a very sweet programmers editor on steroids.

depending on what you do though that may not be the answer. lots of ways to
develop for mac. is there something in particular you had in mind? xcode is
the absolute wrong answer for some things (like java, _ducks flames_ ).

------
zealog
For developing apps that run on a Mac, XCode.

For web apps being written on a Mac, TextMate.

------
breily
Vim

------
menloparkbum
xcode + emacs

