modern web application model
TRANSCRIPT
Modern Web application model
Michał [email protected]
Poznań 9 December 2010
czwartek, 9 grudnia 2010
What kind of apps do we like to use?
czwartek, 9 grudnia 2010
What kind of apps do we like to use?
czwartek, 9 grudnia 2010
What kind of apps do we like to use?
czwartek, 9 grudnia 2010
What kind of apps do we like to use?
czwartek, 9 grudnia 2010
What kind of apps do we like to use?
czwartek, 9 grudnia 2010
What kind of apps do we like to use?
czwartek, 9 grudnia 2010
What kind of apps do we like to use?
GitHub
czwartek, 9 grudnia 2010
What is common for those apps?
GitHub?
czwartek, 9 grudnia 2010
What is common for those apps?
GitHub
an instant answer
czwartek, 9 grudnia 2010
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
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
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
We already do something like that...
SERVER
MojeMiasto
appJSON driven communication
czwartek, 9 grudnia 2010
Rails way thinking...
ModelController
ViewJSON driven communication
czwartek, 9 grudnia 2010
Is it possible to painless bring V from MVC to
client side?
My question is:
czwartek, 9 grudnia 2010
Thank you for attentionMichał Taberski
czwartek, 9 grudnia 2010