This Week in Meteor #14


by Rishi Goomar

Welcome to issue #14 of TWiM!

If you would like updates like this emailed to you, subscribe at thisweekinmeteor.com

Updates in Meteor Core (MDG)

Reusable Accounts Constructors

This change is pretty big in terms of code modularity and restructuring. There is a lot of changes in the accounts-base package, but it is for the better. Ben Newman best summarizes it in the PR message:

This pull requests reduces the assumption of a singleton Accounts namespace in the accounts-base core package, making it much easier to manage multiple accounts connections without duplicating code.

At a high level, this refactoring was all about replacing the ad-hoc Accounts object with instances of the new AccountsClient and AccountsServer classes, which inherit from AccountsCommon so that methods can be shared (yay isomorphism!).

As an example of a luxury that had to be given up in order to support multiple accounts instances, initialization code that used to run at the top level (like the auto-login code) is now called from the constructor functions.

I think it’s now much clearer which methods and properties are available on the client, on the server, or in both places, since each environment has a distinct .prototype where available methods are defined.

The message is long, but it does give you various reasons on why these changes were made.

Google oAuth prompt option support

A GitHub user, z1mme, made a pull request that allows you to specify which prompt is given to the user when an oAuth request is made.

Configure Timeout for PhantomJS in Spiderable

This commit adds in a feature that allows you to configure a request timeout through the spiderable.requestTimeout variable and that is the amount of time to wait before killing PhantomJS. This is useful for Meteor apps that may have a long page load at times that way the page can still be crawled.

Updates in the Meteor Community

Meteor Interviews #7: Matt DeBergalis

This is an awesome interview between Paul Dowman and Matt DeBergalis, one of the founders for Meteor. Matt talks about how Meteor came about and what drove them to come up with this platform. They discuss more about Galaxy and the various technology that is being used to build it and more on React going along with Meteor. I would say that all Meteor developers should listen to this as it can actually get you even more fired up about Meteor than you already are. :-)

Pagination Problems in Meteor

This is another great blog post by Sacha Greif about the common pagination problem that many developers run into when building a Meteor app. There are many ways to solve this issue though and he goes through three different solutions on how to do so. It is very well written and I recommend reading it.

Poll & Diff Publication Examples

This is a repo created by Chet Corcos which shows you how to publish sets of data that come from another source. For example, if you are polling a REST API for data changes, these examples can help you figure out how to do that properly.

Crafting dropdowns and other components in Meteor

This is a really great blog post by the people at LookBack on creating modular components in Meteor. They show an example of how they did it with dropdowns and it is really great. It is simple, uses Blaze templates, and exposes a global dropdowns API so that it can easily be manipulated by any part of the front end. I highly recommend reading it.

Unit Testing Angular in Meteor

There is a good amount of people that are using Angular as their front end for their Meteor apps. But, there hasn’t been an easy tutorial on how to test the various components of your Angular code and this tutorial definitely shows you step-by-step how to do so and why each of the preliminary parts are needed.

Previewing Telescope’s Big Refactor

In issue #12 of TWiM, I discussed the Telescope Refactor that is going into place. This is a great 5-minute video and blog post that shows you all of the changes that are being made and the reasons behind it. If you are at all interested in Telescope or how to structure a larger Meteor application, take a look at this post.

INSPINIA Admin UI Theme Supports Meteor

This is pretty big. Now, there are template designers that are building Meteor versions of their interfaces and dashboard apps. Meteor is constantly spreading and I’m happy to see it spreading in this area as well.

Template Controllers Pattern

This is a very interesting approach to building modular and reusable components through creating template controllers.

Guide to Full Text Search in Meteor

Since Meteor supports MongoDB 2.6, it is possible to setup a full text search through the database. The awesome people at OK GROW! wrote a blog post on how to do just that. It is a good read and very useful for just about any Meteor developer.

Building a Slack Clone in Meteor

This is a very comprehensive and easy-to-follow tutorial on how to build your own Slack clone in Meteor. This also led up to a discussion in the Meteor forums on actually building an open source app like Slack.

Writing a Package in Meteor

The Meteor Chef, Ryan Glover, is at it again! This is a very detailed tutorial on building and maintaining packages in Meteor. He does a very good job of explaining every portion of package development in great detail. I highly recommend this to anyone that is confused on how to build a package or even to an experienced Meteor developer because you may learn an extra thing or two that you didn’t know before.

Private Package Problems

This article goes through and shows the problem of having no way to truly have private packages in Meteor at this point in time. But, he shows a solution that gets around it by using Git and Git submodules within your packages directory. It is a very interesting solution, but a very good one for private package development.

Building a Basic Yeoman Generator for Meteor

This article goes through step-by-step and shows you how to build a Yeoman generator for scaffolding Meteor apps. I think people should jump on this because if we can get more scaffolds out there that people enjoy, it can potentially get more developers interested in Meteor.

That’s all for this week! Tune in next week for more updates in the Meteor universe.

If you would like updates like this emailed to you, subscribe at thisweekinmeteor.com

Share Share on Twitter Share on Facebook Share on LinkedIn

How Can We Help?

Reaching out doesn’t mean you’re ready to start a project, but we’d love to learn more about the challenge you’re facing, answer any questions, and see if we might be a good fit for working together.

Contact Us