IronRouter

An overview of the iron-router package and some of its new features.

Good job! That's it for "IronRouter."

Need a second look? Watch again

IronRouter

In this episode, I'll walk through some of the new features of the iron-router package. Things have changed a bit since the last router episode. We'll walk through setting up routes, using a layout, waiting on subscriptions, and the new render method of RouteController.

  • Meteor
  • Tutorial
## Thoughts on EventedMind, IronRouter, Meteor packages and PRs. EventedMind is a place dedicated to learning. Sometimes I'm learning the material along with you, and sharing as I go. Other times, I'm teaching from experience. And sometimes, I'm learning and teaching by experimenting with or creating new projects. In the future, I hope to cover projects and Meteor packages that other people have created as well. Let me tell you a little about iron-router's evolution, and how I see it in the context of Meteor packages and Core. To start, the IronRouter project had many contributors. It might not be directly reflected in the commit log, but don't let that fool you. Ideas, design improvements, critical feedback, and previously filed GitHub issues from mini-pages and meteor-router were a part of the process. And the process was messy! When Tom (@tmeasday), myself and a few others first sat down to design the initial API, everyone yelled out use cases and ideas. I tried to make the meeting more orderly, and I was collectively overruled! The proverbial "design by committee" was in play, but I did manage to take some notes even though I probably only understood about 20% of the use cases being presented. The next phase of the project was directly related to a redesign of this site. I locked myself in a cave (with a nice view and big monitor) and cranked away. I must have completely started over at least ten times in a grueling iterative process. I started implementing from a partially blank slate, influenced by other frameworks and projects of course. But on each major iteration, I presented and got critical feedback from Tom and a few others. The ideas and use cases from the initial design session began coming into play and resulted in more polishing and rework. As we started inviting people to the project, we got even more feedback. The entire process was a combination of cave programming, design by committee and iterative polishing. So why work on a project that is obviously on the Meteor roadmap? **The package system is a great way to battle test use cases for Meteor Core.** Meteor engineers are incredibly capable, and the core code base represents this. Core code has to be rock solid. Edge cases need to be properly handled. Other parts of the platform must be understood and accounted for. APIs need to be carefully designed, as they could end up in many code bases for a long time to come. Packages don't have these strict constraints. You can throw up a package, let a few people try it out, get the ideas flowing, and you're off to the races. But, packages provide a powerful way for community members to contribute and positively influence the direction of the platform to reflect real use cases in the field. So the goal of the project is not a PR merge, but rather, an opportunity to start banging away at routing use cases early and start a dialog with the community and with Meteor core developers. The ultimate goal, of course, is to contribute in some way to making Meteor the best possible platform. **I needed a better Router and couldn't wait!** The EventedMind site was completely rebuilt in the last release. I really wanted the code base to be stable for a while and that required having a Router, like right now. **I like to build things and working on projects helps me become a better developer.** EventedMind is all about learning and leveling up on technology skills; me included. Every once in a while this requires reinventing a wheel or two, and working through hard design and implementation challenges. I hope other people can jump in and contribute on some level, even if just gaining a better understanding of how a router works. Special thanks to the several people who contributed ideas, code, or just battle tested iron-router early on. I am compiling a list and will update this post. Sincerely, Chris
Join the Discussion

Want to leave a comment? .