tags:

views:

70

answers:

1

I sometimes find it's easier to create a new project from scratch in other IDEs simply because its often more difficult to understand and tweak the generated template code than it is to write the code you need from scratch.

Do seasoned iPhone developers still use templates when creating new projects?

How difficult is it to add functionality to a template project that isn't initially included in the template? For example, if I don't check the "Use Core Data" option when creating a new project, how difficult does that make it to use Core Data later on if I changed my mind?

+2  A: 

Hi,

Templates are just here to simplify the life. If you start with a table view project and then you want add the Core Data, you have to create your model adding a new xcdatamodel file. After you have to define the managedObjectModel, the manageObjectContext and the persistentStoreCoordinator in you application like that:

NSManagedObjectModel *managedObjectModel;
NSManagedObjectContext *managedObjectContext;       
NSPersistentStoreCoordinator *persistentStoreCoordinator;

And to finish you'll have to instantiate those variables and create some methods to do your life easier. So as you can see that's a bit stronger than create a new project with this template. Templates are just here to gain time. =)

Yannick L.
thanks so much! excellent insight!
BeachRunnerJoe