Professional Web Applications Themes

Becoming a Macintosh Programming Guru [C++ & how?] - Mac Programming

Hello All, I'm interested in becoming the best damn source of info in my group for Macintosh programming questions. What would you reccommend? Please, no Cocoa discussion as my company is a cross-platform company and our programmers are primarily Windows people. I admit that it may be a great way to develop apps on the Mac, but it is not an option here. I'm a 85% Mac/15% Win programmer at my company working with networking, powerplant, preemptive threads, cross-platform classes, etc. I read the carbon discussion list trying to comb out the useful info for my company as well as ...

  1. #1

    Default Becoming a Macintosh Programming Guru [C++ & how?]

    Hello All,

    I'm interested in becoming the best damn source of info in my group
    for Macintosh programming questions.

    What would you reccommend? Please, no Cocoa discussion as my company
    is a cross-platform company and our programmers are primarily Windows
    people. I admit that it may be a great way to develop apps on the Mac,
    but it is not an option here.

    I'm a 85% Mac/15% Win programmer at my company working with
    networking, powerplant, preemptive threads, cross-platform classes,
    etc.

    I read the carbon discussion list trying to comb out the useful info
    for my company as well as the headlines of these newsgroups
    (comp.sys.mac.programmer.*).

    I look at macdevcenter once and a while and I do not see a lot of
    activity - I'm thinking of subscribing to mactech as well.

    But, what do people reccommend? For "Mac" books I have the Carbon
    Programming book, The Ultimate Mac Programming book (circa 1995), Mac
    Programming FAQs, Codewarrior books, PowerPlant books, as well as
    other non-mac programming books.

    Anyway, hopefully I can generate some discussion that will help others
    as well.

    Thanks,
    Lyndsey
    Lyndsey Guest

  2. #2

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <google.com>,
    com (Lyndsey Ferguson) wrote: 

    One method that I've regularly used for the past 16.5 years is to make
    sure I read all of the Tech Notes. These provide not only information
    about solving particular problems, but often insight into less obvious
    areas of the OS and how they can be brought to bear on problems.

    I can't tell you the number of times I read something in a Tech Note and
    then less than a month later it was the exact solution I needed!

    Apple developer web site now has a Tech Note and Q&A "What's New"
    section. I check them both at least once a month:
    <http://developer.apple.com/technotes/indexes/whatsnew0.html>
    <http://developer.apple.com/qa/indexes/whatsnew0.html>

    At the same time, I also check the main sample code page for new or
    newly revised sample code that might be of interest:
    <http://developer.apple.com/samplecode/>

    Even as an "insider" at Apple, these notes often distill the information
    in such a way it is easy for a novice in a particular area to get
    started. Joe Bob says check 'em out!
    Tom Guest

  3. #3

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <google.com>,
    com (Lyndsey Ferguson) wrote:
     

    I recommend you do what I do :-D

    Seriously, my knowledge comes from:

    1. Keeping up on technotes and Q&As
    2. Reading most questions and answers on this NG (and related groups), even if I
    only answer a few.
    3. Keeping up on Apple's doentation (I try to skim everything, so that I at
    least know where to look for answers when answers are needed)
    4. Reading all CW release notes
    5. Writing code
    6. Reading all the top-notch C++ books I can lay my hands on and applying them
    to what I do

    I don't read the Carbon list regularly, as it is high-volume, but I am
    subscribed to it and look at the subject lines from time to time to see if
    there's anything interesting going on.
     

    MacTech is not as useful as you might think, but the subscription is not that
    expensive, so you can pay for a year and see how you like it (or you can look at
    the archives).

    I learned a lot by going to MacHack in the past.

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  4. #4

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    dans l'article google.com, Lyndsey
    Ferguson à com a écrit le 11/11/03 17:24:
     

    Is this because Cocoa requires Objective-C ? If it is, it's interesting to
    see that I'm not the only one in this group to think that Objective-C slows
    down Cocoa adoption, especially in a multiplatform context.

    Eric

    Eric Guest

  5. #5

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <BBD6DCA8.151AC%fr>,
    Eric VERGNAUD <fr> wrote:
     

    This is ridiculous...the point is that the Cocoa API would have to be
    ted on other platforms, and its not...whereas, for instance,
    PowerPlant does te a similar API on Mac and Windows.

    Let's face it, Cocoa is easy because there are so many convenience
    functions...Obj-C or Java help prevent errors, but the API is what helps
    developers get a lot done in a little bit of code.

    --
    |\/| /| |2 |<
    mehaase(at)sas(dot)upenn(dot)edu
    Mark Guest

  6. #6

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <upenn.edu>,
    Mark Haase <net> wrote: 

    Yep, and if you aren't using a "cross platform" framework then you are
    going to have to develop your own best way to deal with your UI/event
    code on the two platforms.

    In a similar way, MFC/COM is likewise a pretty difficult match going
    from Windows->Mac.

    Applications that make heavy use of MFC/COM for their UI, but have a
    large core of raw C/C++ would probably move easiest/fastest/best by
    factoring the UI from the core as much as possible and using MFC on
    Windows and Cocoa on the Mac side.

    Applications with less of an MFC bent will probably find Carbon and its
    event model a good impedance match to Windows and its event handling.
    Tom Guest

  7. #7

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    Eric VERGNAUD <fr> wrote in message news:<BBD6DCA8.151AC%fr>... 
    >
    > Is this because Cocoa requires Objective-C ? If it is, it's interesting to
    > see that I'm not the only one in this group to think that Objective-C slows
    > down Cocoa adoption, especially in a multiplatform context.[/ref]

    Yes, I can say that learning an additional language is an obstacle. I
    consider the attitude of many of our Windows programmers to be quite
    reluctant to do Macintosh programming. I used to be the same when it
    was necessary for me to write Windows code - but now I love being able
    to write cross-platform code.

    If these programmers are forced to learn an additonal language - they
    are going to do a bad job of the implementation because they are going
    to be throwing it together haphazardly. If our shop is a C++ shop and
    the core of our app is written using C++ as well as the Windows side
    and currently the Macintosh side, it seems to me to be like throwing a
    wrench into the machine if you force Objective-C on the Macintosh.
    We do not have an even team of Mac/Win programmers, we have
    programmers who have percentages of work that they do on both
    platforms.

    Lyndsey
    Lyndsey Guest

  8. #8

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    Thanks Tom & Miro,

    I also read the latest ADC news looking for new doentation to read.
    What about any new "must have" books? I have bookmarked the technical
    notes page and the sample code page and plan to make that a stopping
    point as well.

    Lyndsey
    Lyndsey Guest

  9. #9

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <BBD6DCA8.151AC%fr>,
    Eric VERGNAUD <fr> wrote:
     

    Cocoa has a Java API as well. Unfortunately.
     

    Cocoa adoption is slowed down only by stupid developers. They make
    choice not based on technical merit, but on what everyone else is using.
    Widespread adoption of C++, a completely crap OO language, hurts far
    more than it helps. That Apple felt a need to add Java, a merely bad OO
    language, support to Cocoa (and cripple WebObjects by going Java-only)
    is evidence they recognize this sad state of affairs. ObjC does just
    fine on multiple platform, and much of Cocoa is implemented by GNUstep.
    Anyone who blames ObjC, a most *minor* of extensions to give C OO
    support, for anything needs to first look at their own OO skills and
    their own corporate mono-language structure.
    Doc Guest

  10. #10

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    dans l'article supernews.com, Doc
    O'Leary à com a écrit le 12/11/03 16:40:
     
    >
    > Cocoa has a Java API as well. Unfortunately.

    >
    > Cocoa adoption is slowed down only by stupid developers. They make
    > choice not based on technical merit, but on what everyone else is using.
    > Widespread adoption of C++, a completely crap OO language, hurts far
    > more than it helps. That Apple felt a need to add Java, a merely bad OO
    > language, support to Cocoa (and cripple WebObjects by going Java-only)
    > is evidence they recognize this sad state of affairs. ObjC does just
    > fine on multiple platform, and much of Cocoa is implemented by GNUstep.
    > Anyone who blames ObjC, a most *minor* of extensions to give C OO
    > support, for anything needs to first look at their own OO skills and
    > their own corporate mono-language structure.[/ref]

    I should have known this was a guru-driven list.

    Some show up, like Doc, others hide, saying facts are not facts.

    Good luck !

    Eric

    Eric Guest

  11. #11

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <google.com>,
    com (Lyndsey Ferguson) wrote:
     

    Are you aware of Apple's Objective-C++ compiler, which allows you to mix
    Objective-C and C++ code? This is used, for example, in Apple's WebCore,
    which wraps KHTML in ObjC code to make it available for Cocoa programs.

    ObjC the language is extremely simple. It consists of about ten extra
    keywords on top of C, and if you're already familiar with C++ it should
    go very quickly since you're already familiar with a lot of OO concepts.
    Of course you may not start producing very good code right away. But
    only your code which talks to Cocoa has to be ObjC, the rest can be C++
    without any trouble. I have not personally used the ObjC++ compiler for
    anything beyond very small projects, but it seems to work very well.

    So, I think ObjC ought not to be an obstacle, although you will have
    your own opinion, of course. And Carbon's API may be more suitable to
    you anyway, given its similarity with Win32.
    Michael Guest

  12. #12

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <supernews.com>,
    Doc O'Leary <com> wrote:
     

    Why is this unfortunate? I say, the more languages the merrier! Do you
    also lament the existance of PyObjC and all of the other language
    bridges out there? Nobody's forcing you to use any of them.
    Michael Guest

  13. #13

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    Lindsey,

    As a matter of fact, it is feasible to connect a C++ framework to Obj-C
    Cocoa. I've just done it. It's not complete yet, but it's 100% Cocoa, it
    works, with only 6000 lines of Obj-C code, and follows the architecture
    described in Apple's CocoaInCarbon samples (although I'm using CW 8.3 to do
    the job, and a static library for the Obj-C part, which I couldn't manage
    with PB).

    I strongly recommend using Cocoa, since the Cocoa UI framework is much
    closer to Windows GDI than Carbon is, and much safer too IMHO. NSViews are
    pretty much like HWNDs, and they handle all the necessary clipping etc...
    when drawing, much better than HIViews do (their Carbon counterpart). I
    handle all the drawing using Quartz in C, Quartz being the underlying
    graphics engine of Cocoa, which is much more powerful than Quickdraw, and
    more powerful than Win32 GDI. You can use Quartz with Carbon, but it's a
    pain, since a huge part of Carbon was primarily designed for Quickdraw. So
    the only Obj-C code I have is for Cocoa UI objects (windows and controls)
    and threads.

    But above all this, I'd say the event model is much easier to deal with for
    Windows programmer, since it's a preemptive model rather than a polling
    model like Carbon. For example, you don't need a mouse tracking loop in
    Cocoa as you do in Carbon, your custom NSView simply receives a mouseDragged
    message, very similar in concept to the WM_MOUSEMOVE message you get in a
    HWND proc with a SetCapture.

    If you can think of this job as creating a C library that handles the
    C/Cocoa conversion, it's a one man's task, so other programmers won't have
    to learn Obj-C to start with (although I strongly recommend that they do on
    the long term).

    Eric
     
    >>
    >> Is this because Cocoa requires Objective-C ? If it is, it's interesting to
    >> see that I'm not the only one in this group to think that Objective-C slows
    >> down Cocoa adoption, especially in a multiplatform context.[/ref]
    >
    > Yes, I can say that learning an additional language is an obstacle. I
    > consider the attitude of many of our Windows programmers to be quite
    > reluctant to do Macintosh programming. I used to be the same when it
    > was necessary for me to write Windows code - but now I love being able
    > to write cross-platform code.
    >
    > If these programmers are forced to learn an additonal language - they
    > are going to do a bad job of the implementation because they are going
    > to be throwing it together haphazardly. If our shop is a C++ shop and
    > the core of our app is written using C++ as well as the Windows side
    > and currently the Macintosh side, it seems to me to be like throwing a
    > wrench into the machine if you force Objective-C on the Macintosh.
    > We do not have an even team of Mac/Win programmers, we have
    > programmers who have percentages of work that they do on both
    > platforms.
    >
    > Lyndsey[/ref]

    Eric Guest

  14. #14

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <supernews.com>,
    Doc O'Leary <com> wrote:
     

    But worry not -- sage advice from Doc O'Leary will counteract all that stupidity.

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  15. #15

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <google.com>,
    com (Lyndsey Ferguson) wrote:
     

    In C++ and OOP land, there are a bunch of must-have books. I am not aware of any
    in Mac land.

    Also, at some point you may become interested in learning stuff because it
    attracts you, rather than for the sole purpose of fending off incompetence and
    ignorance at work, in which case there are a bunch of books I consider essential
    to a well-educated software engineer.

    That's probably because Cocoa is designed so well that it doesn't need
    doentation, Carbon is dead so nobody needs it doented, and C++ is hard
    (let's go shopping) so it needs thick volumes of arcane lore. ;-)

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  16. #16

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <BBD82323.15263%fr>,
    Eric VERGNAUD <fr> wrote:
     

    Carbon's event model is preemptive and doesn't use a mouse tracking loop.

    You're thinking of WaitNextEvent loops, which are strongly discouraged
    for new code.

    -Eric

    --
    Eric Albert edu
    http://rescomp.stanford.edu/~ejalbert/
    Eric Guest

  17. #17

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    dans l'article stanford.edu, Eric Albert
    à edu a écrit le 12/11/03 19:07:
     
    >
    > Carbon's event model is preemptive and doesn't use a mouse tracking loop.
    >
    > You're thinking of WaitNextEvent loops, which are strongly discouraged
    > for new code.
    >
    > -Eric[/ref]

    No, I'm thinking of TrackMouseLocation, which blocks your application, and
    polls events until the mouse is released. I agree it's not a mouse tracking
    loop from , but it's equivalent. And it's not preemptive.

    Having dealt with this particular case in the opposite way (porting Mac code
    to windows), I found that it leads to big differences in coding. The Cocoa
    model is much closer to the Windows model.

    Eric.

    Eric Guest

  18. #18

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <BBD84340.1542E%fr>,
    Eric VERGNAUD <fr> wrote:
     
    > >
    > > Carbon's event model is preemptive and doesn't use a mouse tracking loop.
    > >
    > > You're thinking of WaitNextEvent loops, which are strongly discouraged
    > > for new code.[/ref][/ref]
     

    Well, a) you don't have to use it (it's just using regular Carbon
    events), b) it doesn't poll, and c) it doesn't block your application
    (you can still run timers, I think, and you might even get other
    events). If all you want is a mouse dragged message, register for mouse
    dragged events.

    -Eric

    --
    Eric Albert edu
    http://rescomp.stanford.edu/~ejalbert/
    Eric Guest

  19. #19

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    In article <stanford.edu>,
    Eric Albert <edu> wrote:
     
    >
    > Well, a) you don't have to use it (it's just using regular Carbon
    > events), b) it doesn't poll, and c) it doesn't block your application[/ref]

    It does block the app -- until the next event or timer.

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  20. #20

    Default Re: Becoming a Macintosh Programming Guru [C++ & how?]

    Doc O'Leary <com> wrote in message news:<supernews.com>... 

    Being one of said stupid developers, [self jumpIn: quick flameSuit:
    YES];.

    Cocoa adoption is being slowed by a LOT of factors. Cococ/ObjC code
    tends to be very verbose, and esoteric in comparison to all the other
    environments that I've seen. Take string creation/manipulation using
    NSStrings, vs STL strings in C++. Where's the operator overloading???
    Even a stupid programmer like myself understands those instantly;
    instead of having to spend time scouring the doentation to find how
    to handle basic data types I could have been just getting on with my
    program. Similarly, the concept of multiple inheritance is far more
    intuitive than protocols.

    (Indeed, the only other language I've ever struggled with to the same
    degree - and I've learnt a lot - is Prolog. And in the programming
    landscape, that's in the "Here Be Dragons" territory.)

    Then there's the doentation. Any good, thorough set of
    doentation needs to include three things, a complete reference
    (obviously), sample code (for those "ah, THAT'S what he meant" times),
    and a detailed introduction & discussion. For Cocoa/ObjC, the first
    two are fine, the latter is pretty sp. 'If you want to bungie
    jump, see NSBungieJump'. Cheers! At least the doentation is
    improving.

    Then there's the development tools. The Xcode & IB integration is
    sorely lacking in comparison to the other options. If you're
    prototyping (which is probably how most developers new to OSX or XCode
    are going to dive in), you're probably going to find yourself going
    back and forth between the two apps a lot. But there's no 'auto-sync':
    I need to manually read the header files in IB, or make the changes in
    IB and merge the changes back into the source, something I still
    haven't been able to do. Then again, I am a stupid developer.

    And look at this case: for the first time, I needed to create a button
    with an icon. I looked in the Inspector, and it asked me for a string.
    What string? A resource ID? File name? File path? Absolute or
    relative? What file type? I looked through the doentation, and
    found nothing. Google'd, nothing. Eventually, I found one of the
    sample apps had icon buttons, and realised you needed to add a .tiff
    file (are other formats supported?) to the project, then enter it's
    case sensitive(???) name as the string. How very '80s.

    [self rantShouldTerminate] ;

    Mike.
    Mike Guest

Page 1 of 6 123 ... LastLast

Similar Threads

  1. Macintosh - Font issues when viewed on macintosh
    By Steven in forum Web Design
    Replies: 1
    Last Post: July 1st, 01:45 PM
  2. Replies: 0
    Last Post: May 5th, 06:41 PM
  3. Gradiant Guru - where r u?
    By Graham_Newman@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 12
    Last Post: February 26th, 07:22 AM
  4. Really need HELP from a GURU
    By MyaTiX in forum ASP Database
    Replies: 7
    Last Post: December 23rd, 06:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139