So last Friday I did a code challenge for a company that I’m really interested in and had to use a completely new to me JavaScript framework. That framework was Ember. I’m quite familiar with React since that is what is taught in Flatiron’s Web Development Bootcamp, but was a little nervous diving into something I knew nothing about.
Luckily, I had the wherewithal to research the company before I even knew they were going to send me a code challenge and set up a basic Ember app earlier that morning. It was still a bit of a challenge (see what I did there) to code with a completely new framework, but I was able to get through it. It was rather simple to set up and install all of the dependencies and get things up and going.
I started off by familiarizing myself with the project, the tests, and the written requirements in the read me. Each route in the Ember project they sent me had a bit more of a description detailing all of the requirements, so that was rather nice. This helped give me a base for what I needed to accomplish even if I wasn’t sure about Ember’s syntax and how to structure everything. Luckily, it was still all JavaScript, HTML, and CSS, so I had all of that base knowledge to fall back on.
One of the main differences between Ember and React that I found was in how you handle writing your actual HTML. React uses JSX and Ember uses handlebars. I read quite a few articles saying that at Ember 2.0 it switched to HTMLBars, but the official Ember docs talked about handlebars under the templates. I know that HTMLBars is built on top of, and improves on handlebars, but I’ll have to do some more research to get all of my terminology correct. I had used handlebars for a short period of time in my course work but wasn’t really in love with it.
One thing I did find nice about handlebars while doing this challenge is that it makes the separation between views and your JavaScript code more distinct. Obviously you have to include properties in your hbs files, but the distinction between a .hbs file and a .js file is real nice.
In conclusion, the code challenge was a fun and rewarding experience. I’m really looking forward to reading up on Ember docs and gaining a much more in depth knowledge of this framework.