17
Modern Web application model Michał Taberski [email protected]m Poznań 9 December 2010 czwartek, 9 grudnia 2010

Modern web application model

Embed Size (px)

Citation preview

Page 1: Modern web application model

Modern Web application model

Michał [email protected]

Poznań 9 December 2010

czwartek, 9 grudnia 2010

Page 2: Modern web application model

What kind of apps do we like to use?

czwartek, 9 grudnia 2010

Page 3: Modern web application model

What kind of apps do we like to use?

czwartek, 9 grudnia 2010

Page 4: Modern web application model

What kind of apps do we like to use?

czwartek, 9 grudnia 2010

Page 5: Modern web application model

What kind of apps do we like to use?

czwartek, 9 grudnia 2010

Page 6: Modern web application model

What kind of apps do we like to use?

czwartek, 9 grudnia 2010

Page 7: Modern web application model

What kind of apps do we like to use?

czwartek, 9 grudnia 2010

Page 8: Modern web application model

What kind of apps do we like to use?

GitHub

czwartek, 9 grudnia 2010

Page 9: Modern web application model

What is common for those apps?

GitHub?

czwartek, 9 grudnia 2010

Page 10: Modern web application model

What is common for those apps?

GitHub

an instant answer

czwartek, 9 grudnia 2010

Page 11: Modern web application model

So why we can`t provide it ?

Rails by default do everything on server side

if we want some Ajax we have to do it by ourself

our Ajax solutions requires additional work, and time

we don`t have time to do every detail in Ajax

czwartek, 9 grudnia 2010

Page 12: Modern web application model

but how they do this?

They use a lot of JS (Oh... We landed on the moon !!!)

A( those apps are RESTful (nice, like a Rails App)

They render views on client side

czwartek, 9 grudnia 2010

Page 13: Modern web application model

How it works?

SERVERbrowser

Server provides templates (eg. mustache like) as an answer for first request, and JSON data to fi( it

When event is tri*ered, browser ask for JSON data (pure RESTful request)

Server gives just JSON data*

* - Because they fi( templates using JS, they can display data in a fancy wayeg. like project navigation in GitHub

czwartek, 9 grudnia 2010

Page 14: Modern web application model

We already do something like that...

SERVER

MojeMiasto

appJSON driven communication

czwartek, 9 grudnia 2010

Page 15: Modern web application model

Rails way thinking...

ModelController

ViewJSON driven communication

czwartek, 9 grudnia 2010

Page 16: Modern web application model

Is it possible to painless bring V from MVC to

client side?

My question is:

czwartek, 9 grudnia 2010

Page 17: Modern web application model

Thank you for attentionMichał Taberski

czwartek, 9 grudnia 2010