Posts

Showing posts from June, 2012

Project Pitbull: Sprint 1 & 2

My Coding I fleshed out the details of CartCollection, ProductModelModel and CartLineItem yesterday. We now have a basic flow which works form start to results to add to sizes hopup to add to cart. This will allow Bill work on Cart page display and also support PDP. Next: some code cleanup, add Jasmine testing and code walkthrough. dust render calling custom functions I needed a way to highlight a selected element in a html select when iterating over a list of options. I also needed a way to have the dust idx start at 1 not 0 as it does by default. I knew you could call functions in dust but didn't know how. There is not alot of dust help articles out there but over the course of a few hours trial and error I figured it out. You can pass a function to the dust render call as part of the object passed and then invoke that from the template calling a js fn dustIdxPlusOne() from template:   {dustIdxPlusOne} ..yeah just like an attribute. In this case dustIdxPlusOne() return

Project PitBull - Development proper kicked off

 After over a week out of the country due to family bereavement I am back on project PitBull. Development - Ward has made great progress on the steps and navigating back an forth. - I am on the learning curve with dust and using partials. Yesterday I figured out partials and passing data. A question in my mind is how best to call the partials? from within another template or from within a backbone view? and when to do which. - I needed to support a list of lists of models. Backbone.js collection is for models not for a collection of collections. I could override parse in the collection and build the hierarchy out or I could use a plugin (tbd) to support. But for now I will just take the simpler route and code a Backbone Model object on which I call fetch and that model object will store the hierarchy. It's aint Backbone classes but perhaps I don't need such classes if its all just for display purposes on the ui. I can still navigate the object hierarchy using object notati