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

Post on 10-May-2015

4.664 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

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

Derby & MeteorTwo new frameworks for building…

Realtime

Data Synchronized

HTML Templated

Node

Web Applications

David Rees@studgeekabout.me/studgeek

5/9/12Node DC Meetup

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

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)

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

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>

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

change (like Knockout)

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

change (like Knockout)

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

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

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

Derby: Misc• Conflict Resolution• Normal NPM Packages

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)

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

clients• <demo>

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)

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

top related