javascript Archives - Byron Salau

How to: Turn off or Disable Ember.js Router

Posted by | javascript | No Comments

Ember really strongly pushes you to use Ember only for pure Ember web applications. Though there are a few of us that like to nest Ember just for a single component on a webpage. While it can be debated that Backbone or Angular is better suited to this situation I personally still really like to use Ember.

Read More

How to: Fix “assertion failed: Ember.Object.create no longer supports defining methods that call _super.”

Posted by | javascript | No Comments

In previous versions of Ember the Ember.Object.create and Ember.Object.extend would behave very similar. You could pass in your overrides/mixins and methods that call _super. However supporting this is very expensive and usually an unnecessary overhead. During normal run-time we need very few extends, actually mostly only during set up, but we do lots of creates which must incur the penalty of supporting these unnecessary features. Read More

Tips for making jQuery selectors faster

Posted by | javascript | No Comments

Unfortunately jQuery selectors aren’t stupid proof. Its all too easy to chuck a long string of junk into your selector and not have a single problem. You might have the attitude of, “meh it works” and not give it any more thought of if there is a better way.

The upside of actually paying attention to your jQuery selectors is: the faster they execute the faster your page is going to render and operate. This is especially true for browsers with slower javascript engines like Internet Explorer and phones/devices with lower memory.

Read More