Javascript Views, Client-side or Server-side with NodeJS
Upcoming SlideShare
Loading in...5
×
 

Javascript Views, Client-side or Server-side with NodeJS

on

  • 9,648 views

A talk I gave at the Paris Node Meetup on June 8th 2011, in front of all the best JS developers in Paris and NodeJS creator Ryan Dahl. ...

A talk I gave at the Paris Node Meetup on June 8th 2011, in front of all the best JS developers in Paris and NodeJS creator Ryan Dahl.

I hope it will make some devs avoid some of the horrible hashbang practices we see on websites like the new twitter !

Statistics

Views

Total Views
9,648
Views on SlideShare
9,301
Embed Views
347

Actions

Likes
6
Downloads
83
Comments
3

8 Embeds 347

http://framework.joshfire.com 329
https://twitter.com 8
http://lanyrd.com 4
https://twimg0-a.akamaihd.net 2
http://twitter.com 1
http://paper.li 1
http://news.taaza.com 1
https://si0.twimg.com 1
More...

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • glad there's interest ! ;-)

    Demo won't be public until a few days unfortunately, but the framework will be released opensource on june 29th, with a lot of examples and documentation we're writing right now :)

    cheers!
    Are you sure you want to
    Your message goes here
    Processing…
  • Great talk yesterday, short and up to the point.

    I think #bang should read #hash on slide 11 - you don't need the horrible #! hack even as a fallback, a plain hash should be sufficient.

    Can you share the link to the demo? (if public)
    Are you sure you want to
    Your message goes here
    Processing…
  • very interesting technology! can we play with it? :-)
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Javascript Views, Client-side or Server-side with NodeJS Javascript Views, Client-side or Server-side with NodeJS Presentation Transcript

  • Views, anywhere! @sylvinus Paris Node Meetup, 8th June 2011Wednesday, June 8, 2011
  • ( I never thought I’d be the opening act for God, but here we are! ;-)Wednesday, June 8, 2011
  • Old server-side apps Server App.(php|rb|...) GET/POST HTML BrowserWednesday, June 8, 2011
  • Current client-side apps Server API GET “Loader” HTML GET/POST JSON App.js BrowserWednesday, June 8, 2011
  • We should NOT be happy • Google & other crawlers? • Browser history? (twitter.com#wtf) • Accessibility? • Mobile devices? • Set-top boxes? CEHTML? • Whatever is next?Wednesday, June 8, 2011
  • Plain old HTML is your friend.Wednesday, June 8, 2011
  • Why Server-side JS? • JS is cool • Client or Server, only one language • Client or Server, only one app!Wednesday, June 8, 2011
  • Updated design Server App.js API GET/POST Full HTML GET/POST JSON App.js BrowserWednesday, June 8, 2011
  • Basic idea • One common app core • Two adapters : Nodejs & Browsers • As much as possible in the shared core! • This is nothing really new (cf Gmail, again) • BUT Nodejs makes it so much easierWednesday, June 8, 2011
  • DemoWednesday, June 8, 2011
  • History? • HTML5 pushState() ! • Server answers to GET /index.html • Client listens to “/index.html” event • If !HTML5, 2 possible fallbacks: • #bang • HTML-only modeWednesday, June 8, 2011
  • Benefits • Only one codebase • Serve HTML-only versions of your JS app for Crawlers, Odd devices, IE6, ... • (Respect the way the web was built) • Feel better about pushing advanced client-side featuresWednesday, June 8, 2011
  • The View Class View.render(callback) - Executed on server & client - Plug APIs, Templates, ... - callback(error, html) View.enhance() - Executed on client only - Bind event listeners, too much jQuery plugins View.transitionTo(newView) - Executed on client only - Plug some fancy animations!Wednesday, June 8, 2011
  • Should you go this way? • Check the requirements of your app • Check your love for JS :) • 29th June: get all of this (& more) built-in with the Joshfire framework!Wednesday, June 8, 2011
  • Thanks! Questions?Wednesday, June 8, 2011