compare android vs_i_os

16
Android vs iOS COMPARISON

Upload: hoa-te

Post on 15-Jan-2015

44 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Compare android vs_i_os

Android vs iOSCOMPARISON

Page 2: Compare android vs_i_os

Aspects• Project structure

• Output final type

• Components build up

• Some other kind of facing

• Using style

Page 3: Compare android vs_i_os

Project structure

Page 4: Compare android vs_i_os

Output final type• .IPA

• .APK

Page 5: Compare android vs_i_os

Components build up• Naming

– NSString >< String

– NSObject ><Object

– NSInteger ><Integer

– ….

– UIView >< View

– UIButton >< Button

– UILabel >< Label

– UITextField >< EditText

– ….

• Storage– NSUserDefault ><SharedPrefrence

• Layout– .XIB>< .XML

• Controller– UIViewController >< Activity

• Logging– NSLog >< Log

• List Data– UITableView>< ListView

• Notification– iToast >< Toast

– UIAlert ><Alert

Page 6: Compare android vs_i_os

Some other kind of facing• Declare

• Import libs

• Switching screen

• UnitTest

• ATT

Page 7: Compare android vs_i_os

Declare

Object object = new Object();Student student = new Student("Nguyen Tuan Anh", "24", "Male");

Class Student{private String name;private int age;private String gender;

public Student(String name, int age, String gender){this.name = name;this.age = age;this.gender = gender;

}}

Page 8: Compare android vs_i_os

Import Libs• Same as:

– Add from static library:• .a >< .jar

– Add module: same way.

– Add from resource : • Cocoapod >< Maven

• Podfile >< pom.xml

Page 9: Compare android vs_i_os

Switching screen• IOS :

– Don’t have default screen

– Self.window setRootViewController

– Using navigation controller to deligate• pushViewController

• popViewController

• Android:– Using IntentFilter set default screen

– Throw an Intent to transfer data + switch screen

– Replace screen if using fragment

(using Support-V4 with FragmentManager)

Page 10: Compare android vs_i_os

Using style• Debugging

• Looping: for | while | do while | ..

• Constructor( init )

• MultiScreen

• MultiVersion

• Transfer data between multible screen

Page 11: Compare android vs_i_os

Debugging iOS

Page 12: Compare android vs_i_os

Debugging android

Page 13: Compare android vs_i_os

MultiScreen• IOS:

– IPad

– Iphone• pixel density:

– Rentina

– Not rentina

• Size screen:– 3.5 : Ip4

– 4 : Ip5

– 4.7 : Ip6 (near future)

– Something others

• Android: there are many way to understand it

– Pixel density:• Mdpi

• Hdpi

• Xhdpi

• Xxhdpi

• xxxhdpi

– Size screen:• Small

• Normal

• Large

• Xlarge

• XXLarge

Page 14: Compare android vs_i_os

MultiScreen

Page 15: Compare android vs_i_os

Transfer data between screens• iOS:

– setup next screen in current screen & prepare data for it before start.

– Other way:• No suggest

• File– SQLite

– NSUserDefault

– Core data (file has structure)

– …

• Android:– Same as model driven - new

way was applied this time.

– Other way:• Put data into Intent as bundle

• File– SQLite

– SharedPreference

– Simple file

Page 16: Compare android vs_i_os

Thanks for view!