1 of 11

Slide Notes


DownloadGo Live

My 1st Meteor App

Published on Nov 22, 2015

Using Meteor for around four months now, this presentation is about how I implemented some key features of my app and some lessons learned regarding developing with Meteor in general.

PRESENTATION OUTLINE

My 1st Meteor App

Learnings and Insights

Topics

  • Peek at the app
  • Implementing search+pagination+filters+sort
  • General Advice & Learnings
quick poll:
- who is meteor newbie?
- who is experienced JS dev?

please give me feedback on where you want to dig deeper

Joomla Templates HOG

  • Joomla! CMS is used by 3% of all websites
  • Problem: Joomla templates are scattered across the web
  • Solution: search engine for those themes - concise, fast, daily updated

Show the App

play around @ openocean.meteor.com
Please provide feedback if you stumble upon something wired or especially like something!

Search + Pagination + Filter + Sort

  • inspired by meteorhacks:search-source
  • Sessions manage state
  • ccorcos:subs-cache for page-caching
  • UI actions set Sessions
  • Template-Level Sub and function that sets data context read out Sessions
  • Open issue: reactive filter counts
use package or not:
production or development
functionality not anymore, implement it myself like search source or pagination
lost much time for that

- discussion/resource about Sessions: https://forums.meteor.com/t/patterns-and-practices-for-passing-data-between...
- what's your opinion? what is bad about using sessions? what should you be aware of when using them?

Advice & Learnings

  • Namespace your app
  • Know who to trust in the community, follow the news
  • Use schema for collections (or go for complete model layer)
  • Use immutable data structures
  • Keep functions small (one screen)
  • Use TDD (where confidence is needed)
disclaimer: I'm not an expert, Please share if you have different opinions or correct me if I'm wrong.

- use Nicholas Zakas' helpful little function

Meteor is moving fast!
you can easily get distracted simply by the amount of stuff that's going on. So you have to focus on the important stuff (important to Meteor in general) and important to your specific project/use case. Knowing key members of the community helps a lot with that. Because you can trust their opinions. As you newbie you just don't know what's important and what is just interesting to read but doesn't have a long lasting impact.

- identify MDG memers
- identify the top contributors/ most active people in the community: Arunoda, Josh Owens, Chet Corcos, rclai, David Weldon (highly active on SO, cool blog!) usw. -> know whose opinion to trust
- subscribe to every Meteor news-channel that you can: thisweekinmeteor, crater.io, forums, david weldons blog, meteor interviews

- but: don't get distracted by all the activity! set aside some fixed amount of time to consume the news, decide what's relevant to your current project or possible future projects and then get back to work

schema
- David Weldon article, Llama article, Astronomy package

Immutable
- it's worth the effort
- I had lots of bugs that were difficult to trace because of mutable state
- for example when you use schema it mutates the object

Namespace the app

  • better code organization
  • don't pollute the "global" scope too much
  • use little helper function
  • App.Module.Method

Tap Into the Community

  • Identify competent people
  • MDG members
  • Others: Arunoda, Josh Owens, David Weldon, Abigail Watson, Chet Corcos, rclai, ...
  • Subscribe to Meteor news channels
- David Weldon, Abigail Watson, rclai
watch their blogs

Use TDD

  • workflow: red - green - refactor
  • confidence!
  • manage complexity!

- Sanjo:Jasmine package, well maintained
- Jasmine features: simple syntax, Spies!
- TDD workflow: red, green, refactor
-> small steps, quick feedback
-> detect bugs easily (must be in last added code)
-> safe against regression

-> confidence!
developing software is about "managing complexity" (McConnell?)
- I used TDD for scraper code which grew quite complex and where failure could have severly bad consequences (getting blocked)
- why complex? -> lots of small functions build larger structures


-> confidence of TDD helped me a lot

-> less time (and nerves) spent on debugging

who knows about "meteor debug"?
-> easily debug server side code

TDD & Meteor: Resources

Thanks