SlideShare a Scribd company logo
Derby & Meteor    .js                              .js

            The “next generation” of web development frameworks?

                             (thanks to Node.js)




David Rees
@studgeek                                           7/10/12
about.me/studgeek                                   Nova Node Meetup
Intro
• Just an overview, with focus on what they “are”

• Agenda
  •   Derby/Meteor - Common Concepts
  •   A little more about Derby
  •   A short Derby demo (Oooooo)
  •   A little more about Meteor
  •   A short Meteor demo (Ahhhhh)
  •   Discussion & Beers (Yummm)
Derby/Meteor – Common Concepts
Common Language
 •   Same language and thinking on server and client
 •   Same code and model structures
 •   Same libraries
 •   Same tools (IDE, debug, logging)
 •   Same developers
Base 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, Browserify, UglifyJS
• Meteor – Fibers
Model-Bound Templates
    • HTML is generated from HTML template
    • Variables are bound to model data
    • GUI updates automatically as the model properties change



<template name="hello”>
  <div>Hello there, {{first}} {{last}}!</div>    {first: "Alyssa", last: "Hacker"}
</template>




                        <div>Hello there, Alyssa Hacker!</div>
Synchronized Model State
• Clients, Servers, and database all share a common state
• Changes anywhere are synchronized everywhere (Socket.IO)
• Models are created, searched, and updated the same way
  everywhere
• “Subscriptions” manage what data is propagated where
Live Rendering
• Synchronized Model State publishes changes to
  clients/servers/browsers
• Model-Bound Templates recognize changes in their Models
• So… HTML is “magically” updated everywhere

• Subscriptions filter what is pushed where
• Templates control what is updated
• Local data can be used with model events to manage when
  HTML updates
Misc
• Changes in code are automatically pushed to all clients (as
  view updates)
• Open Source (MIT)
• Neither is production ready yet
  • Security is biggest “to do” (unless you really trust your users)
Derby
Derby: Templates
• Derby-specific template approach based on Handlebars
• Uses knockout/angular-style model property bindings
• Only changed parts are updated as the model properties
  change (like Knockout)
Derby: Templates Cont.
• Reuse (“components”)
  <Body:>
   <app:nav>
  <nav:>
   <ul>{{each navItems}}<app:navItem>{{/}}</ul>
  <navItem:>
   <li><a href="{{link}}">{{title}}</a></li>



• Recently added “widgets” which extend the tag library
  <boot:tabs current={test.currentTab}>
    <boot:tab title="One">
     Stuff
    </boot:tab>
    <boot:tab title="Two">
     More stuff
    </boot:tab>
   </boot:tabs>
Derby: Server-Side Template
Rendering
• Pages are initially rendered on server as HTML and then
  pushed to client
• Results in real HTML being pushed to client (rather than
  generated on client)
• Additional changes are then handled on client

• More SEO friendly
• Probably more mobile friendly also

• 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
    // Routes render on client as well as server
    get('/', function (page, model) {
      // Subscribe specifies the data to sync to client
      // Can also use fetch for static data
      model.subscribe('users', function () {
        // Render the page (server), reuse the template (client)
        page.render('home');
      });
    });



• Includes history support
• “Transitional” routes support local updates (DOM/CSS changes)
• Form submits can be captured and used on client
Derby: Models (Racer)
• “Models” are synchronized stores using Redis
   • Optionally backed by MongoDB
   • Supports conflict resolution (very basic so far)
• Data is made available on client by subscribing to a path
    model.subscribe(’users', callback);


• Model access/mutation is very data/path-centric
    var model = store.createModel();
    model.set('users.Dave.favoriteBeer', 'Racer 5');
    var dave = model.at('users.Dave');
    dave.set('favoriteBeer', 'Racer 5');


• Queries support more fine-grained subscriptions
    // Server code
    store.query.expose(’olderUsers', 'olderThan', function (age) {
      return this.where('age').gt(age);
    });

    // App code
    var eligibleVotersQuery = model.query(‘olderUsers').olderThan(20);
    model.subscribe(eligibleVotersQuery, callback);
Derby: Misc
• Installed and used as normal NPM package(s)
• Core developers are using it for other project
  • “focused on building our app”
Derby Demo
Meteor
Meteor: Templates
• Use any template engine you want
• Entire template section is regenerated when underlying model
  properties change
• Pushes view generation JavaScript to client (no HTML)
  • This is a serious SEO issue – try googling for meteor.com
Meteor: Full Build/Package
Environment
• Goal is to be a complete development environment
• Improves on rails/express with simpler file structure
  • Much less boilerplate than Derby
• “Improves” on npm with “dynamic packages”
  • npm-like, not documented yet
• Uses node and node packages internally
Meteor: Build/Deployment
• You (must) use meteor to create
     meteor create myapp
• You use meteor (not node) 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
Meteor: Misc
• Installed as a .sh
      curl install.meteor.com | /bin/sh

• Getting a lot more community love so far
  • Meteor folks seems to be better (and more focused) on SMO


                                          Meteo   Derby
                                          r
               GitHub Watchers            4060    924

               GutHub Forks               324     54

               StackOverflow Qs           312     12
Meteor Demo
Last Thoughts (IMHO)
• Both have great potential
  • Demonstrate what is possible with common language
  • Show Node can be more than Ruby in JavaScript
• Security/scaling issues need to be (and will be) solved

• Personally digging Derby a bit more right now
  •   Normal packages and building
  •   Property-level bindings
  •   HTML in browser
  •   But worried about core developer’s support

• I do prefer some aspects of Meteor though
  • Super simple for simple stuff
  • Less generated boilerplate
  • More community love
Q&A&B




             Will tweet slides…
David Rees
@studgeek                           7/10/12
about.me/studgeek                   Nova Node Meetup

More Related Content

Recently uploaded

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 

Recently uploaded (20)

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
 

Featured (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Overview of Derby.js and Meteor.js (for 7/10 NoVa Node.js Meetup)

  • 1. Derby & Meteor .js .js The “next generation” of web development frameworks? (thanks to Node.js) David Rees @studgeek 7/10/12 about.me/studgeek Nova Node Meetup
  • 2. Intro • Just an overview, with focus on what they “are” • Agenda • Derby/Meteor - Common Concepts • A little more about Derby • A short Derby demo (Oooooo) • A little more about Meteor • A short Meteor demo (Ahhhhh) • Discussion & Beers (Yummm)
  • 4. Common Language • Same language and thinking on server and client • Same code and model structures • Same libraries • Same tools (IDE, debug, logging) • Same developers
  • 5. Base 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, Browserify, UglifyJS • Meteor – Fibers
  • 6. Model-Bound Templates • HTML is generated from HTML template • Variables are bound to model data • GUI updates automatically as the model properties change <template name="hello”> <div>Hello there, {{first}} {{last}}!</div> {first: "Alyssa", last: "Hacker"} </template> <div>Hello there, Alyssa Hacker!</div>
  • 7. Synchronized Model State • Clients, Servers, and database all share a common state • Changes anywhere are synchronized everywhere (Socket.IO) • Models are created, searched, and updated the same way everywhere • “Subscriptions” manage what data is propagated where
  • 8. Live Rendering • Synchronized Model State publishes changes to clients/servers/browsers • Model-Bound Templates recognize changes in their Models • So… HTML is “magically” updated everywhere • Subscriptions filter what is pushed where • Templates control what is updated • Local data can be used with model events to manage when HTML updates
  • 9. Misc • Changes in code are automatically pushed to all clients (as view updates) • Open Source (MIT) • Neither is production ready yet • Security is biggest “to do” (unless you really trust your users)
  • 10. Derby
  • 11. Derby: Templates • Derby-specific template approach based on Handlebars • Uses knockout/angular-style model property bindings • Only changed parts are updated as the model properties change (like Knockout)
  • 12. Derby: Templates Cont. • Reuse (“components”) <Body:> <app:nav> <nav:> <ul>{{each navItems}}<app:navItem>{{/}}</ul> <navItem:> <li><a href="{{link}}">{{title}}</a></li> • Recently added “widgets” which extend the tag library <boot:tabs current={test.currentTab}> <boot:tab title="One"> Stuff </boot:tab> <boot:tab title="Two"> More stuff </boot:tab> </boot:tabs>
  • 13. Derby: Server-Side Template Rendering • Pages are initially rendered on server as HTML and then pushed to client • Results in real HTML being pushed to client (rather than generated on client) • Additional changes are then handled on client • More SEO friendly • Probably more mobile friendly also • Meteor plans to implement
  • 14. Derby: Routes • Routes are defined Express/Sinatra style • Initially generated on server and pushed to client • Subsequent route accesses reuse client HTML // Routes render on client as well as server get('/', function (page, model) { // Subscribe specifies the data to sync to client // Can also use fetch for static data model.subscribe('users', function () { // Render the page (server), reuse the template (client) page.render('home'); }); }); • Includes history support • “Transitional” routes support local updates (DOM/CSS changes) • Form submits can be captured and used on client
  • 15. Derby: Models (Racer) • “Models” are synchronized stores using Redis • Optionally backed by MongoDB • Supports conflict resolution (very basic so far) • Data is made available on client by subscribing to a path model.subscribe(’users', callback); • Model access/mutation is very data/path-centric var model = store.createModel(); model.set('users.Dave.favoriteBeer', 'Racer 5'); var dave = model.at('users.Dave'); dave.set('favoriteBeer', 'Racer 5'); • Queries support more fine-grained subscriptions // Server code store.query.expose(’olderUsers', 'olderThan', function (age) { return this.where('age').gt(age); }); // App code var eligibleVotersQuery = model.query(‘olderUsers').olderThan(20); model.subscribe(eligibleVotersQuery, callback);
  • 16. Derby: Misc • Installed and used as normal NPM package(s) • Core developers are using it for other project • “focused on building our app”
  • 19. Meteor: Templates • Use any template engine you want • Entire template section is regenerated when underlying model properties change • Pushes view generation JavaScript to client (no HTML) • This is a serious SEO issue – try googling for meteor.com
  • 20. Meteor: Full Build/Package Environment • Goal is to be a complete development environment • Improves on rails/express with simpler file structure • Much less boilerplate than Derby • “Improves” on npm with “dynamic packages” • npm-like, not documented yet • Uses node and node packages internally
  • 21. Meteor: Build/Deployment • You (must) use meteor to create meteor create myapp • You use meteor (not node) 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
  • 22. Meteor: Misc • Installed as a .sh curl install.meteor.com | /bin/sh • Getting a lot more community love so far • Meteor folks seems to be better (and more focused) on SMO Meteo Derby r GitHub Watchers 4060 924 GutHub Forks 324 54 StackOverflow Qs 312 12
  • 24. Last Thoughts (IMHO) • Both have great potential • Demonstrate what is possible with common language • Show Node can be more than Ruby in JavaScript • Security/scaling issues need to be (and will be) solved • Personally digging Derby a bit more right now • Normal packages and building • Property-level bindings • HTML in browser • But worried about core developer’s support • I do prefer some aspects of Meteor though • Super simple for simple stuff • Less generated boilerplate • More community love
  • 25. Q&A&B Will tweet slides… David Rees @studgeek 7/10/12 about.me/studgeek Nova Node Meetup

Editor's Notes

  1. Notes:Derby and Meteor have a pretty different model for how how subscriptions/channels are handled