1. Modern Web
application model
Michał Taberski
m.taberski@gmail.com
Poznań 9 December 2010
czwartek, 9 grudnia 2010
2. What kind of apps do we like to use?
czwartek, 9 grudnia 2010
3. What kind of apps do we like to use?
czwartek, 9 grudnia 2010
4. What kind of apps do we like to use?
czwartek, 9 grudnia 2010
5. What kind of apps do we like to use?
czwartek, 9 grudnia 2010
6. What kind of apps do we like to use?
czwartek, 9 grudnia 2010
7. What kind of apps do we like to use?
czwartek, 9 grudnia 2010
8. What kind of apps do we like to use?
GitHub
czwartek, 9 grudnia 2010
9. What is common for those apps?
GitHub
?
czwartek, 9 grudnia 2010
10. What is common for those apps?
an instant answer
GitHub
czwartek, 9 grudnia 2010
11. 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
12. 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
13. How it works?
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) browser
SERVER Server gives just JSON data*
* - Because they fi( templates using JS, they can display data in a fancy way
eg. like project navigation in GitHub
czwartek, 9 grudnia 2010
14. We already do something like that...
Moje
JSON driven communication
Miasto
app
SERVER
czwartek, 9 grudnia 2010
15. Rails way thinking...
JSON driven communication
View
Model
Controller
czwartek, 9 grudnia 2010
16. My question is:
Is it possible to painless
bring V from MVC to
client side?
czwartek, 9 grudnia 2010
17. Thank you for attention
Michał Taberski
czwartek, 9 grudnia 2010