Mobile Technology Products Services Training
description
Transcript of Mobile Technology Products Services Training
![Page 1: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/1.jpg)
Mobile TechnologyProducts Services Training
![Page 2: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/2.jpg)
![Page 3: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/3.jpg)
Effective iPhone App Development
Suman B.K, iPhone Team Lead
![Page 4: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/4.jpg)
I want all features on my App!!
![Page 5: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/5.jpg)
Topics
Data Modelling MVC-Design
Patterns Delegates &
Notifications Memory
Management & Performance.
![Page 6: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/6.jpg)
Data Modelling-
Choosing the right Data Model
Data Model
![Page 7: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/7.jpg)
Different kinds of Data
Data Forms Nature
User Images, Audio & Video files
User Preference Saves app state information
Sensitive User Name & Password
Cache Data will be cached to the proper location .
![Page 8: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/8.jpg)
User Data
User controlled data Unstructured Text files
Property Lists XML
Archiving(NScoding) SQlite
![Page 9: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/9.jpg)
Property Lists
“plist”
Its mainly for Small Data.
Object----Attributes--- organize.
![Page 10: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/10.jpg)
XML files
Light weight structured format that your app can easily read & write
Also it easily fits into iOS
NSXML, Libxml & Tiny xml parser available.
![Page 11: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/11.jpg)
SQLite
Light weight yet powerful database engine.
Used in countless applications across many platforms.
SQLite uses a procedural Data
![Page 12: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/12.jpg)
CoreData
It’s a Built-In Data model ,available on MAC OS & iPhone OS 3.0 onwards.
Large or small kinds of DataSet.
Object Oriented Format.
Built-in SQLite data library.
![Page 13: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/13.jpg)
User Preference
Saves the state Information.
It Make Use of NSUserDefaults
Light weight settings.
No heavy data-No Images or No video files
![Page 14: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/14.jpg)
Sensitive Data
Keychain is the place holder for the sensitive data.
All the data is encrypted
Best to keep password ,licence key etc.
Backs up data when app is re-installed.
![Page 15: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/15.jpg)
Cached Data
Store data in the proper location.Location: NSPathUtilities.h Important: No Hardcoded path
![Page 16: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/16.jpg)
3 directories
NSTemporaryDirectory : Cleared by the System but not backed up.
NSCachesDirectory : Saved in the directory but not backed up.
NSDocumentDirectory : Saved in directory and Backed up.
![Page 17: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/17.jpg)
MVC – Design Patterns
MVC Model-View-Controller.
Best suited for iPhone Apps.
Object communication.
![Page 18: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/18.jpg)
![Page 19: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/19.jpg)
Why is MVC used?
Independent development modules.
Reusable interface, application logic, and data set.
reliable,flexible and robust code.
![Page 20: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/20.jpg)
Model
Model objects encapsulate the data.
It manipulates and process the data.
It Communicates with Controller.
One-to-one and one-to-many .
![Page 21: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/21.jpg)
View
Displays UI and responds to userview objects are typically decoupled
from model objects.Purpose:
Display data from the application’s model objects and
Enable the editing of that data.
![Page 22: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/22.jpg)
Controller
Intermediate between View & Model Objects.
Loads the View and also connects model to view.
Manages the flow of the APP.Function:
Setup and coordinating tasks for an application and
Manage the life cycles of other objects.
![Page 23: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/23.jpg)
My Simple Application
![Page 24: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/24.jpg)
Application Flow
![Page 25: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/25.jpg)
UIView Controller Its a Basic Building block.
One Screen One View Controller
Subclass to add your application logic
It encapsulates your data, view & logic
It Manages the Orientation
It Connects model to the view
![Page 26: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/26.jpg)
UINavigation Controller
![Page 27: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/27.jpg)
My Favorite Actress –Information Flow
Model Object:
Class Actress
. Name NSString
. Age int
. Details NSString
. Hobbies List
No of Movies int
![Page 28: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/28.jpg)
![Page 29: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/29.jpg)
Code- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
actressListController=[[[ActressListTableViewController] alloc] init];
actressListController.managedObjectContext=self.managedObjectContext;
[navigationController pushViewController:actressListController animated:no];
return YES;}
![Page 30: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/30.jpg)
![Page 31: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/31.jpg)
Code- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
ActressData *actressData=[fetchedResultController objectAtIndexPath:indexPath];
ActressDetailViewController *advc=[[ActressDetailViewController alloc] init];
ActressDetailViewController.actressData= actressData; self.actressDetailViewController= advice;[self.navigationController pushViewController: advc animated:no];
[advc release];
}
![Page 32: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/32.jpg)
![Page 33: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/33.jpg)
Delegates and Notifications
![Page 34: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/34.jpg)
Protocols
Set of rules to communicate between the objects.
Its similar to java interface.
It avoids subclassing.
It allows two classes distantly related by inheritance to communicate with others.
![Page 35: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/35.jpg)
What is Delegate?
Powerful Design Pattern which preserves MVC structure.
It s mainly used to communicate between the two objects.
Delegate is implemented using a protocol.
![Page 36: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/36.jpg)
How does Delegate Work?
The delegating class has an outlet or property, usually one that is named delegate.
During an event, Delegating object sends the Message to delegate.
Message is sent only if the delegate implements the method.
One-to-One Communication Path
![Page 37: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/37.jpg)
![Page 38: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/38.jpg)
Notifications
Broadcast model= One-to-many
Sent Application – wide , not to a specific class.
![Page 39: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/39.jpg)
How does Notification Work? Simple
Mechanism.
Process has an object called notification center.
Objects register with the notification centre in order to be notified
![Page 40: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/40.jpg)
![Page 41: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/41.jpg)
Memory Management
3 important things.
Problem identification. Analysis Tools. Handling in ViewControllers
![Page 42: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/42.jpg)
Identify the problems
Check for crashes.CrashLogs without backtrace.Messages in the Console
![Page 43: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/43.jpg)
Analysis Tools
How much memory is utilized in runtime
Analysis tools can be used on Simulator too
![Page 44: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/44.jpg)
Analysis Tools
![Page 45: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/45.jpg)
![Page 46: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/46.jpg)
Xcode Static Analysis
Snow LeopardResolves retain/ release cycleManual Verification Essential
![Page 47: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/47.jpg)
In View Controllers
Basic Building Blocks of an App.Responds to Memory Warnings.-(void)didReceiveMemoryWarning{
}
-(void)viewDidUnload{ }
![Page 48: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/48.jpg)
Tuning performance & UI responsiveness
Do not Block the Main Thread.
Use memory efficiently.
Observing Low-Memory Warnings.
![Page 49: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/49.jpg)
Conclusion
![Page 50: Mobile Technology Products Services Training](https://reader035.fdocuments.us/reader035/viewer/2022062410/56815ebf550346895dcd45d7/html5/thumbnails/50.jpg)
Contact
#2, 3 & 4th floors,Above Chetty’s Corner
Kumarapark WestSerpentine Road
Bangalore: 560 020Mobile: +91 88920 68680 (Bangalore)Mobile: +91 98200 21035 (Mumbai)Email: [email protected]