Meteor has always piqued my interest. It is a relatively new full stack framework that makes typical web development seem outdated. Typically, a web developer would need to learn Javascript for the front-end and a additional server side programming language for the back-end (PHP, Python, Ruby, Java, etc) to get a complete web app up and running. Now with Meteor, we wouldn’t have to grapple with all these different technologies to build a complete web app. It allows us to write the entire web app in Javascript, getting more done with less knowledge.
I played around with Meteor a while back and when I discovered that the authors of Discover Meteor were kind enough to make their book free today, I jumped at it. The book takes a ‘learn as you do’ approach and you build a fully functional web app as you go along. Concepts were laid out clearly. Each section had links to each commit for you to reference.
One key feature that I liked about Meteor is that with every change that you make to the code, the browser automatically refreshes to reflect that change. It’s a really small thing that improves the entire development experience with the immediate feedback. Overall, it was a fun read and I learnt a lot on how Meteor works and I’m totally looking forward to build a complete web app with it real soon.
Three pieces of Meteor did the work. DDP, the distributed data protocol, ran over websockets and gave the client a live query channel into the server instead of request-response HTTP. On top of it sat miniMongo, a client-side cache of the relevant collections that spoke the same API as the server, so the same find calls ran on both sides of the wire. The reactivity wired it together: change a document on the server, the client’s cache updated, and the screen redrew, with no refresh and no manual DOM surgery. The instant refresh I kept hitting while reading was not a dev-server comfort bolted on top, it was the architecture showing through.
One language everywhere was the other half of the pitch. In 2013 the standard stack was a server language rendering templates plus jQuery on the client, two runtimes passing strings back and forth. Meteor put JavaScript on both sides with shared code and shared data structures, and the book leans on that by building Microscope, a Reddit-style posting app, one chapter and one linked commit at a time, which is why it reads as a build-along rather than a manual.
The framework’s peak passed: React took over the client, and Meteor’s own company built Apollo, the GraphQL toolchain that outgrew the framework itself. The ideas scattered into the wider ecosystem and thrived there. Live queries came back as GraphQL subscriptions, realtime-by-default came back in channels and presence systems everywhere, and writing the whole app in JavaScript stopped being a framework’s novelty and became the default assumption of web development. Read now, the book still works as an introduction to that style of thinking, which is more than most framework books from 2013 can say.
Published on by Stanley