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

Web Development: You're Doing It Wrong

Web Development: You're Doing It Wrong

Even without any sort of programming framework with lots of abstraction layers and fancy tooling, the Web platform is one of the most powerful environments for distributed and collaborative systems. If, that is, we actually /use/ it instead of continuously /abusing/ it through trying to turn it into something it's not. In this session, we'll challenge many commonly-held assumptions about how to best develop web applications. Even though we'll briefly touch the REST architectural style, most of the time will be spent discussing the strengths and ideal roles for HTML, CSS, JavaScript and their connection to the Web's core standards, HTTP and URIs. We'll see how a focus on simplicity and moderate use of technologies can lead to great applications that integrate well, scale well, are fun to develop, and are maintainable in the long run.

Stefan Tilkov

June 13, 2013
Tweet

More Decks by Stefan Tilkov

Other Decks in Technology

Transcript

  1. Let’s build a generic client runtime De ne a protocol

    so it can work with any server Allow it to mix services from di erent backends De ne a generic, declarative data format Separate content and layout Allow for extensibility with client-side scripting Make it work on any device, with any resolution
  2. Standardize it, with (rough) consensus Ensure there are multiple client,

    server and intermediary implementations to choose from Have every client OS ship with an implementation of the generic client Let every programming environment support it
  3. Server-side components Avoid HTML, JS, CSS Trade Familiarity for Complexity

    Session-centric ROCA Server-side POSH Client-side components Web-centric Single Page Apps Advanced Client Frameworks Server-side REST APIs
  4. <order> <shippingAddress>Paris, France</shippingAddress> <items> <item> <productDescription>iPad</productDescription> <quantity>1</quantity> <price>699</price> </item> </items>

    <link href="http://om.example.com/cancellations" rel="cancel" /> <link href="https://om.example.com/orders/123/payment" rel="payment" /> </order>
  5. <html xmlns="http://www.w3.org/1999/xhtml"> <body> <div class="order"> <p class="shippingAddress">Paris, France</p> <ul class="items">

    <li class="item"> <p class="productDescription">iPad</p> <p class="quantity">1</p> <p class="price">699</p> </li> </ul> <a href="http://om.example.com/cancellations" rel="cancel">cancel</a> <a href="https://om.example.com/orders/123/payment" rel="payment">payment</a> </div> </body> </html>
  6. schema.org <div> <h1>Avatar</h1> <span>Director: <span>James Cameron</span> (born August 16, 1954)</span>

    <span>Science fiction</span> <a href="../movies/avatar-theatrical-trailer.html"</a> </div>
  7. schema.org <div itemscope itemtype="http://schema.org/Movie"> <h1>Avatar</h1> <span>Director: <span>James Cameron</span> (born August

    16, 1954)</span> <span>Science fiction</span> <a href="../movies/avatar-theatrical-trailer.html"</a> </div>
  8. schema.org <div itemscope itemtype="http://schema.org/Movie"> <h1 itemprop="name">Avatar</h1> <span>Director: <span itemprop="director">James Cameron</span>

    (born August 16, 1954)</span> <span itemprop="genre">Science fiction</span> <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a> </div>
  9. <div id="tabs"> <ul> <li><a href="#tabs-1">Nunc tincidunt</a></li> <li><a href="#tabs-2">Proin dolor</a></li> <li><a

    href="#tabs-3">Aenean lacinia</a></li> </ul> <div id="tabs-1"> <p>Proin elit arcu, rutrum commodo, vehicula ...</p> </div> <div id="tabs-2"> <p>Morbi tincidunt, dui sit amet facilisis feugiat, odio ...</p> </div> <div id="tabs-3"> <p>Mauris eleifend est et turpis. Duis id erat ...</p> </div> $("#tabs").tabs(); +
  10. $('.multiselect', context).each(function() { $(this).multiselect({ selectedList: 2, checkAllText: "All", uncheckAllText: "None"

    }).multiselectfilter({label:"", width:"200px"}); }); <div class="filter-column"> <label for="project">Project</label> <select class="multiselect" id="project" name="project" size="5" multiple> <option>DISCOVER</option> <option>IMPROVE</option> <option >MAGENTA</option> <option>ROCA</option> <option>ROCKET</option> </select> </div>
  11. JS component JS glue code HTML Events Methods Component 2

    Component 3 ... Layout/CSS styles styles Server / Backend Ajax initializes Base Markup responds with
  12. Browser Server Label Label Label Next Label Label Label Next

    Label Label Finish HTML Page Label Label Label Label Label Label Label Label Submit Client State
  13. Server HTML Page Label Label Label Label Label Label Label

    Label Submit HTML Page Label Label Label Label Label Label Label Label Submit HTML Page Label Label Label Label Label Label Label Label Submit
  14. No JavaScript know-how needed HTML/CSS hidden Re-use Java/.NET skills Desktop

    programming model Developer productivity (?) Server component frameworks
  15. Linkable resources with pretty URIs Di erent handling of GET/POST

    Support for caching Complete control over HTML 1 Resource, n views Request/Response Frameworks
  16. Focus on JavaScript No server-side HTML “Closed” Application Maximal client

    performance (?) Developer productivity Client-side frameworks
  17. Q&A Stefan Tilkov, @stilkov [email protected] Phone: +49 170 471 2625

    innoQ Deutschland GmbH Krischerstr. 100 40789 Monheim am Rhein Germany Phone: +49 2173 3366-0 innoQ Schweiz GmbH [email protected] Gewerbestr. 11 CH-6330 Cham Switzerland Phone: +41 41 743 0116 www.innoq.com Ohlauer Straße 43 10999 Berlin Germany Phone: +49 2173 3366-0 Robert-Bosch-Straße 7 Germany Phone: +49 2173 3366-0 Radlkoferstraße 2 D-81373 München Telefon +49 (0) 89 741185-270