Writing your own software for OSX

Posted:
in Mac Software edited January 2014
When i get my iMac, i'd like to get back into programming. I started in windows but it got obnoxious and GUI stuff was a mess and disugsting. To make it look great costed memory and performance, etc...



Anyhow, i don't know much about 'power-using' a mac yet but i assume all the tools we need are available?



Is there software i ahve to buy to program, ie: Visual Basic or C++ suites?



Does anyone have any suggestions where to start? Books, etc..? I'd like to wait a little bit for Tiger release so i can go head-first into 64-bit stuff.



Or should i just start now and overlap the new stuff?



Any suggestions welcome. thnx.

Comments

  • Reply 1 of 18
    Panther and Jaguar both came with XCode. You may need to install these from the OSX DVD. This also comes with tons of documentation, tutorials, sample development applications, etc. That's where I started, and it got me a long way. I like the book "Cocoa with Objective-C" as a two-for-one intro. It got me started with both relatively quickly.



    All the standard Unix tools are there, as well.
  • Reply 2 of 18
    before you buy anything, install the xcode tools cd that comes with your mac. (if it doesnt, create a free account at connect.apple.com and download everything you need)

    as for books, oreilly usually has pretty good ones so you might want to check them out. books by hillegass are quite popular among mac programmers too.
  • Reply 3 of 18
    thanks, i installed the xcode but it looked intimidating; i haven't stepped too deep yet, busy studying for college test on wed.



    is it a pretty hard language to learn?



    :c
  • Reply 4 of 18
    amorphamorph Posts: 7,112member
    Quote:

    Originally posted by cubedcompanies

    thanks, i installed the xcode but it looked intimidating; i haven't stepped too deep yet, busy studying for college test on wed.



    is it a pretty hard language to learn?



    :c




    If you're comfortable with both C and object-oriented development, Objective-C itself is pretty simple. It adds very little syntax to C, but the little bit it adds is incredibly powerful in actual use.



    Cocoa, like any API its size, has a pretty steep learning curve. You have to spend a certain amount of time getting used to the way it approaches things, and the naming conventions, and so forth — the same as you would for any large API. Personally, I find Cocoa much easier to handle than Java's elephantine and occasionally convoluted libraries (not to even mention the psychological scars I got learning VMS' C API). Once you "get" Cocoa, it's pretty easy to use.



    There are lots of good books on OS X programming. In no particular order: None of these are of the LEARN COCOA IN 30 DAYS OMG!!! class of tutorial. They're all solid tomes from veteran developers. The last volume is written by an Apple employee.



    If you poke around a bit in the online help, you'll find tutorials for building applications. Look in the help for NSDocument, for example.



    Good luck! Speaking for myself, Cocoa programming is fun.
  • Reply 5 of 18
    gongon Posts: 2,437member
    Uh, so...



    What kind of programming can you do already (languages, problem fields, ...) ?

    What kind of programming do you want to learn, or what kind of software you want to write?

    Do you have specific tool skills, preferences or requirements (IDE, editor, software engineering tools, ...)?



    It would be a lot easier to help you if you answered these questions first.
  • Reply 6 of 18
    Yea, I must say I dig programming in Cocoa for OS X. I've spent the last few years in school learning Java and C, and Objective-C takes these two great tastes and mixes them together. If you have a solid understanding of OO concepts and Java/C programming you shouldn't have a difficult time moving to Obj-C.



    Then there's Interface Builder. If it weren't for IB, I'd still be developing in Java. I just love being able to build my GUI through drag -n- drop. It's kinda like VB if you've played with that at all, except more powerful. You can wire up GUI actions like wiring a button to display a window with no code whatsoever.



    Interface Builder took me some time to get used to, just because the steps for subclassing / instantiating objects, creating actions / outlets, generating files, and writing files back to the XCode project aren't always intuitive. Still after doing this for a couple of days straight (thanks to Eric Tremblay's Cocoa programming class www.macdev.ca ) it's almost become 2nd nature.



    Not to say I make great looking GUIs, one look at my program will show you that \ but putting my GUI together was a virtual snap.



    I'd say to do the sample currency converter app in the Cocoa Tutorial to start with. Then grab Aaron Hillegass' book or any of the other books mentioned in this thread (heck, even Cocoa for Dummies is a good book) and work through that. As you do, write down your ideas for programs and try to build those as well.
  • Reply 7 of 18
    gongon Posts: 2,437member
    Quote:

    Originally posted by PBG4 Dude

    Then there's Interface Builder. If it weren't for IB, I'd still be developing in Java. I just love being able to build my GUI through drag -n- drop. It's kinda like VB if you've played with that at all, except more powerful. You can wire up GUI actions like wiring a button to display a window with no code whatsoever.



    Just interested - did you ever try Java interface builders like the one in Borland JBuilder? I had to do some work in JBuilder once and I remember it had an interface builder. This was about four, five years ago.
  • Reply 8 of 18
    Quote:

    Originally posted by Gon

    Just interested - did you ever try Java interface builders like the one in Borland JBuilder? I had to do some work in JBuilder once and I remember it had an interface builder. This was about four, five years ago.



    No, I hand-coded all my Java Swing UIs. In my GUI apps I probably write more GUI code when compared to actual "do something" code.
  • Reply 9 of 18
    brussellbrussell Posts: 9,812member
    I use RealBASIC, which is a lot like Visual BASIC for Windows. They even have a converter tool for moving projects from VB -> RB. RealBASIC is also cross-platform, so you can create software on the Mac that you can compile for Mac and Windows with minimal platform-specific tweaking.



    I'm sure it's not as elegant or efficient as Cocoa, but I knew BASIC and for what I needed it worked. (I'm a psychologist and create software to run experiments - the software is pretty simple and doesn't have really any user options.)
  • Reply 10 of 18
    Well,



    Well I've used: QBASIC (lol) > Pascal > VBasic (my favorite thus far) > C++ (light) > JAVA (college course) > PHP (light) > ASP (lighter) > and i think that's about it. Some other nonsense here and there but those are the core.



    I don't really have an objective to programming rather just to learn something more about another type of computer. I've done everything i wanted to on a PC.



    If I should get good, perhaps some small programs for the advertising industry, similar to iWork or what not.



    iLife-lite apps basically. Nothign too complex but acheives usefulness in my life.



    :c
  • Reply 11 of 18
    Just as a FYI, XCode allows you to program in a variety of languages and frameworks.



    You can code in the pure, command line environment in:



    C

    C++

    Objective-C

    Objective-C++

    Java (including Swing and AWT)

    AppleScript



    Or you can go for the Carbon environment (C++)



    or the Cocoa environment (Obj-C, Java, Obj-C++)



    Or there are bridges for Python, Ruby, AppleScript, and Perl for a semi-Cocoa environment.



    There are even setups that allow for Swing programming through the nice Apple tools, and maybe even QT (not QuickTime).



    There are even efforts to get Mono (an open source implementation of C# plus a sampling of the .Net frameworks) to be a first class platform on MacOS X.



    Basically you have an awful lot of choice all for free with MacOS X. The vast array of choices can be a bit daunting.
  • Reply 12 of 18
    in your opinion, what is the strongest most versital language to learn? if you have time, why i'd want to use one language over the other aside from JAVA.



    :c
  • Reply 13 of 18
    Apple has said in the past that they want new coding done in Objective-C using Cocoa and related frameworks. I believe Obj-C++ was added due to developer demand but I could be wrong on this point. They have said that Cocoa is the future of OS X programming.



    All I can say is is that I dig working with Obj-C & Interface Builder to build new programs. Each language has its own strengths so what language you learn depends on what you want to do. For general purpose OS X my pick is Obj-C. I'm not raking in the dough from my acclaimed award winning software so take my recommendations with a grain of salt.
  • Reply 14 of 18
    well if Apple wants Cocoa, it must be for good reason. I think i'll hold out and buy a book when Tiger strikes.
  • Reply 15 of 18
    PBG4 Dude: Apple has said that they encourage new applications to use Cocoa (as opposed to Carbon, or implicitly Swing, etc...), but they have made no recommendations on the language to be used. The two primary languages for Cocoa programing are Java and Obj-C (Obj-C is really a way of accessing existing C++ engines from existing projects... one way of bring in code from other platforms... including MacOS 9). Those tow languages seem to have equal support from Apple.



    What they are really pushing is the Cocoa frameworks, and the accessors in Java and Obj-C are as identical as they can be given the differences in the languages.



    If you already know Java, continue to use Java (unless you are creating First Person Shooters, then you need direct access to pointers, and most of your code is going to be in C with C++ or Obj-C wrappers around it). The big thing is to learn Cocoa-Java... Cocoa is a big umbrella with a lot of classes, methods, interfaces, and best practices to get used to. Learn it in a language you are familiar with, and then if you decide to move to Obj-C (or just learn it on the side) then you will have Cocoa under your belt and can concentrate on what makes Obj-C Obj-C.
  • Reply 16 of 18
    amorphamorph Posts: 7,112member
    Quote:

    Originally posted by cubedcompanies

    well if Apple wants Cocoa, it must be for good reason. I think i'll hold out and buy a book when Tiger strikes.



    If I were you I'd get a book now and get up to speed so that when Tiger hits, you won't need more than the new developer docs to catch up on the new features.



    Cocoa hasn't changed that much, you know. It's been around for a long time, and although Apple has been adding things and fleshing them out, the basic set of classes goes back to the 1980s.
  • Reply 17 of 18
    Ok fantastic.. i'll goto the bookstore after my test on Wed. and see what happens; can't have any distractions! :P



    gawd i wish i could get rid of this PC a bit quicker.
  • Reply 18 of 18
    Quote:

    Originally posted by cubedcompanies

    in your opinion, what is the strongest most versital language to learn? if you have time, why i'd want to use one language over the other aside from JAVA.



    What do you want to do? If you are mostly trying to create reports, or otherwise munging text files, the learn perl. Mostly doing statistical or other numeric/scientific work: learn fortan (otherwise stay away at all costs). Doing real-time or time sensitive work (first person shooters): C is your friend, C++ is your cousin. Working on large enterprise apps that have to have a hundred different interfaces: Java is the way to go. Trying to create a workflow to tie a number of different programs tother: take you pick from AppleScript, shell scripts, VisualBasic, or Tcl. Working on small web applications: PHP (or possible Biferno). Working on web portals to established Windows based proprietary applications (wit lots of DLL's) use ASP or ASP.NET. Working for the US AirForce: ADA all the way... (*sigh*). etc...



    The short of it is that there is no single language that works best in all problem spaces. Once you get going you should try an learn a whole lot of languages each one will teach you something else about programming (even if it is just that you never want to see another line of Lisp again in your life).
Sign In or Register to comment.