It’s 2013 and I find myself working at Codelation. It’s been great, but we don’t have a blog? How am I supposed to share some of the cool things we’re working on with the world? Well, here’s blog post number one of… one? Who knows, but at least it’s something.
TodoMVC and Ember.js
This is my take on TodoMVC using Ember.js. It does not follow the conventions required to be included in TodoMVC, but that’s not the goal of this project. TodoMVC is just a good “Hello World” example. I invite you to check it out the full project on GitHub:
I did my best to follow the conventions used in the latest version of Ember.js. This includes the new router and Ember Data. A lot of this is still pretty new to me, so I can’t say with entire certainty that I’ve got it all down. This project should at least give you a pretty good idea of how to use the latest conventions.
The directory structure was inspired by the many development environments I’ve used. It should be pretty straight forward, but here’s the layout with an explanation to give you an overview of what’s going on.
Automation with Guard
This directory structure is possible because of Guard. There are other tools that can do this as well, but I tend to favor tools made by the Ruby community.
Guard is responsible for:
- Compiling SASS into CSS
- Copying images, icons, and HTML files to the proper locations in the build directory
- Automated testing with Jasmine
- Running a Webrick server
- So much cool stuff…
I’d love to hear what any thoughts from anyone using Ember on a more regular basis. We’re looking to start a project with Ember, and this has been our little playground for learning. It’s been a lot of fun to work on, and I can’t wait to actually put Ember to good use. Ember’s bindings, computed properties, and observers are such a dream to work with.
Thanks for checking out my first blog post for Codelation. Contact me on Twitter with any feedback or thoughts.