Transcript
Page 1: Original Working Draft of Bancha Project

ExtCakeRapid Developmentfor ExtJS and CakePHP

WorkingDraft

Page 2: Original Working Draft of Bancha Project

The Goal Enable asynchronous RPCs Enable synchronized Models Make webdevelopment easier

Page 3: Original Working Draft of Bancha Project

The Strategies TRY - Don‘t repeat yourself Save bandwidth

Send only relevant data Batch requests

Handle consistancy in distributed systems

Page 4: Original Working Draft of Bancha Project

How does it work?

CV

M

Page 5: Original Working Draft of Bancha Project

General RIA Architecture

Model

Controller

View

Model

Controller

View

Dat

a

Page 6: Original Working Draft of Bancha Project

Model

General RIA Architecture

Model

Controller

View

Controller

View

Dat

a

Page 7: Original Working Draft of Bancha Project

Our Architecture

Model

Controller

View

Model

Controller

View

Schema, Type

D

ata

Templates

Page 8: Original Working Draft of Bancha Project

Model

Controller

View

Model

Controller

View

DirectController

ExtDirect

Validation & Relations

D

ata

Templates

Page 9: Original Working Draft of Bancha Project

Model

Controller

View

RemoteableBehaviour

Model

Controller

View

DirectController

ExtDirectValidation &

Relations

D

ata

Templates

Page 10: Original Working Draft of Bancha Project

Model

Controller

View

RemoteableBehaviour

Direct Component

Model

Controller

View

DirectController

ExtDirectValidation &

Relations

D

ata

Templates

Page 11: Original Working Draft of Bancha Project

Model

Controller

View

RemoteableBehaviour

Direct Component

TemplateHelper

Model

Controller

View

DirectController

ExtDirectValidation &

Relations

D

ata

Templates

Page 12: Original Working Draft of Bancha Project

The Consistent ModelUsed for crutial data like orders.Solves typical problems of distributed systems

Page 13: Original Working Draft of Bancha Project

The Consistent Model Race Conditions Lost Requests

Page 14: Original Working Draft of Bancha Project

Consistancy

Client

Create Record 1

Edit Record 1

ServerWaiting..

.

Edit Record 1

Create Record 1

slow req.

Fast request

Page 15: Original Working Draft of Bancha Project

Consistancy

Client

Create Record 1

Edit Record 1

Commit

ServerWaiting..

.

Edit Record 1

Create Record 1

Version 1

Page 16: Original Working Draft of Bancha Project

Consistancy

Client

Create Record 1

Edit Record 1

Commit

ServerWaiting..

.

Edit Record 1

Create Record 1

Version 1Version 2

Page 17: Original Working Draft of Bancha Project

Consistancy

Client

Create Record 1

Edit Record 1

Commit

ServerWaiting..

.

Edit Record 1

Create Record 1

Version 1Version 2

Write to Queue

Page 18: Original Working Draft of Bancha Project

Consistancy

Client

Create Record 1

Edit Record 1

Commit

ServerWaiting..

.

Edit Record 1

Create Record 1

Version 1Version 2

Write to Queue

delayed

Page 19: Original Working Draft of Bancha Project

Consistancy

Client

Create Record 1

Edit Record 1

Commit

ServerWaiting..

.

Edit Record 1

Create Record 1

Version 1Version 2

Create, then edit (Queue)

Write to Queue

delayed

Page 20: Original Working Draft of Bancha Project

Consistancy

Client

Create Record 1

Edit Record 1

Commit

ServerWaiting..

.

Edit Record 1

Create Record 1

Version 1Version 2

Create, then edit (Queue)

Write to Queue

delayed

Commit V. 1 & 2

Page 21: Original Working Draft of Bancha Project

The Consistent Model Race Conditions Lost Requests

Page 22: Original Working Draft of Bancha Project

Lost Requests - Resend

Client

Create Record 1

Create Record 1

ServerWaiting..

.

Create Record 1

lost

sent CreateRecord

Timed out, resend

Page 23: Original Working Draft of Bancha Project

Lost Requests – Slow Response

Client

Create Record 1

Create Record 1

ServerWaiting..

.

Create Record 1

Create Record 1

send

sendCreatesecond Record

Create Record

Timed out, before receivedso resend

Page 24: Original Working Draft of Bancha Project

Lost Requests – Slow Response

Client

Create Record 1

Create Record 1

ServerWaiting..

.

Create Record 1

Create Record 1

Send

sendAlreadycreated

Create Record,Save UUID

Add temp.UUID

Page 25: Original Working Draft of Bancha Project

Lost Requests – Slow Response

Client

Delete Record 1

Delete Record 1

ServerWaiting..

.

Delete Record 1

Delete Record 1

Send

sendJust ignore

Delete Record

Page 26: Original Working Draft of Bancha Project

The Consistent ModelRace Conditions

Lost Requests

Page 27: Original Working Draft of Bancha Project

The Client API ExtCake.registerModel(modelName,option

s) ExtCake.loadModel(modelName,options)

clientName: the clientside model name forceConsistancy: use the consistant model

ExtCake.loadTemplate(tplName)

Page 28: Original Working Draft of Bancha Project

The Server Classes RemotableBehaviour DirectController

Router Data-Schema

DirectComponent handles RPCs

TemplateHelper provides templates to

cake and ext views

Page 29: Original Working Draft of Bancha Project

So we gotFast and reliable RPCs

Synchronized models

Shared templates

Page 30: Original Working Draft of Bancha Project

We will also haveSupport for Sencha TouchPHPUnit-, Jasmin- & Selenium-TestsPolling Model

Polls the server for changesRapid Development

Command Line Tool

Page 31: Original Working Draft of Bancha Project

What else?Lazy Loading

Runtime dependency managementPersistent Data (?)

Cache Data & changes offlineNext time online update local and

remote dataEven more?

Page 32: Original Working Draft of Bancha Project

More Infos

@extcake

www.extcake.org

Thx for these used icons: Under construction by iconfactory.comCheck symbol by dezinerfolio.comDelete icon by everaldo.comWarning icon by vistaico.comTwitter icon by addictedtocoffee.deWebsite icon by bogo-d.deviantart.com


Top Related