Data with Rails and Ember CLI, Part 2: Building the Front End

In this post, we will finally be setting up the Ember front end to request data from the Rails back end we got up and running in my previous post: Data with Rails and Ember CLI, Part 1: Setting up the API. If you’ve already followed along with those steps, then you’re all set to get started here! Read more on Data with Rails and Ember CLI, Part 2: Building the Front End…

Data with Rails and Ember CLI, Part 1: Setting up the API

Earlier this year, I wrote a post about Getting Started with Rails and Ember CLI shortly after on-boarding onto my project. I didn’t originally plan on writing more tutorials with those technologies, but months after that guide was published, I received a comment asking if I would considering doing just that.

Read more on Data with Rails and Ember CLI, Part 1: Setting up the API…

Making Ember Objects More Strict: Only Access Defined Properties

Ember.Object provides a flexible starting point for creating models in a single-page web application. It can hold simple data members, define computed properties that automatically update when dependencies change, run a callback when properties change, and extend parent “classes” to create new types with additional members.

That said, I think Ember can be a bit too flexible at times. Read more on Making Ember Objects More Strict: Only Access Defined Properties…

Embedding Ember in Existing Apps

My current project, an online student assessment tool, involves adding features to a Rails app built in the 2011/2012 Rails 3 era. The app was also built using Backbone.js, a custom templating language, and raw JSON responses. It was developed using good development and design practices (such as TDD, SRP, etc.), but many of these technologies have been superseded by modern frameworks such as Ember.js or Angular. Active development on this project was not going to be easy or fun.
Read more on Embedding Ember in Existing Apps…

Creating Reusable Page Layouts in Ember

Creating components is a great way to remove redundancy in Ember.js apps. For example, you might have a custom button that is used over and over in many different views but is defined only once. This is great, but what if you want to reuse an entire nested page layout instead? It’s easy to do with yields and some Ember magic. Read more on Creating Reusable Page Layouts in Ember…

Safely Binding Unescaped Content in Web Applications

“Snakecharmers,” a chromolithograph by Alfred Brehm, c.1883

Binding unescaped HTML or CSS content on a web page is a scary proposition for most web developers. The idea conjures up black-hat hackers attacking your company’s infrastructure and high-visibility hacks. In fact, cross-site scripting vulnerabilities may exist on as many as 70% of all web sites.

In this post, I’ll explain what cross-site scripting vulnerability is, when it’s OK to silence warnings, and how to do so in two popular JavaScript frameworks: Angular and Ember.js. Read more on Safely Binding Unescaped Content in Web Applications…

Implementing an Offscreen Menu in Ember.js

Offscreen menus have become a standard in mobile apps and web interfaces over the past several years. I was recently given the task of implementing an offscreen menu for the Ember.js app that I have been working on over the past several months, so I figured I would share my solution.
Read more on Implementing an Offscreen Menu in Ember.js…