enterprise-приложения: web против objective c
DESCRIPTION
Михаил Шевчук, Dino SystemsTRANSCRIPT
©2014 RingCentral, Inc. All rights reserved. 1
Enterprise-applications:Web versus Objective C.How we started to use Web-technologiesrather than native code on mobile devices.
©2014 RingCentral, Inc. All rights reserved. 2
Cloud Phone System for Business
• Voice, Fax, Text, Conferencing, Video
• Across all your locations
• Easily adapts to your business requirements
• Trusted by more than 300,000 companies
©2014 RingCentral, Inc. All rights reserved. 3
Enterprise today
©2014 RingCentral, Inc. All rights reserved. 4
Manage your system anywhere
©2014 RingCentral, Inc. All rights reserved. 5
Enterprise App: How?
• Accessible from Any Device
• Unified Business Experience
• Natural Behavior
• Minimal Development Efforts
• Minimal Time to Address Changes
©2014 RingCentral, Inc. All rights reserved. 6
Native App
Phone Contacts
Microphone & Speaker
Notification Center
Performance
©2014 RingCentral, Inc. All rights reserved. 7
Web App
Cross-platform
Easy to update
©2014 RingCentral, Inc. All rights reserved. 8
Combined Architecture
Application
Native Code
VoIP Phone
Contacts
Notifications
Embedded Web Browser
Account Settings Web App
©2014 RingCentral, Inc. All rights reserved. 9
Web Application Types
VS
Thick Thin
Responsiveness
Traffic Economy
Rich UI Elements Works on slow devices
©2014 RingCentral, Inc. All rights reserved. 10
Another One Fat Client Problem…
Loading…
©2014 RingCentral, Inc. All rights reserved. 11
Fat Client ComponentsApplication
Core
UI Library
Forms
Business Logic
Localization
Images
©2014 RingCentral, Inc. All rights reserved. 12
One Screen At A Time
©2014 RingCentral, Inc. All rights reserved. 13
Web Application Decomposition
Base
Core UI Library
Screen
Business Logic
Localization
Images
Template
Screen
Business Logic
Localization
Images
Template
Screen
Business Logic
Localization
Images
Template
©2014 RingCentral, Inc. All rights reserved. 14
Screen Compilation
en.lang
PNG
Screen
Business Logic
Localization
Images
Template
PNG
HTML
JS
Base64
ZIP
©2014 RingCentral, Inc. All rights reserved. 15
Dev 2 Pro
Imag
es
Core
UI Lib
Screen-1 JS
Screen-1 HTML
Start Package Start.js.zip
Screen 1 Screen1.js.zip
Screen-2 JS
Screen-2 HTML Screen 2 Screen2.js.zip
Loca
lizat
ion
©2014 RingCentral, Inc. All rights reserved. 16
Interesting problems that we've faced with?
function () {
someCode
...
if (someValue) {
function doGoodStuff() {}
function doOtherGoodStuff() {}
doGoodStuff()
doOtherGoodStuff()
}
...
}
©2014 RingCentral, Inc. All rights reserved. 17
Why?
Block: {
StatementList
}
FunctionDeclaration is not a Statement in every ECMAScript implementation
©2014 RingCentral, Inc. All rights reserved. 18
3rd Party Libraries*
* - some info may be out of date
• Was not mature enough• Slow demos
• Hard to customize• Performance issues• iOS-specific, Android version looks weird
No need to support Windows & Blackberry, so that specific code can be dropped
©2014 RingCentral, Inc. All rights reserved. 19
Callback Hell
doSomething1( doSomething2And3 );
function doSomething1(callback) {
callback();
}
function doSomething2And3(callback) {
doSomething2(doSomething3);
}
function doSomething2(callback) {
callback();
}
function doSomething3() {
...
doSomething4();
}
function doSomething4() {
}
$do( doSomething1 );
$do( doSomething2,
doSomething3 );
$do( doSomething4 );
function doSomething1( callback )
{
callback();
}
function doSomething2(callback) {
callback();
}
function doSomething3(callback) {
callback();
}
function doSomething4( callback )
{
callback();
}
©2014 RingCentral, Inc. All rights reserved. 20
Thank You!