Correct approach?
Correct approach?
- Subject: Correct approach?
- From: Sven <email@hidden>
- Date: Wed, 27 Jun 2007 16:22:57 +0100
Hello,
I'm working on a library type application and have a few questions regarding
the approach I am using. I've been developing software in C/C++ for years
and have recently moved to Cocoa/Objective-C - just to give you some
background on my experience.
The way I am handling it currently is as follows:
LibraryController - datasource and delegate of an NSTableView which is
responsible for creating and storing library objects (books) in a mutable
array. Details are written to a SQLite database. It handles the addition of
books and removal of books and writing/reading to/from database store
Book class - contains the details of each library item. Constructor should
call NSOpenPanel to get file details of item to add to library.
I'm wondering if this is the correct solution or whether the database
operations should be in a separate class and whether the file handling (via
NSOpenPanel) shouldn't be part of the book class. Also, should Library
controller be the datasource AND the delegate of the NSTableView? Any
further advice appreciated.
My approach works, but I'd like to check with some more experienced Cocoa
developers to see if it fits in with the way it should be according to Cocoa
design methods.
TIA
--
./Sven
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden