SlideShare une entreprise Scribd logo
1  sur  30
Getting small for the enterprise.

Beyond the
MEAN stack

@othiym23
forrest@newrelic.com
github.com/othiym23
you chose Node for a reason

Node is fast
Node is modular
Node is fun
so why turn it into something else?
Node is built on the
sound engineering
values:
low coupling
high cohesion
“

is the

of

Web development is more pattern-driven:
is this social media?
is this a storefront?
is this… is this a cms?

.”
moduletopia™
Node loves modules:
more all the time
available for almost every use case
pretty easy to understand
(mostly) on GitHub
(mostly) freely usable
stacks: khakis of the internet

familiar: faster to build things you already know
comforting: already integrated / tested / shipped
easy: developers only need master one set of tools
stacks are sticky

opaque: full of implicit assumptions and requirements
complicated: hard to master, easy to break
monolithic: have to pay for the whole thing (but only
using some of it)
Node says: build only what you need.
one size does not fit all
one size does not fit all
one size does not fit all
some Node use cases
streaming
json apis
multiplexing
soft realtime
proxying
…you know, fast web servers
& some legacy glue
dat: scraping & etl
dinosaur taming: Oracle & xml
~50k modules: there’s a pony in there somewhere
Windows: best support of any of the major scripting
languages
the zen of Node
self-contained: code over configuration
modular: inversion of control & direct dependency
injection
simple: one small thing in one short file
and so: easy for new people to pick up, easy to maintain
be nice, not mean
MEAN: MongoDB
instead of MongoDB: Redis
fast: data lives in memory
powerful: many different data types, lots of operations
flexible: many options for high availability and
clustering
a veteran: battle-tested in Node
instead of MongoDB: MySQL*
“simple” and “fast” are its best features
time-tested
some data are just plain relational
can actually be managed
* or PostgreSQL (<3

)
instead of MongoDB: leveldb
a do-it-yourself dbms
rapidly-growing ecosystem
simple
not all there yet, but built on a solid foundation
MEAN: Express
instead of Express: hapi

plugins instead of middleware
configuration-centric
optimized for large teams
instead of Express: Restify
api “compatible” with Express’s
meant for building restful apis
optimized for json
instrumented for operational monitoring
instead of Express: Sails

actually built on top of Express
feels like Rails (including scaffolding)
realtime
stack-like, but still a creature of parts
MEAN: AngularJS
instead of Angular:
browserify
puts Node modules in your browser
puts Node ideology in your browser
everything’s on npm
flexible packaging pipeline
good for Node-first developers
instead of Angular: component

similar to browserify
built on GitHub
not so much with the asset pipeline
more focused on client-side development than
browserify
instead of Angular:
bower / Yeoman

an integrated, browserfocused workflow
very rich asset pipeline
good for client-first
developers
MEAN: Node.js

Contenu connexe

Tendances

You know what iMEAN? Using MEAN stack for application dev on Informix
You know what iMEAN? Using MEAN stack for application dev on InformixYou know what iMEAN? Using MEAN stack for application dev on Informix
You know what iMEAN? Using MEAN stack for application dev on InformixKeshav Murthy
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsEdy Segura
 
When Will Drupal Die? (Keynote talk)
When Will Drupal Die? (Keynote talk)When Will Drupal Die? (Keynote talk)
When Will Drupal Die? (Keynote talk)chrisshattuck
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An OverviewNaveen Pete
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS drupalcampest
 
Building a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDBBuilding a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDBVivochaLabs
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013Valeri Karpov
 
Building your first MEAN application
Building your first MEAN applicationBuilding your first MEAN application
Building your first MEAN applicationFITC
 
MEAN Stack
MEAN StackMEAN Stack
MEAN StackDotitude
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsRob O'Doherty
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jibanJibanananda Sana
 

Tendances (20)

You know what iMEAN? Using MEAN stack for application dev on Informix
You know what iMEAN? Using MEAN stack for application dev on InformixYou know what iMEAN? Using MEAN stack for application dev on Informix
You know what iMEAN? Using MEAN stack for application dev on Informix
 
NodeJS
NodeJSNodeJS
NodeJS
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
When Will Drupal Die? (Keynote talk)
When Will Drupal Die? (Keynote talk)When Will Drupal Die? (Keynote talk)
When Will Drupal Die? (Keynote talk)
 
Mean Stack - An Overview
Mean Stack - An OverviewMean Stack - An Overview
Mean Stack - An Overview
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS
 
Building a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDBBuilding a REST API with Node.js and MongoDB
Building a REST API with Node.js and MongoDB
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
 
Intro to Node.js
Intro to Node.jsIntro to Node.js
Intro to Node.js
 
Building your first MEAN application
Building your first MEAN applicationBuilding your first MEAN application
Building your first MEAN application
 
MongoDB
MongoDBMongoDB
MongoDB
 
Nodejs
NodejsNodejs
Nodejs
 
MongoDB and Node.js
MongoDB and Node.jsMongoDB and Node.js
MongoDB and Node.js
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
 
Node.js primer
Node.js primerNode.js primer
Node.js primer
 
Best node js course
Best node js courseBest node js course
Best node js course
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 

Similaire à Beyond the MEAN Stack: Thinking Small with Node.js for the Enterprise

MongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of viewMongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of viewPierre Baillet
 
Austin Web Architecture
Austin Web ArchitectureAustin Web Architecture
Austin Web Architecturejoaquincasares
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBValeri Karpov
 
Developing and Testing a MongoDB and Node.js REST API
Developing and Testing a MongoDB and Node.js REST APIDeveloping and Testing a MongoDB and Node.js REST API
Developing and Testing a MongoDB and Node.js REST APIAll Things Open
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development ToolsSofiaCarter4
 
Why You Should Use MERN Stack for Startup Apps?
Why You Should Use MERN Stack for Startup Apps?Why You Should Use MERN Stack for Startup Apps?
Why You Should Use MERN Stack for Startup Apps?Pixel Crayons
 
Techorama - Evolvable Application Development with MongoDB
Techorama  - Evolvable Application Development with MongoDBTechorama  - Evolvable Application Development with MongoDB
Techorama - Evolvable Application Development with MongoDBbwullems
 
TiConf NY 2014 - Alloy 2.0
TiConf NY 2014 - Alloy 2.0TiConf NY 2014 - Alloy 2.0
TiConf NY 2014 - Alloy 2.0Tony Lukasavage
 
Which database should I use for my app?
Which database should I use for my app?Which database should I use for my app?
Which database should I use for my app?Nawaz Dhandala
 
The Next Big Thing: Serverless
The Next Big Thing: ServerlessThe Next Big Thing: Serverless
The Next Big Thing: ServerlessDoug Vanderweide
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialPHP Support
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfiDataScientists
 
Hybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS ApplicationsHybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS ApplicationsSteven Francia
 
NoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOONoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOOJames Hollingworth
 
Mongo DB at Community Engine
Mongo DB at Community EngineMongo DB at Community Engine
Mongo DB at Community EngineCommunity Engine
 

Similaire à Beyond the MEAN Stack: Thinking Small with Node.js for the Enterprise (20)

MongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of viewMongoDB vs Mysql. A devops point of view
MongoDB vs Mysql. A devops point of view
 
Austin Web Architecture
Austin Web ArchitectureAustin Web Architecture
Austin Web Architecture
 
Meanstack overview
Meanstack overviewMeanstack overview
Meanstack overview
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
 
Developing and Testing a MongoDB and Node.js REST API
Developing and Testing a MongoDB and Node.js REST APIDeveloping and Testing a MongoDB and Node.js REST API
Developing and Testing a MongoDB and Node.js REST API
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development Tools
 
Why You Should Use MERN Stack for Startup Apps?
Why You Should Use MERN Stack for Startup Apps?Why You Should Use MERN Stack for Startup Apps?
Why You Should Use MERN Stack for Startup Apps?
 
Techorama - Evolvable Application Development with MongoDB
Techorama  - Evolvable Application Development with MongoDBTechorama  - Evolvable Application Development with MongoDB
Techorama - Evolvable Application Development with MongoDB
 
TiConf NY 2014 - Alloy 2.0
TiConf NY 2014 - Alloy 2.0TiConf NY 2014 - Alloy 2.0
TiConf NY 2014 - Alloy 2.0
 
Which database should I use for my app?
Which database should I use for my app?Which database should I use for my app?
Which database should I use for my app?
 
The Next Big Thing: Serverless
The Next Big Thing: ServerlessThe Next Big Thing: Serverless
The Next Big Thing: Serverless
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
 
All You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdfAll You Need to Know About Using Node.pdf
All You Need to Know About Using Node.pdf
 
Hybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS ApplicationsHybrid MongoDB and RDBMS Applications
Hybrid MongoDB and RDBMS Applications
 
Open source Technology
Open source TechnologyOpen source Technology
Open source Technology
 
Node js
Node jsNode js
Node js
 
Mongodb
MongodbMongodb
Mongodb
 
NoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOONoSQL and CouchDB: the view from MOO
NoSQL and CouchDB: the view from MOO
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
 
Mongo DB at Community Engine
Mongo DB at Community EngineMongo DB at Community Engine
Mongo DB at Community Engine
 

Dernier

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 

Dernier (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 

Beyond the MEAN Stack: Thinking Small with Node.js for the Enterprise

  • 1. Getting small for the enterprise. Beyond the MEAN stack @othiym23 forrest@newrelic.com github.com/othiym23
  • 2. you chose Node for a reason Node is fast Node is modular Node is fun
  • 3. so why turn it into something else?
  • 4. Node is built on the sound engineering values: low coupling high cohesion
  • 5. “ is the of Web development is more pattern-driven: is this social media? is this a storefront? is this… is this a cms? .”
  • 6. moduletopia™ Node loves modules: more all the time available for almost every use case pretty easy to understand (mostly) on GitHub (mostly) freely usable
  • 7. stacks: khakis of the internet familiar: faster to build things you already know comforting: already integrated / tested / shipped easy: developers only need master one set of tools
  • 8. stacks are sticky opaque: full of implicit assumptions and requirements complicated: hard to master, easy to break monolithic: have to pay for the whole thing (but only using some of it)
  • 9. Node says: build only what you need.
  • 10. one size does not fit all
  • 11. one size does not fit all
  • 12. one size does not fit all
  • 13.
  • 14. some Node use cases streaming json apis multiplexing soft realtime proxying …you know, fast web servers
  • 15. & some legacy glue dat: scraping & etl dinosaur taming: Oracle & xml ~50k modules: there’s a pony in there somewhere Windows: best support of any of the major scripting languages
  • 16. the zen of Node self-contained: code over configuration modular: inversion of control & direct dependency injection simple: one small thing in one short file and so: easy for new people to pick up, easy to maintain
  • 17. be nice, not mean
  • 19. instead of MongoDB: Redis fast: data lives in memory powerful: many different data types, lots of operations flexible: many options for high availability and clustering a veteran: battle-tested in Node
  • 20. instead of MongoDB: MySQL* “simple” and “fast” are its best features time-tested some data are just plain relational can actually be managed * or PostgreSQL (<3 )
  • 21. instead of MongoDB: leveldb a do-it-yourself dbms rapidly-growing ecosystem simple not all there yet, but built on a solid foundation
  • 23. instead of Express: hapi plugins instead of middleware configuration-centric optimized for large teams
  • 24. instead of Express: Restify api “compatible” with Express’s meant for building restful apis optimized for json instrumented for operational monitoring
  • 25. instead of Express: Sails actually built on top of Express feels like Rails (including scaffolding) realtime stack-like, but still a creature of parts
  • 27. instead of Angular: browserify puts Node modules in your browser puts Node ideology in your browser everything’s on npm flexible packaging pipeline good for Node-first developers
  • 28. instead of Angular: component similar to browserify built on GitHub not so much with the asset pipeline more focused on client-side development than browserify
  • 29. instead of Angular: bower / Yeoman an integrated, browserfocused workflow very rich asset pipeline good for client-first developers

Notes de l'éditeur

  1. • the name of this talk comes from a thing I’ve seen out there: the “MEAN (or Mongo-Express-Angular-Node) stack” • this isn’t actually a thing, but I understand why some people want it to be, and will go into both what I think their motivations are and why I ultimately think they should let it go
  2. • Facts and Fallacies is a wonderful book, pragmatic and filled with evidence • it provides an empirical basis for a lot of software engineering’s core principles • and these cornerstones of good software engineering are pretty simple: they’re low coupling and high cohesion • put another way, each piece should do only one thing, and do it well • the Node community honors these values in a pretty plainspoken way • publish everything as its own module • don’t put in anything you don’t need
  3. • web development tends to be more pattern-driven: does this new product look like Facebook? does it look like Amazon? does it look like Wordpress? [the Instagram of fax machines / the Netflix of underwear / the Klout of bail bond services (one of those is real)]
  4. • this is practically an ideology in the Node community – modules are plentiful and very focused, and tend to be simple enough that a moderately experienced developer can understand a new module in less than an afternoon [the biggest problem with Node’s module ecosystem is discoverability]
  5. • it&apos;s tempting as a business owner to spec projects out this way, because it feels faster to frame new products in terms of things you already know • and it&apos;s comforting to think in terms of frameworks or stacks, because you know they&apos;ve already been integrated, tested and delivered at least once • this reduces risk and gives some sense of the scope of work • and some devs prefer frameworks because it allows them to master one set of tools and use them to quickly put together new things
  6. • but stacks are sticky – they contain implicit assumptions and requirements that may not match yours – and adapting them can be difficult • the more comprehensive the stack, the more difficult it&apos;s going to be to understand it, and the more likely you are to overlook something, duplicate functionality with slightly different implementations, or introduce bugs or security holes
  7. The nice thing is that Node modules, being designed to do one thing, are generally easy to combine, making it fast to build an app that does what you need – and no more – in a reasonable amount of time.
  8. Node isn&apos;t omakase: it’s not an opinionated framework made up of curated components, optimized for a single use case
  9. nor is it a swiss-army chainsaw: it doesn’t try to do everything, and it’s not good at everything
  10. nor is it whatever the hell this is: Node eschews the abstract and formal in favor of getting things done [google “java abstract factory”]
  11. • it has a double handful of solid use cases, of which some are highly relevant to enterprise projects: • streaming: good for serving large files (GitHub’s use case for a couple years now) * multiplexing: lots of I/O on an economical amount of server (good for games!) • JSON APIs: good for talking to mobile and modern web clients * proxying: good for pulling together a complex back-end network (just look at Walmart) * soft realtime: presence notification and status notification
  12. • pretty much whatever legacy components you have to interoperate with have at least one module out there (except maybe tn3270 emulation) • Azure is already the second-largest cloud, it’s competitively priced (and MS invoices!), and MS is improving it all the time
  13. • Node tends to favor a style of simple composition: • code over configuration • inversion of control via callbacks or promises • direct dependency injection • one thing exported from one short file – you can reason about one whole small problem at a time
  14. • let’s look at some alternatives to the popular components in the MEAN stack • not judging, just showing some of the many different ways Node can be used to solve different engineering problems • choosing the best tool for the job rarely ends up being an objective process anyway
  15. Voxer uses it less than they did, but it was handling thousands of transactions per second for sustained periods of time.
  16. • driver is bare-bones, but that’s a feature — there are other modules for connection pools, ORM-like things • “time-tested” – legacy isn’t always a dirty word
  17. • explosively growing ecosystem, via npm • scale up or down as far as you want
  18. • hapi is still relatively new, but already in large-scale production use • plugged into all kinds of legacy systems, being used as a shim for mobile • grew out of Express, but was tailored to suit Walmart’s needs – a model for other enterprise projects
  19. • follows the same routing syntax, but has its own architecture • great for mobile apps [too cool for a logo]
  20. …and there’s always Geddy if you want something like Rails but smaller, simpler, and more conceptually unified than Sails.
  21. • ideology isn’t necessarily something you want to deal with when writing web apps, but it’s pretty par for the course with large frameworks like Angular or Ember • and browserify really isn’t a framework, it’s a module that glues components together, but it’s meant to be used (with lots of small browser modules) instead of Angular • flexible packaging pipeline without complex external tools
  22. • component is even less of a framework than browserify – not really about control flow and logic, more about putting widgets on a page • easy to use with another browser-hosted framework
  23. • yeoman is an impressive tool for client-oriented developers • focused on integrated workflow over integrated abstractions • not necessarily incompatible with a framework like Angular or Backbone, but not necessarily required, either
  24. • the point of this presentation is: consider your options, and use the right tool for the job • I really like Node – I’ve sunk more than two years of my life into working with it and making it better, pretty much 24/7 – but I’ll be the first to admit it’s not appropriate for everything • it’s easy to malign platforms like PHP and the JDK, but they have a lot of valuable things to offer • choose what you need to solve your problem, and try to design products to use it for what it’s best at