mobile & tablet development for business. background and some facts iphone revenue greater than...

37
Mobile & Tablet Development for Business

Upload: edgar-worthan

Post on 31-Mar-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Mobile & Tablet Development for Business

Page 2: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Background and Some Facts

• IPhone revenue greater than all of Microsoft's• Android activations hit 1.3M per day• Microsoft launches Windows 8, focused so

much on mobile computing ( Risky bet ?)

Page 3: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

World Traffic

Page 4: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day
Page 5: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Mobile Development Approaches

• Native applications• Web based, mobile sites, Html 5 ?• Hybrid, Native + Mobile web based.

Page 6: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Native VS Web Based

• Native refers to program that has been developed specifically for use on a particular platform or device

• PROS: Fastest, Best look and feel, Full control of hardware, take full advantages of OS can offer.

• CONS: Native application is usually developed by low level language, Machine Specific

Page 7: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Some Facts of Native applications on Android and IOS

• IOS native application has to be developed on MAC OS, no windows SDK

• The Main Programing language is Objective-C, No Java.• Objective C is very weird, Huge learning curve.• - (return_type)instanceMethod1:(par1_type)par1_varName:(par2)par2_varName; • They use + , and – to define class level method or static method, the use of bracket

is out of your expectation, • this is a method call• [NSDictionary dictionaryWithObject:someObject forKey:@"key"];

• Memory leak ?• LLVM Compiler, automatic memory management of

Objective-C objects

Page 8: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

IOS - Continued

• Apple Developer Account, Submit your application to apple to review, it takes up to 2 weeks before it can be live.

• Apple can reject your application, take it offline.• Imagine what about a critical security fix for your application ?• There are very limited services that can be run at OS level

background, there are no cron job style stuff.• Application runs on Sandbox, self contained folder

Page 9: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Android

Page 10: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Android

• JAVA!!!• Android account for 70% of market share.• Problems: Fragmentation, OS is not always

latest, Too many Resolution, Compatibility • Much less limitations on what you can’t do• Android emulator is slow, real device

debugging.• Applications can be freely distributed

Page 11: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Mobile Web / Html 5

• Applications running on browsers.• Write once, run everywhere. ( Or really ?)

Html 5 seems the best option to go.• What html 5 can do?• To name a few: GEO location, web workers,

local DB, drag and drop, (check your gmail), web offline cache, Extensive Graphics Fancy stuff, 3d CSS, SVG, hardware acceleration

Page 12: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

HTML 5 contiuned

• Mobile Platform is the best place for HTML 5• Html 5 depends on the browser capability. • Html5test.com

Page 13: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Browser test

Page 14: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Html 5 detection

• Best practice for html5: use javascript to detect.• If(suchHtml5FeatureSupported){

do Fancy()

}else{do ordinary(

}

Further more …

Page 15: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Useful Libraries to detect HTML 5

Page 16: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Compatibility

• Html 5 based web apps are browser specific • How to minimize effort , compatibility ?• Use popular js mobile framework.• Eg. Jquery Mobile & Sencha Touch

Page 17: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Jquery & Sencha Touch

Page 18: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Jquey Mobile Vs Sencha Touch

• Jquey Mobile has the best compatibility, supported by almost all the mobile browser, Easy to develop.

• It is Jquery

• Sencha Touch only Support webkit based browser, that cover’s 95% + of the market

• Sencha Touch Super Fast and Smooth, very similar to native experience, due to webkit hardware acceleration, but it is hard to develop

• Based on Ext js framework , steeper learning curve vs jquery

Page 19: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Third Approach

• Hybrid (Native + web )• This is the most popular approach for the lots of

companies• mobile banking or mobile financial app use this• Benefit: • full control on the core application part, eg, No need to

wait for apple’s approval • Balance between user experience and development

cost• Reuse current skills

Page 20: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

NRMA & QBE Hybrid App

Page 21: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Hybrid Application• How does it works?• Usually when build an native app, you can

invoke an mobile browser component, • Eg, Pseudo code, just to show concept• UIWebView myBrowser=new UIWebView(); myBrowser.loadPage(“localpage.htm”) myBrowser.sendRedirect(“www.zenmeo.com”)More importantly, the page inside the myBrowser can interoperate native code with little effort, Namely , native code can listen to the js events inside webview

Page 22: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Hybrid Application - continued

• Imagine possibility, you can invoke camera function in a js/html button

• Hang on, still too hard? Still need some knowledge of native development?

• There are more options to achieve this.• Frameworks…

Page 23: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Hybrid Application - Framework

• Adobe Phonegap, adobe adobe just bought it 2 years ago.

• Basically what it does is just as aforementioned approach.

• It creates a stub of native code which contains a webview, and provide a bunches of very easy to use java script API which has been mapped to hardware. Eg, You can use JavaScript to read file , download file, access database

Page 24: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

PhoneGap

Page 25: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

PhoneGap

• PhoneGap does not provide UI API, all the java script API it provides is used to map hardware functions.

• Eg: navigator.camera.getPicture( cameraSuccess, cameraError, [ cameraOptions ] );

• UI can be done use plain html / html 5/ js or even jQuery / Sencha Touch.

• The application built by phoneGap or those hybrid approach can be download from app store and looks very alike to native apps.

Page 26: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Adobe Air

• Flash is a failed project in mobile. adobe’s mobile strategy took 2 approaches:

• Phonegap / Html 5 / hybrid way.• Adobe Air. Using action script , It is a dialect of

ECMAScript, similar to java script. Adobe provides a runtime environment which can execute the compiled air application, similar concept of java and jdk.

• Cross platform? Yes , No, IOS / Android

Page 27: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

ZK framework

• ZK framework has been nominated as our Java Team UI Framework

• ZK framework since 6.5 has been announced to be Mobile Ready

• Worth Trying , I haven’t yet• We can use ZK in conjunction with PhoneGap

or Native Code

Page 28: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

ZK Framework

Page 29: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Appcelerator Titanium

• Very Fancy, too Many magical stuff• You write javascript , this framework compile

to Native executable.• It really works, however when the application

build up to large scale, problems and issues arise.

• Not enterprise ready use at this stage, maybe in future

Page 30: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Appcelerator Titanium

Page 31: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Mobile Website Debug

• Mobile Browser different from desktop browser

• No view source button in mobile browser.• How to check javaScript errors ?

Page 32: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Debug Tools for Web pages

Page 33: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Remote Inspection

Page 34: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Debug mobile Browser

Page 35: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Server Side

• JSON is most widely used over xml • Server side usually render 2 sets of content

based on user agent.• Plenty plugins for desktop browsers to

impersonate to mobile browsers, so you can see what the content will be rendered. (User agent spoofing )

Page 36: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

Some References

• Preparing Your Web Content for iPad• https

://developer.apple.com/library/safari/#technotes/tn2010/tn2262/_index.html

• http://javascriptweekly.com/ • http://jquerymobile.com/• http://www.sencha.com/products/touch• http://diveintohtml5.info/• If you need only 1 java script book, and don’t want to

read some thing to thick ---

Page 37: Mobile & Tablet Development for Business. Background and Some Facts IPhone revenue greater than all of Microsoft's Android activations hit 1.3M per day

JavaScript The good parts