SlideShare a Scribd company logo
1 of 17
Download to read offline
AngularJS
Angular + Node/Express + MongoDB
Brent Goldstein
brent@kubilateam.com
Full JS Stack
Back Story
● Build a prototype web app
○ Why? -- Learn new technologies, act like a startup
● Focused on SMB enterprise use-cases
○ Lots of data to visualize, manage
● What technologies to pick?
○ Client
○ Server
○ Database
Strategy for picking Technologies
Go with what works -- for you
You’ll need to learn new stuff, it should be fun
If it seems like it does not fit, you can try something else
If you’re a perfectionist, you’re done for
You’ll know when it ‘feels right enough’ and stuff flows
Caveat -- This works for me, figure out your strategy
Client? Lots of choices, but only a few
- I’m a software guy, needs to be like software
- Must have good data-binding
- I’m not really into Java (yes, really)
Ruby/Rails?
- I’ve done Ruby (ok, but review options...)
Javascript Client Frameworks?
- AngularJS
- Ember
Javascript? Really?
Hey, I’ve never coded Javascript.
Is this a language for ‘real’ software?
The answer is……. (let’s diverge for a moment)
Pick a server?
I already said I’m not into Java (really)
OK, so what now?
Well, it needs to be
- Lightweight, FAST
- OpenSource, Manageable
Uhhh yep -- Node.js (more Javascript….)
Node + Express
So, you’re saying I should write my own server
with Node.js?
Yes, definitely. Because Express is frickn’ brilliant
var express = require('express'),http = require('http');
var app = express();
app.use(express.static(path.join(__dirname, 'public')));
http.createServer(app).listen(app.get('port'), function(){
console.log('listening on port ' + app.get('port'));
});
Static file server in a few lines...
Databases, databases
A couple of considerations
- Development, iteration effort
- SQL schema migration and admin is a pain (to me)
Data pipelining
- How will the client model data?
- ORM kinda sucks
Should this be the first slide in the deck?
Crap, another slide on databases
NoSQL pro/con
- Align structure with application model
→ less complex code, probably more performant
- Can’t use relational schema models
→ Well, I’m totally OK with this
- Must learn ‘collections’ and working w/o joins
→ I’m OK with this too
- Fast read performance with right ‘schema’
→ I’m really OK with this
Yet another @#(*! slide on databases
NoSQL Choices?
- Proven in commercial apps
- Good community acceptance/support
- I’m no expert, so just pick one to start
with good Node.js support
Let’s go with MongoDB (at least try it)
Where are we at?
Node.JS and MongoDB for the server side.
These are both Javascript. Well, Mongo is very
Javascript compatible, JSON data
Now I’m definitely into a pure JS client
framework. Which one?
Uhh, try AngularJS. Why? Gut feel after
investigating both, it seems more like software.
Stack Data Pipeline
MongoDB
- JSON data works great → Modeled for the app needs
Server talks to Mongo
- Aggregate / join data
- JSON data works great → NO ORM
- Return through a pure REST api
AngularJS client
- Talks to server only via REST api, never to Mongo
- JSON data works great → NO ORM
Back to that Javascript thing
Javascript is a good core language
Very simple syntax, don’t let this fool you
(an aside, complex syntax does not a good language make)
Closures are super powerful in an event based
asynchronous environment
And, it’s not just the language, it’s the
ecosystem.
Javascript Client Server Similarities
Browsers operates as
- single threaded, event driven, asynchronous
Node.js runs V8 engine Holy crap, it’s the same
- single threaded, event driven, asynchronous
Learn asynchronous Javascript programming
with Angular + Node.js at the same time
Start thinking ‘closure’
Javascript and Node Packages
Huge capability from the NPM Registry
NPM == Node Package Manager
https://npmjs.org/
Some favorites:
- mongodb (mongoDB driver)
- express (web server framework)
- xml2js (xml parser)
- async (synchronizing constructs, serial, parallel)
- aws-sdk (integrate with AWS S3, CloudFront, etc)
Deployment
Again, use what works for your situation
For me, PaaS to start with low admin overhead
- Heroku -- Supports node servers
- MongoLab -- Hosted MongoDB
Both have free tiers for development, and scale
up for true production
thanks
contact: brent@kubilateam.com

More Related Content

Viewers also liked

Fuga dalla Comfort Zone
Fuga dalla Comfort ZoneFuga dalla Comfort Zone
Fuga dalla Comfort ZoneNicola Iarocci
 
Hands on django part 1
Hands on django part 1Hands on django part 1
Hands on django part 1MicroPyramid .
 
Diabetes and Me: My Journey So Far
Diabetes and Me: My Journey So FarDiabetes and Me: My Journey So Far
Diabetes and Me: My Journey So FarJason Myers
 
Filling the flask
Filling the flaskFilling the flask
Filling the flaskJason Myers
 
Intro python-object-protocol
Intro python-object-protocolIntro python-object-protocol
Intro python-object-protocolShiyao Ma
 
Python Static Analysis Tools
Python Static Analysis ToolsPython Static Analysis Tools
Python Static Analysis ToolsJason Myers
 
Introduction to SQLAlchemy and Alembic Migrations
Introduction to SQLAlchemy and Alembic MigrationsIntroduction to SQLAlchemy and Alembic Migrations
Introduction to SQLAlchemy and Alembic MigrationsJason Myers
 
Coderfaire Data Networking for Developers
Coderfaire Data Networking for DevelopersCoderfaire Data Networking for Developers
Coderfaire Data Networking for DevelopersJason Myers
 
RESTful Web API and MongoDB go for a pic nic
RESTful Web API and MongoDB go for a pic nicRESTful Web API and MongoDB go for a pic nic
RESTful Web API and MongoDB go for a pic nicNicola Iarocci
 
Flask - Python microframework
Flask - Python microframeworkFlask - Python microframework
Flask - Python microframeworkAndré Mayer
 
Introduction to SQLAlchemy ORM
Introduction to SQLAlchemy ORMIntroduction to SQLAlchemy ORM
Introduction to SQLAlchemy ORMJason Myers
 
Eve - REST API for Humans™
Eve - REST API for Humans™Eve - REST API for Humans™
Eve - REST API for Humans™Nicola Iarocci
 
We Are All Remote Workers
We Are All Remote WorkersWe Are All Remote Workers
We Are All Remote WorkersNicola Iarocci
 
The Full Stack Deisgner Manifesto
The Full Stack Deisgner ManifestoThe Full Stack Deisgner Manifesto
The Full Stack Deisgner ManifestoRan Segall
 
REST Web API with MongoDB
REST Web API with MongoDBREST Web API with MongoDB
REST Web API with MongoDBMongoDB
 
Impact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilityImpact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilitySanchit Gera
 
Web develop in flask
Web develop in flaskWeb develop in flask
Web develop in flaskJim Yeh
 
Selenium testing
Selenium testingSelenium testing
Selenium testingJason Myers
 

Viewers also liked (20)

CoderDojo Romagna
CoderDojo RomagnaCoderDojo Romagna
CoderDojo Romagna
 
Fuga dalla Comfort Zone
Fuga dalla Comfort ZoneFuga dalla Comfort Zone
Fuga dalla Comfort Zone
 
Hands on django part 1
Hands on django part 1Hands on django part 1
Hands on django part 1
 
Diabetes and Me: My Journey So Far
Diabetes and Me: My Journey So FarDiabetes and Me: My Journey So Far
Diabetes and Me: My Journey So Far
 
Filling the flask
Filling the flaskFilling the flask
Filling the flask
 
Intro python-object-protocol
Intro python-object-protocolIntro python-object-protocol
Intro python-object-protocol
 
Python Static Analysis Tools
Python Static Analysis ToolsPython Static Analysis Tools
Python Static Analysis Tools
 
Online / Offline
Online / OfflineOnline / Offline
Online / Offline
 
Introduction to SQLAlchemy and Alembic Migrations
Introduction to SQLAlchemy and Alembic MigrationsIntroduction to SQLAlchemy and Alembic Migrations
Introduction to SQLAlchemy and Alembic Migrations
 
Coderfaire Data Networking for Developers
Coderfaire Data Networking for DevelopersCoderfaire Data Networking for Developers
Coderfaire Data Networking for Developers
 
RESTful Web API and MongoDB go for a pic nic
RESTful Web API and MongoDB go for a pic nicRESTful Web API and MongoDB go for a pic nic
RESTful Web API and MongoDB go for a pic nic
 
Flask - Python microframework
Flask - Python microframeworkFlask - Python microframework
Flask - Python microframework
 
Introduction to SQLAlchemy ORM
Introduction to SQLAlchemy ORMIntroduction to SQLAlchemy ORM
Introduction to SQLAlchemy ORM
 
Eve - REST API for Humans™
Eve - REST API for Humans™Eve - REST API for Humans™
Eve - REST API for Humans™
 
We Are All Remote Workers
We Are All Remote WorkersWe Are All Remote Workers
We Are All Remote Workers
 
The Full Stack Deisgner Manifesto
The Full Stack Deisgner ManifestoThe Full Stack Deisgner Manifesto
The Full Stack Deisgner Manifesto
 
REST Web API with MongoDB
REST Web API with MongoDBREST Web API with MongoDB
REST Web API with MongoDB
 
Impact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and ScalabilityImpact of Restful Web Architecture on Performance and Scalability
Impact of Restful Web Architecture on Performance and Scalability
 
Web develop in flask
Web develop in flaskWeb develop in flask
Web develop in flask
 
Selenium testing
Selenium testingSelenium testing
Selenium testing
 

Recently uploaded

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

AngularJS with Node.js and MongoDB

  • 1. AngularJS Angular + Node/Express + MongoDB Brent Goldstein brent@kubilateam.com Full JS Stack
  • 2. Back Story ● Build a prototype web app ○ Why? -- Learn new technologies, act like a startup ● Focused on SMB enterprise use-cases ○ Lots of data to visualize, manage ● What technologies to pick? ○ Client ○ Server ○ Database
  • 3. Strategy for picking Technologies Go with what works -- for you You’ll need to learn new stuff, it should be fun If it seems like it does not fit, you can try something else If you’re a perfectionist, you’re done for You’ll know when it ‘feels right enough’ and stuff flows Caveat -- This works for me, figure out your strategy
  • 4. Client? Lots of choices, but only a few - I’m a software guy, needs to be like software - Must have good data-binding - I’m not really into Java (yes, really) Ruby/Rails? - I’ve done Ruby (ok, but review options...) Javascript Client Frameworks? - AngularJS - Ember
  • 5. Javascript? Really? Hey, I’ve never coded Javascript. Is this a language for ‘real’ software? The answer is……. (let’s diverge for a moment)
  • 6. Pick a server? I already said I’m not into Java (really) OK, so what now? Well, it needs to be - Lightweight, FAST - OpenSource, Manageable Uhhh yep -- Node.js (more Javascript….)
  • 7. Node + Express So, you’re saying I should write my own server with Node.js? Yes, definitely. Because Express is frickn’ brilliant var express = require('express'),http = require('http'); var app = express(); app.use(express.static(path.join(__dirname, 'public'))); http.createServer(app).listen(app.get('port'), function(){ console.log('listening on port ' + app.get('port')); }); Static file server in a few lines...
  • 8. Databases, databases A couple of considerations - Development, iteration effort - SQL schema migration and admin is a pain (to me) Data pipelining - How will the client model data? - ORM kinda sucks Should this be the first slide in the deck?
  • 9. Crap, another slide on databases NoSQL pro/con - Align structure with application model → less complex code, probably more performant - Can’t use relational schema models → Well, I’m totally OK with this - Must learn ‘collections’ and working w/o joins → I’m OK with this too - Fast read performance with right ‘schema’ → I’m really OK with this
  • 10. Yet another @#(*! slide on databases NoSQL Choices? - Proven in commercial apps - Good community acceptance/support - I’m no expert, so just pick one to start with good Node.js support Let’s go with MongoDB (at least try it)
  • 11. Where are we at? Node.JS and MongoDB for the server side. These are both Javascript. Well, Mongo is very Javascript compatible, JSON data Now I’m definitely into a pure JS client framework. Which one? Uhh, try AngularJS. Why? Gut feel after investigating both, it seems more like software.
  • 12. Stack Data Pipeline MongoDB - JSON data works great → Modeled for the app needs Server talks to Mongo - Aggregate / join data - JSON data works great → NO ORM - Return through a pure REST api AngularJS client - Talks to server only via REST api, never to Mongo - JSON data works great → NO ORM
  • 13. Back to that Javascript thing Javascript is a good core language Very simple syntax, don’t let this fool you (an aside, complex syntax does not a good language make) Closures are super powerful in an event based asynchronous environment And, it’s not just the language, it’s the ecosystem.
  • 14. Javascript Client Server Similarities Browsers operates as - single threaded, event driven, asynchronous Node.js runs V8 engine Holy crap, it’s the same - single threaded, event driven, asynchronous Learn asynchronous Javascript programming with Angular + Node.js at the same time Start thinking ‘closure’
  • 15. Javascript and Node Packages Huge capability from the NPM Registry NPM == Node Package Manager https://npmjs.org/ Some favorites: - mongodb (mongoDB driver) - express (web server framework) - xml2js (xml parser) - async (synchronizing constructs, serial, parallel) - aws-sdk (integrate with AWS S3, CloudFront, etc)
  • 16. Deployment Again, use what works for your situation For me, PaaS to start with low admin overhead - Heroku -- Supports node servers - MongoLab -- Hosted MongoDB Both have free tiers for development, and scale up for true production