background preloader

EMBER

Facebook Twitter

Understanding Ember.Object. Almost every object in Ember.js is derived from a common object: Ember.Object.

Understanding Ember.Object

This object is used as the basis for views, controllers, models, and even the application itself. This simple architectural decision is responsible for much of the consistency across Ember. Because every object has been derived from the same core object, they all share some core capabilities. Every Ember object can observe the properties of other objects, bind their properties to the properties of other objects, specify and update computed properties, and much more. As you'll see in this post, it's easy to get started with Ember.Object, but also easy to overlook some of its capabilities.

Creating objects. The Software Simpleton: Ember.js Routing - The Director's Cut. WARN: This article is now out of date.

The Software Simpleton: Ember.js Routing - The Director's Cut

Check this post for a more up to date article on ember routing. I’ve had a number of requests to update this post which discussed a solution to the lack of routing at that time of writing in ember. This solution used an addon called the ember-routemanager from Gordon Hempton. A lot in Ember has changed since that post and Ember now has its own full blown routing solution that is not a million miles away from the route manager I blogged about. I believe Gordon Hempton who created the original ember-routemanager is now an ember core member which might explain the stark similarities.

Enough of the old and on with the New The new ember router has been on the master branch for a while now and it is an emerging pattern that is prone to change and indeed has changed quite a bit in its short existence. The Ember router extends the very elegant ember statemanager: Below is a test that verifies a root url of ‘/’ will transition to the home route: Nested Routes. Ember pagination. Ember.js – Binding a button action from an #each loop to its own model. Ember.js and connectOutlet template context issue. Emberjs/data.

Ember.js 1.0 bind controller to controller. NYC Ember Meetup - August - Cloudee. Luke Melia » Architecting Ember.js Apps. CodeBrief. Useful Ember.js Functions - holy moly. While developing stuff with Ember.js I stumbled upon some very nice and handy functions which are built in.

Useful Ember.js Functions - holy moly

This post lists some of them and describes in a short what they are used for. Hey! This article references a pre-release version of Ember.js. Now that Ember.js has reached a 1.0 API the code samples below are no longer correct and the expressed opinions may no longer be accurate. Ember The following functions are defined in packages/ember-runtime/lib/core.js and packages/ember-metal/lib/utils.js respectively. none Returns true if argument is null or undefined. empty This utility function constrains the rules on Ember.none by returning false for empty string and empty arrays. isArray Use this to check if a value is an array. MakeArray If you need a given object to be an array you can use this function. TypeOf Get the type of the passed argument. compare This function compares two objects of possibly different types. IsEqual Checks if the passed two arguments are logically equal. Copy inspect w()

Ember.js VIEW

Luke Melia » Using Ember.js with jQuery UI. Note: This post is a refresh of Yehuda Katz’s post of June 11, 2011, Using SproutCore 2.0 with jQuery UI.

Luke Melia » Using Ember.js with jQuery UI

Thanks to Yehuda for his review. Newest 'ember.js' Questions. Ember fiddle. Learn.Ember.js. This is an early prototype containing just the first page of a planned interactive tutorial on Ember.js, a JavaScript framework for building ambitious web applications.

Learn.Ember.js

For more details about the ongoing development of this tutorial, see this blog post. Unfortunately, this tutorial application does not work in Internet Explorer (yet). In this tutorial you'll explore the basics of building a web application using Ember's declarative bindings and MVC-friendly features. You'll learn how to define your UI's appearance using client-side HTML templates; how to define model, view, and controller objects using Ember's prototype-friendly class system; and how to use property accessors and declarative bindings to keep everything neatly synchronized. In the upper right pane is the Javascript code of a complete, if simple, Ember application that describes the name of a person. Click to see what this code does. (Code not working? As you can see, it just lists the first and last names as "TODO".

Examples