SlideShare a Scribd company logo
1 of 12
Download to read offline
Stellar SPAs with
Meteor
Brad Cypert - KCDC 2015
Presenter notes inaccurately reflect what I said during the slides. Bare with me.
Titanium Sponsors
Platinum Sponsors
Gold Sponsors
Huge thanks to our sponsors for KCDC. They made this all possible.
-Mark Andreessen, co-founder of Netscape
“Meteor is what we should have built in 1994 at
Netscape”
Mark Andreessen, Netscape. Yeah, if that’s not a quote to get you excited about Meteor, I’m not sure what is.
• Server-side Javascript started a long time ago.
• It was absolutely terrible, until recently.
• Chrome v8 engine
• Node.js built on ^
• Meteor built on ^ but with client side stuff too!
Server-side Javascript really made it’s first “major” appearance in 1994, at Netscape actually. And it was bad. Like, really bad. And it stayed that way, until a few years
ago.

Google dropped the Chrome v8 engine, which is what node was built on. What we’re talking about today, Meteor, is built on and around node, but it gives you some
client-side goodies too!
• Meteor is different.
• Pub-Sub (Publish, Subscribe).
• Mongo db.
• Persistent data connection (DDP)
• ^ made possible via FREE* web sockets.
*Free as long as the user has a valid connection to
the server.
Who here is familiar with MVC? Awesome, for the next 45 minutes forget about it. Today, we’re thinking different. The only dominant pattern that Meteor respects is Pub-
Sub, or Publish and Subscribe. Data is published from the server, the client subscribes to it, and gets notified when anything changes. 

On that note, our data is stored in MongoDB by default. Meteor works best with Mongo, although I’ve heard of people using other NoSQL’s like Cassandra. Eventually,
support for common relational databases will be added as well. 

All of our data is provided from the server to the client via distributed data protocol, or DDP. Think of it as sockets over HTTP. It’s important to keep in mind that DDP
works as expected as long as the user has a stable internet connection.
• Spacebars, Meteor’s templating solution.
• Spacebars is handlebars++
• Handlebars on it’s own can be annoying.
• Meteor solves this problem.
On the frontend, Meteor uses Spacebars, a tempting solution built out of Handlebars. Think of Spacebars as Handlebars on Steroids. Anyone ever used Handlebars
outside of Ember-CLI or Meteor? Yeah, it’s a pain, right? Little “<script type=‘text/handlebars’>” tags all over the place. Meteor solves this problem by isolating the
template from the JavaScript.
Stop. Two things.
Two things we need to talk about before we live code.
Main.js && Main.html
1
Main.js and Main.html are two files that are built last. Everything in the same folder, or subfolders will be built before them. Why’s this important? In the “Main” files,
you’ve access to everything you’ve bootstrapped or defined in the same folder or subfolders. Just remember, “Mains” get built last. Simple enough, right?
Four Folders every
Meteor developer should
know about!
2
It’s not a BuzzFeed article, I promise, but you really should know these four folders. They help you structure large scale meteor apps, that aren’t polluted with IF
statements. We’ve got a nice graphic to look at here…
server lib client
public
Don’t think too much about it, just focus on the venn diagram. Server and Client are usually separated, right? It’s important to note that lib is shared.
• Server - Backend, serverside JS.
• Client - Frontend, HTML, CSS, JS.
• Lib - Shared resources, references to mongo
collections.
• Public - Assets, pictures, external CSS, fonts.
Here you can see exactly what would go in each folder. 

Server - Backend JavaScript.

Client - Markup, CSS, JavaScript.

Lib - References to shared resources such as Mongo Collections.

Public - Standard public folder, no magic here, just directly serves up assets, pictures, etc.
Let’s Code!
Let’s do this!

Code can be found @ http://www.github.com/bradcypert/KCDC-Demo-App

More Related Content

Similar to Build Stellar SPAs with Meteor

IBM and Node.js - Old Doge, New Tricks
IBM and Node.js - Old Doge, New TricksIBM and Node.js - Old Doge, New Tricks
IBM and Node.js - Old Doge, New TricksDejan Glozic
 
MongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + KubernetesMongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + KubernetesMongoDB
 
Front End: Building Future-Proof eCommerce Sites.pdf
Front End: Building Future-Proof eCommerce Sites.pdfFront End: Building Future-Proof eCommerce Sites.pdf
Front End: Building Future-Proof eCommerce Sites.pdfWP Engine
 
RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)alloy020
 
The Future Is The Cloud
The Future Is The CloudThe Future Is The Cloud
The Future Is The CloudGatsbyjs
 
Microservices in Golang
Microservices in GolangMicroservices in Golang
Microservices in GolangMo'ath Qasim
 
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and KafkaMongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and KafkaMongoDB
 
11 Live Node.js CMS Frameworks
11 Live Node.js CMS Frameworks11 Live Node.js CMS Frameworks
11 Live Node.js CMS FrameworksiScripts
 
Web Components
Web ComponentsWeb Components
Web ComponentsFITC
 
The Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
The Superhero’s Method of Modern HTML5 Development by RapidValue SolutionsThe Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
The Superhero’s Method of Modern HTML5 Development by RapidValue SolutionsRapidValue
 
Introduction to meteor
Introduction to meteorIntroduction to meteor
Introduction to meteorNodeXperts
 
Developing Single Page Apps with Ember.js
Developing Single Page Apps with Ember.jsDeveloping Single Page Apps with Ember.js
Developing Single Page Apps with Ember.jsLeo Hernandez
 
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Applicationadityakumar2080
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allMarc Dutoo
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware
 
Apache Mesos Distributed Computing Talk
Apache Mesos Distributed Computing Talk Apache Mesos Distributed Computing Talk
Apache Mesos Distributed Computing Talk brandongulla
 

Similar to Build Stellar SPAs with Meteor (20)

IBM and Node.js - Old Doge, New Tricks
IBM and Node.js - Old Doge, New TricksIBM and Node.js - Old Doge, New Tricks
IBM and Node.js - Old Doge, New Tricks
 
MongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + KubernetesMongoDB Ops Manager + Kubernetes
MongoDB Ops Manager + Kubernetes
 
Front End: Building Future-Proof eCommerce Sites.pdf
Front End: Building Future-Proof eCommerce Sites.pdfFront End: Building Future-Proof eCommerce Sites.pdf
Front End: Building Future-Proof eCommerce Sites.pdf
 
RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)
 
The Future Is The Cloud
The Future Is The CloudThe Future Is The Cloud
The Future Is The Cloud
 
Microservices in Golang
Microservices in GolangMicroservices in Golang
Microservices in Golang
 
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and KafkaMongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
MongoDB Europe 2016 - Powering Microservices with Docker, Kubernetes, and Kafka
 
11 Live Node.js CMS Frameworks
11 Live Node.js CMS Frameworks11 Live Node.js CMS Frameworks
11 Live Node.js CMS Frameworks
 
Web Components
Web ComponentsWeb Components
Web Components
 
Surge2012
Surge2012Surge2012
Surge2012
 
Micro services
Micro servicesMicro services
Micro services
 
The Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
The Superhero’s Method of Modern HTML5 Development by RapidValue SolutionsThe Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
The Superhero’s Method of Modern HTML5 Development by RapidValue Solutions
 
Introduction to meteor
Introduction to meteorIntroduction to meteor
Introduction to meteor
 
Developing Single Page Apps with Ember.js
Developing Single Page Apps with Ember.jsDeveloping Single Page Apps with Ember.js
Developing Single Page Apps with Ember.js
 
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
 
Meteorjs
MeteorjsMeteorjs
Meteorjs
 
Meteorjs
MeteorjsMeteorjs
Meteorjs
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
 
Apache Mesos Distributed Computing Talk
Apache Mesos Distributed Computing Talk Apache Mesos Distributed Computing Talk
Apache Mesos Distributed Computing Talk
 

Recently uploaded

Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 

Recently uploaded (20)

Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 

Build Stellar SPAs with Meteor

  • 1. Stellar SPAs with Meteor Brad Cypert - KCDC 2015 Presenter notes inaccurately reflect what I said during the slides. Bare with me.
  • 2. Titanium Sponsors Platinum Sponsors Gold Sponsors Huge thanks to our sponsors for KCDC. They made this all possible.
  • 3. -Mark Andreessen, co-founder of Netscape “Meteor is what we should have built in 1994 at Netscape” Mark Andreessen, Netscape. Yeah, if that’s not a quote to get you excited about Meteor, I’m not sure what is.
  • 4. • Server-side Javascript started a long time ago. • It was absolutely terrible, until recently. • Chrome v8 engine • Node.js built on ^ • Meteor built on ^ but with client side stuff too! Server-side Javascript really made it’s first “major” appearance in 1994, at Netscape actually. And it was bad. Like, really bad. And it stayed that way, until a few years ago. Google dropped the Chrome v8 engine, which is what node was built on. What we’re talking about today, Meteor, is built on and around node, but it gives you some client-side goodies too!
  • 5. • Meteor is different. • Pub-Sub (Publish, Subscribe). • Mongo db. • Persistent data connection (DDP) • ^ made possible via FREE* web sockets. *Free as long as the user has a valid connection to the server. Who here is familiar with MVC? Awesome, for the next 45 minutes forget about it. Today, we’re thinking different. The only dominant pattern that Meteor respects is Pub- Sub, or Publish and Subscribe. Data is published from the server, the client subscribes to it, and gets notified when anything changes. On that note, our data is stored in MongoDB by default. Meteor works best with Mongo, although I’ve heard of people using other NoSQL’s like Cassandra. Eventually, support for common relational databases will be added as well. All of our data is provided from the server to the client via distributed data protocol, or DDP. Think of it as sockets over HTTP. It’s important to keep in mind that DDP works as expected as long as the user has a stable internet connection.
  • 6. • Spacebars, Meteor’s templating solution. • Spacebars is handlebars++ • Handlebars on it’s own can be annoying. • Meteor solves this problem. On the frontend, Meteor uses Spacebars, a tempting solution built out of Handlebars. Think of Spacebars as Handlebars on Steroids. Anyone ever used Handlebars outside of Ember-CLI or Meteor? Yeah, it’s a pain, right? Little “<script type=‘text/handlebars’>” tags all over the place. Meteor solves this problem by isolating the template from the JavaScript.
  • 7. Stop. Two things. Two things we need to talk about before we live code.
  • 8. Main.js && Main.html 1 Main.js and Main.html are two files that are built last. Everything in the same folder, or subfolders will be built before them. Why’s this important? In the “Main” files, you’ve access to everything you’ve bootstrapped or defined in the same folder or subfolders. Just remember, “Mains” get built last. Simple enough, right?
  • 9. Four Folders every Meteor developer should know about! 2 It’s not a BuzzFeed article, I promise, but you really should know these four folders. They help you structure large scale meteor apps, that aren’t polluted with IF statements. We’ve got a nice graphic to look at here…
  • 10. server lib client public Don’t think too much about it, just focus on the venn diagram. Server and Client are usually separated, right? It’s important to note that lib is shared.
  • 11. • Server - Backend, serverside JS. • Client - Frontend, HTML, CSS, JS. • Lib - Shared resources, references to mongo collections. • Public - Assets, pictures, external CSS, fonts. Here you can see exactly what would go in each folder. Server - Backend JavaScript. Client - Markup, CSS, JavaScript. Lib - References to shared resources such as Mongo Collections. Public - Standard public folder, no magic here, just directly serves up assets, pictures, etc.
  • 12. Let’s Code! Let’s do this! Code can be found @ http://www.github.com/bradcypert/KCDC-Demo-App