iphone - Core data refactoring -


hi methods like

'- (nsfetchedresultscontroller *)fetchedresultscontroller '

are placed in code of view controllers. find bit messy write data fetching code along lifecycle methods or table delegate methods. point should refactor coredata methods other helper class dataloader , call them in view controllers? wrong thing or going loose coding benefits of core data methods.

i moving fetchedresultscontroller helper class idea. problem encounter spelling of attributes right.

for example predicate , want filter on attribute called @"isselected". there no check compiler nor linker check string isselected. have double check each line string has been used.

a search&replace won't work on misspellings because don't know bugs have been introduced.

when predicate wrong no results fetched. problem don't know if there no matching rows or if have filtered wrong. need check @ runtime , consumes time.

for predicates saved templates exist, predicates not perfect example. think value forkey: , @ square one.

now if fetchedresultscontroller in 1 file checking become easier. @ least reduces possibility of missing little misspelling in far away , used class.

...or going loose coding benefits of core data methods.

i tend no, other please feel free jump in.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -