SproutCore GTUG

43
SproutCore

description

Presentation at Silicon Valley GTUG meetup @ Google. Slides 25-28 introduce microservices.

Transcript of SproutCore GTUG

Page 1: SproutCore GTUG

SproutCore

Page 2: SproutCore GTUG

How can we build desktop-class

applications on the web?

Page 3: SproutCore GTUG

• Architecture

• Framework (SproutCore!)

• Deployment (AppEngine!)

• Demo

Page 4: SproutCore GTUG

How can we build desktop-class

applications on the web?

Page 5: SproutCore GTUG

Like this...

Page 6: SproutCore GTUG

Not this...

Page 7: SproutCore GTUG

Desktop Class Means...

Immediate response

Rich interactions

Offline mode

Page 8: SproutCore GTUG

Document Driven

Web Server Web Browser User

Click

Request

Response

Render

Click

Request

Response

Render

Business Logic

Page 9: SproutCore GTUG

Document Driven

Document Driven

Immediate ResponseRich InteractionsOffline Mode

Rarely

None

None

Page 10: SproutCore GTUG

Ajax

Page 11: SproutCore GTUG

"3270" Ajax

Page 12: SproutCore GTUG
Page 13: SproutCore GTUG

"3270" Ajax

Web Server Web Browser User

Click

RequestResponse

Update Page

Initial Page Load

RenderBusiness

Logic(Tiny bit of

business logic)

Page 14: SproutCore GTUG

Document Driven "3270" Ajax

Immediate ResponseRich InteractionsOffline Mode

Rarely Occasionally

None Some

None Rare

"3270" Ajax

Page 15: SproutCore GTUG

"They" say... But really...

Client computers are too slow

Most clients are as fast as servers 2 years ago

JavaScript is too slow see v8 & SquirrelFish

HTML is too limited Have you seen Safari lately?

Browser Advancements

Page 16: SproutCore GTUG

Web Client-Server

Page 17: SproutCore GTUG

UserIMAP/POP

Business Logic

Page 18: SproutCore GTUG

User

Apache

Backend ServiceBusiness

Logic

Page 19: SproutCore GTUG

Web Client-Server Is...

JavaScript app in browser

Loads data via Ajax

User interaction is not bound by the server

Page 20: SproutCore GTUG

Document Driven

Web Server Web Browser User

Click

Request

Response

Render

Click

Request

Response

Render

Business Logic

Page 21: SproutCore GTUG

"3270" Ajax

Web Server Web Browser User

Click

RequestResponse

Update Page

Initial Page Load

RenderBusiness

Logic(Tiny bit of

business logic)

Page 22: SproutCore GTUG

Web Client-Server

Web Server Web Browser User

Click

RequestResponse

Update Page

Load JS Client

Render

Click

Update Page

Business Logic

Page 23: SproutCore GTUG

Document Driven "3270" Ajax Web

Client-ServerImmediate ResponseRich InteractionsOffline Mode

Rarely Occasionally Usually

None Some Always

None Rare Offline Capable

Web Client-Server

Page 24: SproutCore GTUG

Web Client-Server

Page 25: SproutCore GTUG

But what about the server?

Page 26: SproutCore GTUG

Custom Web ApplicationBig Rack

of Servers

Business Logic

Page 27: SproutCore GTUG

Custom Web

ApplicationGoogleAppEngine

Business Logic

Business Logic

Page 28: SproutCore GTUG

Microservice

Business Logic

GoogleAppEngine

Page 29: SproutCore GTUG

Microservice is...

Thin API over cloud service

Moves business logic to the client

Designed for speed + scale

Page 30: SproutCore GTUG

Framework

Page 31: SproutCore GTUG

Framework Objectives

Provide common applications features for free

Optimize across web browsers

Eliminate Glue Code

Make coding fun!

Page 32: SproutCore GTUG

Cocoa

Page 33: SproutCore GTUG

SproutCore

Page 34: SproutCore GTUG

SproutCore is...

Full MVC framework

Bindings, Observing, DnD

Embraces JavaScript

Includes build toolsChrome, Safari, FireFox, IE7+

Page 35: SproutCore GTUG

JavaScript is Great!

Late binding

"Hackable" Object ModelClosures

Lambda Functions

Page 36: SproutCore GTUG

Demo

Page 37: SproutCore GTUG

SproutCore+

Page 38: SproutCore GTUG

Web Client-Server

Web Server Web Browser User

Click

RequestResponse

Update Page

Load JS Client

Render

Click

Update Page

Page 39: SproutCore GTUG

MicroserviceGoogleAppEngine

Page 40: SproutCore GTUG

sudo gem install sproutcore

Page 41: SproutCore GTUG

www.sproutcore.com

Page 42: SproutCore GTUG

SproutCore

Page 43: SproutCore GTUG