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

Building modern web applications. Single Respon...

Building modern web applications. Single Responsibility Principle applied

Slides from my talk from GeeCON 2014. Slightly modified version comparing to one from 4Developers conf.

Michal Ostruszka

May 17, 2014
Tweet

More Decks by Michal Ostruszka

Other Decks in Programming

Transcript

  1. What not to expect? / code samples / frameworks /

    benchmarks / etc @mostruszka / #geecon
  2. Here be dragons / old times, good times? / what

    projects need / how to / toolbox / not all is well / profits @mostruszka / #geecon
  3. Single Responsibility do you speak it? In object-oriented programming, the

    Single Responsibility Principle states that every class should have a single responsibility, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility. @mostruszka / #geecon
  4. Backend devs doing frontend / architecture / standards & browser

    support / performance @mostruszka / #geecon
  5. Project needs / user experience / good performance / standards

    & browser support / maintainability / minimal-risk deployments @mostruszka / #geecon
  6. API JSON-based view-less server browser as API client GET /api/users

    HTTP/1.1 Host: example.com Accept: application/json HTTP/1.1 200 OK Content-Type: application/json {"foo": "bar"} @mostruszka / #geecon
  7. Deployment isolation static stuff is static *.html *.js *.css *.png

    *.java *.rb *.scala *.php @mostruszka / #geecon
  8. Build toolbox for frontend / grunt, gulp / yeoman, lineman

    / make, ant + tons of extensions @mostruszka / #geecon
  9. Backend / web as a transport layer only / micro

    web-frameworks / auto-documenting API / JSON standards @mostruszka / #geecon
  10. One SPA fits all? not so fast, cowboy / SEO,

    indexing / Twitter’s time to first tweet / view-heavy apps / additional code to maintain @mostruszka / #geecon
  11. node.js / middle layer / view server by JS devs

    / talks to backend API http://www.nczonline.net/blog/2013/10/07/node-js-and-the-new-web-front-end/ @mostruszka / #geecon
  12. backend / focus on business logic & core / keep

    well defined boundary / no more JS nightmares / independent development cycle Happy end @mostruszka / #geecon
  13. frontend / focus on client logic & view / use

    well-defined API / deliver great user experience / use right tools / drive design, automate, test Happy end @mostruszka / #geecon