a quick overview of derby and meteor (for 5/9 node.js dc meetup)

15
Derby & Meteor Two new frameworks for building… Realtime Data Synchronized HTML Templated Node Web Applications David Rees @ studgeek a bout.me/studgeek 5/9/12 Node DC Meetup

Upload: david-rees

Post on 10-May-2015

4.664 views

Category:

Technology


0 download

DESCRIPTION

Derby.js & Meteor.js - Two new frameworks for building Realtime, Data Synchronized, HTML Templated, Node.js Web Applications Blog post at http://studgeek.com/2012/05/10/nodejs-meteorjs-derbyjs-nodedc

TRANSCRIPT

Page 1: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Derby & MeteorTwo new frameworks for building…

Realtime

Data Synchronized

HTML Templated

Node

Web Applications

David [email protected]/studgeek

5/9/12Node DC Meetup

Page 2: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Intro• Not a lot of time so this is quick look• Focusing on the concepts and key features• (Not implementation/details)

Page 3: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Core Features• Model-Bound HTML Templates• Common Language, Packages and APIs (Server/Client)• Common, Synchronized Model State• Live Rendering• Complete Development Framework• MIT License (both)

Page 4: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Common, Synchronized Model State• Clients, Server, and database all share a common state• Changes anywhere are synchronized everywhere• Models are created, searched, and updated the same way

everywhere• Subscriptions manage what data is propagated where• M (in VC) is virtualized everywhere

Page 5: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Live Rendering• Synchronized State pushes changes to all

db/servers/browsers• Data-bound templates recognize changes in dependent

data• HTML is magically updated everywhere• V is generated on server, lives on client• C is distributed and automatic• <demo>

Page 6: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Templating - Meteor• Specific template approach• Uses knockout/angular-style property bindings• Specific parts are updated as the model properties

change (like Knockout)

Page 7: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Templating - Derby• Specific template approach• Uses knockout/angular-style property bindings• Specific parts are updated as the model properties

change (like Knockout)

Page 8: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Complete Development Framework• All the core packages need to build a web application are

included and integrated• Node.js, Express, Socket.IO, MongoDB, Handlebars,

Stylus, CoffeeScript• Derby – Redis• Meteor - Fibers

Page 9: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Derby: Server-Side Template Rendering

• Pages are rendered on server as HTML and then pushed to client

• They are then bound to the data on client (knockout/angular style)

• SEO friendly (try searching for meteor.com)• Probably more mobile friendly (and definitely faster)• Meteor plans to implement

Page 10: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Derby: Routes• Routes are defined Express/Sinatra style• Initially generated on server and pushed to client• Subsequent route accesses reuse client HTML• Transitional routes support in-page updates (CSS

animations)• Form submits can be captured and used on client

Page 11: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Derby: Misc• Conflict Resolution• Normal NPM Packages

Page 12: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Meteor: Full Build/Package Environment

• They have big plans :)• Trying to improve on express with simpler file structure• Trying to improve on npm with dynamic packages

• npm-like, not documented yet

• Uses own node internally• Can create a normal node app for regular deployment• I hope this will change (no real hurdle)

Page 13: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Meteor: Hot Code Pushes• Changes to code on server is pushed realtime to all

clients• <demo>

Page 14: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Meteor: Deployment• You use meteor to run

• meteor

• For play you can use their servers• meteor deploy <anything you want>

• Or you can bundle a normal node app for deployment • meteor bundle (generates node tgz)

Page 15: A Quick Overview of Derby and Meteor (for 5/9 Node.js DC Meetup)

Last Thoughts (IMHO)• Both have great potential• Demonstrate what is possible with common language• Show Node can be more than Ruby in JavaScript• Personally digging Derby more right now

• Normal packages, KO bindings, HTML in browser

• Hopefully both will drive off each other

• Will tweet deck - @studgeek