Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A Tale of Two Frameworks

Ee191858f0d96ad93098694537f71998?s=47 Sau Sheong Chang
February 19, 2014
56

A Tale of Two Frameworks

Ee191858f0d96ad93098694537f71998?s=128

Sau Sheong Chang

February 19, 2014
Tweet

Transcript

  1. A Tale of Two Frameworks Chang Sau Sheong @sausheong

  2. “It was the best of times, it was the worst

    of times …”
  3. None
  4. How web frameworks work

  5. Server Client Request Response Header Body Header Body HTTP methods:

    GET, POST etc Status codes: 200, 404 etc
  6. None
  7. Parts of a server-side web framework

  8. Models

  9. Routes

  10. Views

  11. Assets

  12. Minimalist Sinatra + Haml + Sequel + Postgres

  13. Alternative Cuba + Mustache + Mongoid + MongoDB

  14. Minimalist

  15. Least effort

  16. Code for humans

  17. Principle of Good Enough

  18. Sinatra

  19. “Domain specific language for quickly creating web applications.”

  20. None
  21. *HTML abstraction markup language

  22. “Markup should be beautiful.”

  23. %section.container %h1= post.title %h2= post.subtitle .content = post.content <section class=”container”>

    <h1><%= post.title %></h1> <h2><%= post.subtitle %></h2> <div class=”content”> <%= post.content %> </div> </section>
  24. None
  25. None
  26. “Ruby object relational mapper.”

  27. None
  28. Migrate (Create the database tables)

  29. Model

  30. None
  31. Alternative

  32. Cuba

  33. “Ruby microframework for web development.”

  34. Hierarchical routes

  35. Focus on matching

  36. None
  37. { Mustache

  38. “Logic-less templates.”

  39. There are only tags.

  40. None
  41. None
  42. “Document database with JSON- styled documents.”

  43. Mongoid

  44. “Ruby object document mapper for MongoDB.”

  45. None
  46. https://github.com/sausheong/server-frameworks

  47. Questions?