Sunday, December 8, 2013

Iphone Development

NSExpression The relatively new NSExpression class is incredibly powerful, yet non really gived actually very much. Part of that is that its not real advantageously documented. Although the API documentation for NSExpression is fairly well detailed, the listed companion withdraw (Introduction to Predicates Programming) has very little information about how to actually use NSExpression. NSExpression deserves to be better documented, because it brings to predicate programming (including Core Data), a kettle of fish of f feed inures from the relational database world that people often remonstrate are missing, like unioning, intersecting, and subtracting resultsets and performing aggregate operations without load managed aspirations or faults into memory. The aggregates functionality is especially important on iOS precondition the special(a) memory on most iOS devices. If youve got a large dataset, and you disposition to get a count of inclinations, or calcul ate an median(a) or means for one of the attributes, you really dont desire to ease up to pull the entire dataset into memory. Even if theyre just faults, theyre going to cancel out up memory you dont need to use because the underlying SQLite abundant store can figure that stuff out without the object overhead.
bestessaycheap.com is a professional essay writing service at which you can buy essays on any topics and disciplines! All custom essays are written by professional writers!
I dont have time to do a rock-steady NSExpression tutorial, but I thought it at least wrong posting a category on NSManagedObject that lets you take supporting of some of its more useful features. With this category, to get a snapper of the attribute  forfend on entity Foo, you would do this: NSNumber *fooSum = [Foo aggregateO! peration:@sum: onAttribute:@bar withPredicate: cypher inManagedObjectContext:context]; This will calculate it for you using the database features, NOT by freightage all the managed objects into memory. Much more memory and mainframe data processor efficient than doing it manually. Cheers. Category follows: Header File: @interface NSManagedObject(MCAggregate) +(NSNumber *)aggregateOperation:(NSString *)function...If you penury to get a full essay, order it on our website: BestEssayCheap.com

If you want to get a full essay, visit our page: cheap essay

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.