Entity view (Content)

Thoughts on EmberJS

By jeff
Mar. 9, 2016

Back in 2005, Ruby on Rails made an entrance into the web development world and kinda turned things upside down. Overnight, it seemed, everyone was writing good looking web apps fast. A lot of the gains were made by accepting the opinionated software you were handed by the rails tooling. That and the fact that you could generate scaffolding, or boilerplate code, which was functional fairly immediately.

A few CSS tweaks later and you could have that scaffolding looking fairy decent. EmberJS provides exactly this kind of development model for single page apps. Once you have the Ember command line tool (ember cli) downloaded and installed, you're ready to go.

Here are a few commands you might be interested in:

ember new demo

This creates a new project called demo.

ember generate route tasks

This generates an ember router for tasks as well as a file to contain tests for this route.

ember test

This runs the tests you have written -- you did write tests, right?!

ember server

This runs your application locally for you to test and review.

ember build -prod

This builds your application, minifies your javascript and puts everything in the 'dist' folder for you to zip up and deploy to your web server. Getting started with ember is pretty straight forward, at least as far as getting a default layout and some default files created quickly and ready to run in seconds. Adding content, then, simply requires learning a few core concepts. Ember is essentially a full-stack MVC framework. By that, I mean the intention seems to be to write your entire application with Ember rather than sprinkling it into an existing app, which you might do with AngularJS or certainly with Backbone. The basic concepts then are as follows:

  • A route is a url in your application.
  • A model is some JSON representing your data. Each route has an associated model.
  • A template is the view, the HTML that is rendered. This is a Handlebars template which is rendered later into HTML.
  • A component is a custom HTML tag. This is similar in concept to an Angular directive.
  • A service is a singleton which usually would hold long lived data like your user session.

When would you like to use Ember?

From my perspective, whenever you are starting a new application and you need to get something going in a hurry. I wouldn't use this for something already written, per se, but I can see use cases for that. Keep in mind, you may still want or need a server side component running somewhere. So, if you have a Java project already in progress, or you are using a tool like Mulesoft's API kit to generate RESTful webservices, Ember might still be a good fit for you. If you already have something running for your website (JSF, GWT, Django, Drupal, etc) then Ember may not be a good fit to add. You might be better served with something like Backbone or Knockout if you want something minimal or possibly Angular might be a good fit for you.

Use one of the leading HTML5-Based frameworks on your next Ember.js development or mobile app development project. Our Ember.js experts design, develop and deploy solutions that are secure, scalable and flexible to meet your company's needs as they grow. If your looking for top notch Ember.js developers, competitive rates for talent and aggressive project quotes, look no further than Appnovation. Get started today by contacting us to request a quote.

Post Tags: