20
©2014 RingCentral, Inc. All rights reserved. 1 Enterprise-applications: Web versus Objective C. How we started to use Web-technologies rather than native code on mobile devices.

Enterprise-приложения: Web против Objective C

Embed Size (px)

DESCRIPTION

Михаил Шевчук, Dino Systems

Citation preview

Page 1: Enterprise-приложения:  Web против Objective C

©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.

Page 2: Enterprise-приложения:  Web против Objective C

©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

Page 3: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 3

Enterprise today

Page 4: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 4

Manage your system anywhere

Page 5: Enterprise-приложения:  Web против Objective C

©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

Page 6: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 6

Native App

Phone Contacts

Microphone & Speaker

Notification Center

Performance

Page 7: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 7

Web App

Cross-platform

Easy to update

Page 8: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 8

Combined Architecture

Application

Native Code

VoIP Phone

Contacts

Notifications

Embedded Web Browser

Account Settings Web App

Page 9: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 9

Web Application Types

VS

Thick Thin

Responsiveness

Traffic Economy

Rich UI Elements Works on slow devices

Page 10: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 10

Another One Fat Client Problem…

Loading…

Page 11: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 11

Fat Client ComponentsApplication

Core

UI Library

Forms

Business Logic

Localization

Images

Page 12: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 12

One Screen At A Time

Page 13: Enterprise-приложения:  Web против Objective C

©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

Page 14: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 14

Screen Compilation

en.lang

PNG

Screen

Business Logic

Localization

Images

Template

PNG

HTML

JS

Base64

ZIP

Page 15: Enterprise-приложения:  Web против Objective C

©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

Page 16: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 16

Interesting problems that we've faced with?

function () {

someCode

...

if (someValue) {

function doGoodStuff() {}

function doOtherGoodStuff() {}

doGoodStuff()

doOtherGoodStuff()

}

...

}

Page 17: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 17

Why?

Block: {

StatementList

}

FunctionDeclaration is not a Statement in every ECMAScript implementation

Page 18: Enterprise-приложения:  Web против Objective C

©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

Page 19: Enterprise-приложения:  Web против Objective C

©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();

}

Page 20: Enterprise-приложения:  Web против Objective C

©2014 RingCentral, Inc. All rights reserved. 20

Thank You!