February 24, 2013

Ember RC1 Upgrade

Just upgraded to Ember 1.0 RC1 and ran into a problem.  Ember-Rails upgraded Handlebars to 1.0 rc3, and I was getting a JavaScript error saying my cached objects needed to be upgraded or I needed to downgrade my version of Handlebars.  I fixed this by finding the tmp/cache directory in my project and deleting the assets directory.  I restarted the server (not sure if this is needed), and everything started working again.

February 13, 2013

Best 12 bucks I ever spent

PeepCode has a new Ember.js tutorial out..  If you are trying to figure out Ember, BUY IT!  The amount of time you will save will pay for it in no time.

https://peepcode.com/products/emberjs

December 9, 2012

New Ember Router coming

I saw a demo of the new Ember Router on Thursday night, and it looks to be a huge improvement over the existing state machine + router system that is currently used, much closer to the magic the Rails uses.  No release date yet (when I asked, Katz said that some of the stuff he was showing only existed on his laptop yet…), but really looking forward to it.

December 5, 2012

It is Easier to Criticize than Create

So if your having a hard time pulling requirements out someone, make up a bunch of shit so they can rip it apart.  In the end, you may actually get what you were asking them for.

December 4, 2012

Excellent SO on how to structure Ember actions

Check out this post:

http://stackoverflow.com/questions/13023006/emberjs-router-app-views-vs-controllers

and accompanying JSFiddle from the accepted answer:

http://jsfiddle.net/pangratz666/97Uyh/

Not especially the way the router handles the actions coming from the views, and then delegates them out to the controller, which then delegates back to the router to change state.

November 29, 2012

Where did the {{action}} go

The problem - click on the button in my form, and the action in my view doesn’t get called.  Beat head against wall for an hour.

The default target for an action is now the router, not the view, so if you want to put a specified handler in you view or controller, you now need to add a ‘target=”view”’ or ‘target=”controller”’ as part of your action.  Check out http://stackoverflow.com/questions/11050956/ember-js-router-action-to-controller for full details.

November 27, 2012

Beware the type of Controller

Be sure to use the proper type of controller, or else none of your data will show up.  If in connectOutlet you are passing an object, use Ember.ObjectController, if you are passing a list, use Ember.ArrayController.  If your data doesn’t appear to be displaying where it should be, check this.

One hour gone….

Watch out for the underscores

In ember, name your ‘outlets’ in camel case, don’t use underscores, the magic doesn’t work with underscores.

itemTitle, not item_title

This is Javascript, not Ruby….

Reviving the Tumblr

I’ve started a new project converting an existing server based web project over to a snazzy client single page based application.  After playing around with Backbone.js I’ve decided to move over to ember.js, as this is quite a large application, and Backbone isn’t going to cut it (at least without adding a bunch of add-ins).  So prepare for a bunch of ember.js learnings posts - yes, those ‘duh, I’ve been staring at this code for an hour and just found my stupid mistake or figured out the quirk that I hope I don’t ever forget again’ type posts.  

You are warned.

December 19, 2007

MySql Windows Server Logging Problems

OK, that was just three hours of my life sucked into oblivion.  I’m I doing something really stupid, or is MySQL Administrator really that broken?

So what I was trying to do is get long query logging in MySql to work.  Don’t use the MySQL Administrator to do this!   Just edit your C:\Program Files\MySQL\MySQL Server 5.0\my.ini file, and add the following to the end of the file (in the [mysqld] section)

  • log-slow-queries=[log filename or blank for default]
  • log-queries-not-using-indexes

Thats all there is to it.  Do not try and put it in the [mysql] section.  Do not try to use the GUI, which will put it there, but won’t read it unless you change the section name to [MySQL].  Do not think, just do as I eventually did…

And then life is good…