Questions for a new mac developer...

  • Heya guys,

    I'm new to the mac programming scene ... been programming dos/windows for
    many years.  I've been going through books and tutorials and having a good
    time on little simple things.  But now it's time to get serious. :)

    So...

    1- I have a design where I'd like to have "tabbed" views.  Similar to
    firefox browser tabs.  Is this a standard cocoa component for me to use?
    The NSTabbedView seems to be using a sectioned control rather than
    traditional tabs.  What should I use if I want a tabbed look?

    2- I have another view where I'd like an iTunes-like appearance.  If you use
    the television shows area of your itunes library, you'll see show icons
    (with details under the icon) down the side, and a list of episodes for each
    show.  So it's one big scroll view, sectioned off for the various
    categories, and items for each category.  I'd like to achieve a similar look
    but have not the foggiest clue of where to begin to get a view like this.

    3- I have yet another view to program where it needs to be a scrolling view
    and several detail boxes down the scrolling view.  For example, let's say I
    have 15 items to display, each with a fairly lengthy text note.  I'd like
    the items to be displayed one after another (with their notes) in a
    scrolling view.  Each item should appear to be in its own box.  To top it
    off, I'd like to get a custom-rendered background for this view.

    4- I currently plan to store app data in xml files.  Yet the mac "way"
    appears to be more with bindings, controllers, and related data sets.  How
    can I use bindings, controllers, and other similar mac technologies properly
    and yet keep my data in xml formats?

    I know that leopard is coming out soon, and with it some new developer
    technologies and tools.  I don't know how that will change things for me,
    and I understand that apple doesn't want you talking too much about those
    yet.  But if appropriate, and you're allowed to, you can just say "wait for
    leopard" on certain topics, and I'll just wait for that. :)

    Yes, these are some big questions.  If you can link me to recommended
    tutorials that would explain the concepts for these questions, or answer
    them, or provide doc reference links, or whatever, I'd appreciate it. :)

    Thank you much!

    Kevin
    --
    Kevin White
    <jedirunner...>
  • On 12/09/2007, at 7:27 AM, Kevin White wrote:

    > Heya guys,
    >
    > I'm new to the mac programming scene ... been programming dos/
    > windows for
    > many years.  I've been going through books and tutorials and having
    > a good
    > time on little simple things.  But now it's time to get serious. :)

    Welcome!
    >
    > So...
    >
    > 1- I have a design where I'd like to have "tabbed" views.  Similar to
    > firefox browser tabs.  Is this a standard cocoa component for me to
    > use?
    > The NSTabbedView seems to be using a sectioned control rather than
    > traditional tabs.  What should I use if I want a tabbed look?
    >
    > 2- I have another view where I'd like an iTunes-like appearance.
    > If you use
    > the television shows area of your itunes library, you'll see show
    > icons
    > (with details under the icon) down the side, and a list of episodes
    > for each
    > show.  So it's one big scroll view, sectioned off for the various
    > categories, and items for each category.  I'd like to achieve a
    > similar look
    > but have not the foggiest clue of where to begin to get a view like
    > this.

    Can't say if there's better support in Leopard for two reasons, a) I
    don't know and b) I wouldn't be able to say anyway. However there are
    a couple of frameworks third parties have done.

    http://www.mere-mortal-software.com/blog/details.php?d=2006-12-21

    There was another one, but I seem to have lost the reference to it.

    >
    > 3- I have yet another view to program where it needs to be a
    > scrolling view
    > and several detail boxes down the scrolling view.  For example,
    > let's say I
    > have 15 items to display, each with a fairly lengthy text note.
    > I'd like
    > the items to be displayed one after another (with their notes) in a
    > scrolling view.  Each item should appear to be in its own box.  To
    > top it
    > off, I'd like to get a custom-rendered background for this view.
    >
    > 4- I currently plan to store app data in xml files.  Yet the mac "way"
    > appears to be more with bindings, controllers, and related data
    > sets.  How
    > can I use bindings, controllers, and other similar mac technologies
    > properly
    > and yet keep my data in xml formats?

    Bindings and controllers are orthogonal to persistence
    considerations. This is handled for you by Core Data, although many
    experts recommend doing at least Cocoa Bindings and Core Data for
    yourself, so you know what's going on when you get to bindings (and
    have an appreciation of how much it is doing for you, and have some
    notion of how the magic is happening, since it's not actually magic).

    With core data, you define the model entities and relationships.
    Bindings describe how the data flows between the view, controller,
    and model (in MVC pattern). See:

    http://developer.apple.com/macosx/coredata.html

    Core data also handles persistance for you in that you can store you
    model in your required XML, SQLite, or binary forms.

    HTH, hopefully someone will have answers to 1 and 3 for you.

    Ian
    >
    > I know that leopard is coming out soon, and with it some new developer
    > technologies and tools.  I don't know how that will change things
    > for me,
    > and I understand that apple doesn't want you talking too much about
    > those
    > yet.  But if appropriate, and you're allowed to, you can just say
    > "wait for
    > leopard" on certain topics, and I'll just wait for that. :)
    >
    > Yes, these are some big questions.  If you can link me to recommended
    > tutorials that would explain the concepts for these questions, or
    > answer
    > them, or provide doc reference links, or whatever, I'd appreciate
    > it. :)
    >
    > Thank you much!
    >
    > Kevin
    > --
    > Kevin White
    > <jedirunner...>
    >
  • On Sep 11, 2007, at 8:22 PM, Ian Joyner wrote:

    > Core data also handles persistance for you in that you can store
    > you model in your required XML, SQLite, or binary forms.

    Note that the XML format here is intended mostly for debugging
    purposes. In Leopard you'll be able to define your own store types
    (*), which should let you use Core Data with an arbitrary XML schema.
    Now whether you want to target Leopard or not is a whole other question.

    (*) according to the description in <http://developer.apple.com/wwdc/
    sessions/
    >

    --
    Mike Blaguszewski / Cocoa Hacker / Ambrosia Software, Inc.
  • --- Kevin White <jedirunner...> wrote:

    > 1- I have a design where I'd like to have "tabbed"
    > views.  Similar to
    > firefox browser tabs.  Is this a standard cocoa
    > component for me to use?
    > The NSTabbedView seems to be using a sectioned
    > control rather than
    > traditional tabs.  What should I use if I want a
    > tabbed look?

    There is no standard control that looks like tabs in
    10.4. NSTabView did render its widgets as tabs up
    until (I think) 10.3. I don't suppose it would be too
    hard to write a basic tab implementation, though I
    would consider whether the design you have in mind
    actually requires a custom control or if you're just
    used to the control looking like tabs. There is some
    value to UI consistency.

    > 2- I have another view where I'd like an iTunes-like
    > appearance.  If you use
    > the television shows area of your itunes library,
    > you'll see show icons
    > (with details under the icon) down the side, and a
    > list of episodes for each
    > show.  So it's one big scroll view, sectioned off
    > for the various
    > categories, and items for each category.  I'd like
    > to achieve a similar look
    > but have not the foggiest clue of where to begin to
    > get a view like this.

    Take a look at the documentation for NSView and go
    through the related links and tutorials. Frankly, this
    will probably still look intimidating even after
    you've gone through all the documentation. I would try
    something simple and work up to harder stuff as you
    get used to Cocoa and how its drawing and views work.
    You can go faster taking baby steps and learning than
    jumping in over your head and getting frustrated every
    10 seconds.

    http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Cla
    sses/NSView_Class/index.html


    > 4- I currently plan to store app data in xml files.
    > Yet the mac "way"
    > appears to be more with bindings, controllers, and
    > related data sets.  How
    > can I use bindings, controllers, and other similar
    > mac technologies properly
    > and yet keep my data in xml formats?

    This is a bit like asking how you can use a plastic
    cup to hold your drink and still eat spaghetti --
    they're not really related. Bindings and MVC are ways
    of designing your program, while XML is just a file
    format for storing data. Anyway, as of 10.4, Cocoa has
    built-in support for reading and writing XML files, so
    you can certainly store your data that way if you
    want.

    By the way, take a look at the Cocoa-Dev FAQ. It has
    some good introductory resources:
    http://alastairs-place.net/cocoa/faq.txt

    Cheers,
    Chuck


    ____________________________________________________________________________________
    Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out.
    http://answers.yahoo.com/dir/?link=list&sid=396545433
  • Hi there-
    > 1- I have a design where I'd like to have "tabbed" views.  Similar to
    > firefox browser tabs.  Is this a standard cocoa component for me to
    > use?
    > The NSTabbedView seems to be using a sectioned control rather than
    > traditional tabs.  What should I use if I want a tabbed look?

    I wrote an open source tabs implementation some time ago:

    http://www.positivespinmedia.com/dev/PSMTabBarControl.html

    The more cutting edge development is going on in the maccode repository:

    http://code.google.com/p/maccode/source

    Hope this helps!

    John
  • On Sep 11, 2007, at 4:27 PM, Kevin White wrote:
    > 1- I have a design where I'd like to have "tabbed" views.  Similar to
    > firefox browser tabs.  Is this a standard cocoa component for me to
    > use?
    > The NSTabbedView seems to be using a sectioned control rather than
    > traditional tabs.  What should I use if I want a tabbed look?

    On the surface, this sounds like an ill-conceived design choice. If
    you implement your own look and feel then your application will  not
    benefit from the advantages that a common user interface brings to the
    table.

    Nothing will kill your application faster in the Macintosh market than
    if it looks like a poorly ported Windows app.

    > 2- I have another view where I'd like an iTunes-like appearance.  If
    > you use
    > the television shows area of your itunes library, you'll see show
    > icons
    > (with details under the icon) down the side, and a list of episodes
    > for each
    > show.  So it's one big scroll view, sectioned off for the various
    > categories, and items for each category.  I'd like to achieve a
    > similar look
    > but have not the foggiest clue of where to begin to get a view like
    > this.

    You probably want to use an NSTableView with a custom NSCell subclass.

    > 3- I have yet another view to program where it needs to be a
    > scrolling view
    > and several detail boxes down the scrolling view.  For example,
    > let's say I
    > have 15 items to display, each with a fairly lengthy text note.  I'd
    > like
    > the items to be displayed one after another (with their notes) in a
    > scrolling view.  Each item should appear to be in its own box.  To
    > top it
    > off, I'd like to get a custom-rendered background for this view.

    This also sound like you could use an NSTableView with a custom NSCell
    subclass.

    > 4- I currently plan to store app data in xml files.  Yet the mac "way"
    > appears to be more with bindings, controllers, and related data
    > sets.  How
    > can I use bindings, controllers, and other similar mac technologies
    > properly
    > and yet keep my data in xml formats?

    Core Data allows you to save your information in XML format.  However,
    I suspect that what you want is to use your own XML schema. In that
    case, there is nothing to keep you from following the Model-View-
    Controller paradigm.  Your model simply needs to know how to serialize
    and un-serialize itself from your XML representation.  Cocoa provides
    NSXML for this.  Our application uses Xerces.

    > I know that leopard is coming out soon, and with it some new developer
    > technologies and tools.  I don't know how that will change things
    > for me,
    > and I understand that apple doesn't want you talking too much about
    > those
    > yet.  But if appropriate, and you're allowed to, you can just say
    > "wait for
    > leopard" on certain topics, and I'll just wait for that. :)

    One thing you might want to wait on is the Collection view.

    > Yes, these are some big questions.  If you can link me to recommended
    > tutorials that would explain the concepts for these questions, or
    > answer
    > them, or provide doc reference links, or whatever, I'd appreciate
    > it. :)

    http://developer.apple.com/referencelibrary/GettingStarted/GS_Cocoa/index.h
    tml

    http://andymatuschak.org/articles/2007/09/09/getting-started-with-cocoa-a-f
    riendlier-approach/

    http://www.amazon.com/Cocoa-Programming-Mac-OS-2nd/dp/0321213149
    http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals
    /CocoaDesignPatterns/chapter_5_section_4.html


    http://developer.apple.com/documentation/Cocoa/Conceptual/TableView/index.h
    tml

    http://developer.apple.com/documentation/Cocoa/Conceptual/ControlCell/index
    .html


    http://developer.apple.com/documentation/Cocoa/Conceptual/NSXML_Concepts/in
    dex.html

    http://developer.apple.com/documentation/Cocoa/Conceptual/XMLParsing/index.
    html
  • Thank you Scott, and to everyone else, for the great answers!  I'll be
    reading links and re-working some design a bit over the next while and hope
    to get some prototyping done soon.

    Thanks again!

    Kevin

    On 9/12/07, Scott Thompson <easco...> wrote:
    >
    >
    > On Sep 11, 2007, at 4:27 PM, Kevin White wrote:
    >> 1- I have a design where I'd like to have "tabbed" views.  Similar to
    >> firefox browser tabs.  Is this a standard cocoa component for me to
    >> use?
    >> The NSTabbedView seems to be using a sectioned control rather than
    >> traditional tabs.  What should I use if I want a tabbed look?
    >
    > On the surface, this sounds like an ill-conceived design choice. If
    > you implement your own look and feel then your application will  not
    > benefit from the advantages that a common user interface brings to the
    > table.
    >
    > Nothing will kill your application faster in the Macintosh market than
    > if it looks like a poorly ported Windows app.
    >
    >> 2- I have another view where I'd like an iTunes-like appearance.  If
    >> you use
    >> the television shows area of your itunes library, you'll see show
    >> icons
    >> (with details under the icon) down the side, and a list of episodes
    >> for each
    >> show.  So it's one big scroll view, sectioned off for the various
    >> categories, and items for each category.  I'd like to achieve a
    >> similar look
    >> but have not the foggiest clue of where to begin to get a view like
    >> this.
    >
    > You probably want to use an NSTableView with a custom NSCell subclass.
    >
    >> 3- I have yet another view to program where it needs to be a
    >> scrolling view
    >> and several detail boxes down the scrolling view.  For example,
    >> let's say I
    >> have 15 items to display, each with a fairly lengthy text note.  I'd
    >> like
    >> the items to be displayed one after another (with their notes) in a
    >> scrolling view.  Each item should appear to be in its own box.  To
    >> top it
    >> off, I'd like to get a custom-rendered background for this view.
    >
    > This also sound like you could use an NSTableView with a custom NSCell
    > subclass.
    >
    >> 4- I currently plan to store app data in xml files.  Yet the mac "way"
    >> appears to be more with bindings, controllers, and related data
    >> sets.  How
    >> can I use bindings, controllers, and other similar mac technologies
    >> properly
    >> and yet keep my data in xml formats?
    >
    > Core Data allows you to save your information in XML format.  However,
    > I suspect that what you want is to use your own XML schema. In that
    > case, there is nothing to keep you from following the Model-View-
    > Controller paradigm.  Your model simply needs to know how to serialize
    > and un-serialize itself from your XML representation.  Cocoa provides
    > NSXML for this.  Our application uses Xerces.
    >
    >> I know that leopard is coming out soon, and with it some new developer
    >> technologies and tools.  I don't know how that will change things
    >> for me,
    >> and I understand that apple doesn't want you talking too much about
    >> those
    >> yet.  But if appropriate, and you're allowed to, you can just say
    >> "wait for
    >> leopard" on certain topics, and I'll just wait for that. :)
    >
    > One thing you might want to wait on is the Collection view.
    >
    >> Yes, these are some big questions.  If you can link me to recommended
    >> tutorials that would explain the concepts for these questions, or
    >> answer
    >> them, or provide doc reference links, or whatever, I'd appreciate
    >> it. :)
    >
    >
    > http://developer.apple.com/referencelibrary/GettingStarted/GS_Cocoa/index.h
    tml

    >
    > http://andymatuschak.org/articles/2007/09/09/getting-started-with-cocoa-a-f
    riendlier-approach/

    > http://www.amazon.com/Cocoa-Programming-Mac-OS-2nd/dp/0321213149
    >
    > http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals
    /CocoaDesignPatterns/chapter_5_section_4.html

    >
    >
    > http://developer.apple.com/documentation/Cocoa/Conceptual/TableView/index.h
    tml

    >
    > http://developer.apple.com/documentation/Cocoa/Conceptual/ControlCell/index
    .html

    >
    >
    > http://developer.apple.com/documentation/Cocoa/Conceptual/NSXML_Concepts/in
    dex.html

    >
    > http://developer.apple.com/documentation/Cocoa/Conceptual/XMLParsing/index.
    html

    >
    >

    --
    Kevin White
    <jedirunner...>
previous month september 2007 next month
MTWTFSS
          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
Go to today