25
24 1 Presentation by Almog Koren Oct 21, 2014 METEOR A better way to build apps .

Lessons Learned About MeteorJS

Embed Size (px)

DESCRIPTION

A talk I gave at the local MeteorJS meetup. Lessons learned about MeteorJS while developing Linkly a Meteor app - http://linklyapp.com/

Citation preview

Page 1: Lessons Learned About MeteorJS

241Presentation by Almog Koren Oct 21, 2014

METEORA better way to build apps.

Page 2: Lessons Learned About MeteorJS

242Presentation by Almog Koren Oct 21, 2014

Frontend developer,

MeteorJS / NodeJS Hacker

Formerly founder

of Scoreoid

Developer / Entrepreneur

Almog Koren

Speaker / Evangelist Speak at events like

Casual Connect Kiev, GameIS, ect..

Scuba Diver &

Rock Climber

Who Am I?

Page 3: Lessons Learned About MeteorJS

243Presentation by Almog Koren Oct 21, 2014

Lessons Learned

Page 4: Lessons Learned About MeteorJS

244Presentation by Almog Koren Oct 21, 2014

• Goal – build a real world production app using Meteor

• https://linklyapp.com/

Page 5: Lessons Learned About MeteorJS

245Presentation by Almog Koren Oct 21, 2014

METEOR PUBLISH & SUBSCRIBE

• The base for everything.

• Always start with this.

• Security, security

• Meteor (mongo) find starts with this.

Page 6: Lessons Learned About MeteorJS

246Presentation by Almog Koren Oct 21, 2014

EXAMPLES

• Use id’s

• Mongo operators & fields

Page 7: Lessons Learned About MeteorJS

247Presentation by Almog Koren Oct 21, 2014

MONGO FIND

• Used everywhere and all the time.

• Learn mongo operators.

• Client and server

• Remember only what is published is return.

Page 8: Lessons Learned About MeteorJS

248Presentation by Almog Koren Oct 21, 2014

EXAMPLES

• Simple find

• Client side

Page 9: Lessons Learned About MeteorJS

249Presentation by Almog Koren Oct 21, 2014

EXAMPLES

• $in

• Learn them all very well - http://bit.ly/1huk2NU

Page 10: Lessons Learned About MeteorJS

2410Presentation by Almog Koren Oct 21, 2014

IRON-ROUTER

• Use controllers.

• waitOn function

• onBeforeAction

• Subscribe

• Limits

Page 11: Lessons Learned About MeteorJS

2411Presentation by Almog Koren Oct 21, 2014

EXAMPLES

• waitOn, onBeforeAction, Subscribe

Page 12: Lessons Learned About MeteorJS

2412Presentation by Almog Koren Oct 21, 2014

EXAMPLES

• Controller, limit

Page 13: Lessons Learned About MeteorJS

2413Presentation by Almog Koren Oct 21, 2014

COLLECTION2 & AUDIT-ARGUMENT-CHECKS

• A must for the DB not built in.

• Easy to setup.

• Do it as soon as you start.

Page 14: Lessons Learned About MeteorJS

2414Presentation by Almog Koren Oct 21, 2014

EXAMPLES

• Collection2

Page 15: Lessons Learned About MeteorJS

2415Presentation by Almog Koren Oct 21, 2014

EXAMPLES

• Audit check

Page 16: Lessons Learned About MeteorJS

2416Presentation by Almog Koren Oct 21, 2014

METEOR MIGRATION

• Very simple package.

• Developed by Percolate Studio.

• Great when things change.

• Let’s you update your DB back and forth.

Page 17: Lessons Learned About MeteorJS

2417Presentation by Almog Koren Oct 21, 2014

EXAMPLES

• Migrate up to version 2

Page 18: Lessons Learned About MeteorJS

2418Presentation by Almog Koren Oct 21, 2014

QUICK TIPS

• Use SSL on production (issue with proxy) - http://bit.ly/1nxSmMc

• Understand deps / tracker.

• Correct folder structure (server, client, lib).

• Analytics is a pain in reactive apps.

• Handlebars.JS – {{if}} {{else}}

• Blaze Template Engine

Page 19: Lessons Learned About MeteorJS

2419Presentation by Almog Koren Oct 21, 2014

• The Big Meteor List - http://bit.ly/meteorlist

Page 20: Lessons Learned About MeteorJS

2420Presentation by Almog Koren Oct 21, 2014

• https://www.discovermeteor.com/

Page 21: Lessons Learned About MeteorJS

2421Presentation by Almog Koren Oct 21, 2014

• https://www.eventedmind.com/

Page 22: Lessons Learned About MeteorJS

2422Presentation by Almog Koren Oct 21, 2014

Page 23: Lessons Learned About MeteorJS

2423Presentation by Almog Koren Oct 21, 2014

Page 24: Lessons Learned About MeteorJS

2424Presentation by Almog Koren Oct 21, 2014

Q&A

Page 25: Lessons Learned About MeteorJS

2425Presentation by Almog Koren Oct 21, 2014

THANK

YOU