Ember.js Minimal Example

Recently I have been fooling with Ember.js.  Documentation is… not adequate.  At first it seems pretty good, but then it turns out:

  • The main documentation is terrible about showing anything but isolated pieces, and there are no simple but full examples.
  • Lots of the blog posts and other notes out there were invalidated by some major API changes over the last couple months.

So, it’s a fairly steep slog to get started.  Expect some ongoing notes.  I think this is about the smallest example you can put together that does anything:

<html>
<head>
<script  type='text/javascript' src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script  type='text/javascript' src="http://cloud.github.com/downloads/emberjs/ember.js/ember-0.9.6.min.js"></script>

<script type='text/javascript'>
App = Ember.Application.create({
  ready: function() {
  }
});

App.Dude = Ember.Object.extend({
  name: null
});

App.myDude = App.Dude.create({
  name: "Broderick"
});
</script>
</head>

<body>
<script type="text/x-handlebars">
{{ App.myDude.name }}
</script>
</body>
</html>

HTML5 Game Markets

Rich over at PhotonStorm posted this the other day:

Insert Coin to Continue: The HTML5 Game Sponsorship Market

It’s a very good rundown of the HTML5 game market.  Most important to me was I finally understand a bit of the distinctions and pros and cons between “app” games versus mobile HTML5 games like he’s talking about.  It seems like for the former you’re either selling the app outright, and competing against some heavy hitters, or going for micro-transactions, which can also be pretty hard and unpredictable.  The latter is in some ways much more like the Flash market, where portals want to host your game so they can get eyeballs on their ads.  I’ll have to think a bit about what this means for the Haxe app based approach we’ve been focusing on here.