Core values: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negociation Respond to change over following a plan. Notice the word “over”, not “instead of” At its core: 1) Plan and release small iterations. 2) At the end of each iteration cycle, there should be a […]
Monthly Archives: July 2012
Javascript basics: script tag
Attributes: type: The language your script is in. Defaults to javascript since HTML5. In older browsers you were able to run alt languages, like VBScript in IE. In fact, it is supposed to actually point to the mime type of your script. The syntax is, for example: type=”text/javascript” language: not used. Deprecated. async: When set to […]
Backbone.js coding style and best practices
Stating the obvious: 1) Try to use hash tagging and history to connect disparate views as much: you keep them independent from each other this way, and back button compatible. In other words: don’t spawn views programmatically, let the router do the work for you. 2) As much as you can: one view = one template […]
Backbone.js: event aggregation and AMD
Great pattern to decouple your modules, and still have clean mechanism to communicate between them. 1) Create a generic “Notifier” module: define([ ‘underscore’, ‘backbone’ ], function(_, Backbone) { var notifier = _.extend({}, Backbone.Events); return notifier; }); 2) In the two + views or models that you want to connect, include the notifier via your AMD […]