So after returning from Code camp NYC, I got back to the office with a bunch of new toys that I absolutely had to integrate as part of our solution. I started messing around a web framework called “Hot Towel”, which includes “Bootstrap”, “Durandal”, “RequireJS” and “Toastr”. Out of the box, it compiles and the demo thing works great, however the demo is not feature rich, so immediately I’m off for documentation on how to do the next things.
1. Do something after the view is composed
2. Make multiple columns with Bootstrap and the div tag
So starting on the first problem with DurandalJS, I’ve written a framework over Microsoft Prism before, so I understood a lot of the goals of Durandal and I was following the documentation of where to place a function, such that when the view is attached it will fire a function. All over the interwebs, I found the function “viewAttached” and write such a method in my view model to no avail. I stepped through the code and was ready to roll up my sleeves and step through the Durandal code.
However, before I do, something tells me it’s got to do something with the name of the method. So I decided to look up the available methods in a view model and discovered my hunch was correct. There was a breaking change in the official 1.0 release of Durandal that changed the method name from “viewAttached” to just “attached”.
So after the pain of dealing with the Durandal version number, I had another painful distraction of making Telerik ListView control correctly function in acquiring item selected.
Hours after I deal with that, I start digging into the next issue of multiple columns with bootstrap. I’ve followed the documentation and it’s just simply not working. I’m messing with the debugging tools in IE, Firefox, Chrome and Opera, not exactly seeing why the css is not working like the examples on the bootstrap site.
I then finally waded through some magical stackoverflow link to find someone commenting about http://bootply.com/. Where I’m able to test and experiment. However, the class attribute names don’t match the documentation. Surely something is wrong with bootply… then I see it… again!!! literally 4 hours after the previous issue, I still wasn’t smart enough to check it.
The version number was off and there were breaking changes. Breaking changes that altered the class attribute names. Sure enough I update bootstrap and I’m off on my way with working divs.
My lesson learned is that when working on these latest and greatest technologies, make sure to double check versions when looking up articles as breaking changes can really hurt you and consume mountains of time.
Leave a Reply
You must be logged in to post a comment.