Day thirty one: trello clone

October 26, 2015

Trello is a neat application to organize tasks. Today I wanted to recreate the basics of the excellent application.

live demo

The clone is build on top of Meteor. A reactive full stack platform which is perfect for building realtime applications. Angular is used on the front end making this application a blast to build.

Angular with Meteor is awesome

I was a little skeptical at first because I like to use the standard rendering engine that Meteor provides. I also remember how bad Angular integration was when I started developing applications with Meteor. However, Angular support has been made official. Making it a very good choice to build full stack applications with. So what is so awesome about it? To answer that question I would like to refer you to the official tutorial on the Meteor website. I promise it is worth the read!

challenge

The biggest challenge of today was to limit the amount of subscriptions each client has to make with the server. The application exists of three collections.

  1. Boards
  2. Lanes
  3. Tasks

The database has been build so that each lane has a relationship with a board. Every task has a relationship with a lane. Now when the user creates a board and has three lanes. The user would need to subscribe to all three of those lanes plus the board itself. Not to mention that the amount of subscriptions grows with every existing task. This would mean a lot of subscriptions. Which is bad.

To solve this issue I used the publish composite package. This allowed me to publish an entire board with all its relationships. The user can subscribe to a board and now get all the lanes and the tasks in only a single call to subscribe!

Thank you for reading and don’t forget to leave a star on the repo.

Comments