Tag Archives: JavaScript

Ember.js + Rails = Friends?

I’ve been meaning to learn Ember.js to cross-compare it against AngularJS. So I set myself to writing a Heroku application with Ember and Ruby on Rails. From what I heard they’re are supposed to work together magically… I was kind of right, kind of wrong.

What was painful

Rails required a lot of adjustments to deliver data and Ember.js also requires a chunk re-configuring. There was little out of the box magic between both of them. Authentication with Ember’s simple auth plugin was a mess. Mainly because it, like most Ember related docs, is in a bit of messy transitional state between Ember 1.0 and 2.0. Google search results can be a nightmare since a lot of people are still using and writing material for 1.0.

What I like about Ember.js

The structure of Ember.js over AngularJS is more structured. As it has much better standards and specific ways of doing things. But, if you want to deviate from its standard way of doing things you’ll probably run into an avalanche of issues. Still, this is probably the best MVW / MVC framework for building something with a large team.

The Ember CLI is just as magical as Rails’ equivalent system. It does everything you want and even sets up the beginnings of a nice TDD environment. The CLI is years ahead of the Yeoman AngularJS equivalent.

View the live app

It took me about 2 weeks and 40 hours to get everything fully functional. Source code for the app is available and you can play with it live on heroku at the link below.

https://ember-checklist.herokuapp.com/

Half off my book HTML5 in Action

Today only (April 9th), Manning Publications is offering my book HTML5 in Action 50%. The book focuses on building HTML5 apps with JavaScript through various APIs. I wrote the chapters on visual APIs with Canvas, SVG, and WebGL that walk you through building retro game clones. Book is almost done, so this is a great time to get a copy before it lands on shelves.

html5-in-action
Use code dotd0409au for 50% off

Continue reading Half off my book HTML5 in Action

JavaScript Easing Library – Simple Tween JS

One of the major components missing from my open source game engine has been a lightweight JavaScript easing library. If you aren’t familiar with easing, its used to create unique animation movement that feels lifelike and less robotic. There are general use libraries such as jQuery and completely dedicated JavaScript easing libraries that have the words Tweening in the title. While these tools are great, I found them to be too robust, slow, or undocumented. Because of this I’ve created a new lightweight open source library called Simple Tween JS.

Simple Tween JS is a lightweight open source JavaScript easing library at less than 200 lines of code. Complete documentation and the latest version can be found at the GitHub repo.

Continue reading JavaScript Easing Library – Simple Tween JS

WebGL Game Geometry Destroyer

Creating 3D games with WebGL and HTML5 APIs isn’t an easy task. It requires matrix manipulation, communicating with graphics hardware, and a good understanding of OpenGL ES (mobile version of OpenGL). To try and make these concepts easy to understand, I created a game tutorial in my new book for HTML5 In Action called Geometry Destroyer. By clicking on the image below, you can play it right now.

Geometry Destroyer is a classic space shooter style game, written with JavaScript, HTML5 APIs, and WebGL

Continue reading WebGL Game Geometry Destroyer