At NDC, K Scott and and Jon talked to Anthony vander Hoorn about the how he and Nik built Glimpse and how it's evolved over time. Download / Listen: Herding Code 177: Anthony vander Hoorn on Glimpse Internals [audio src="http://herdingcode.com/wp-content/uploads/HerdingCode-0177-NDC-Anthony-VDH.mp3"] Show Notes:
  • Glimpse internals
    • (00:50) Jon asks Anthony about the JavaScript work they've done to enable Glimpse. Anthony starts with their initial implementation - just injecting a div into a page. He then talks about some of the issues they ran into over time with a large JavaScript download and a complex codebase to maintain.
    • (02:39) Jon asks if it's still jQuery based. Anthony says it is, though they've thought of removing that dependency. It's mostly used for click event handling. They include a scoped, local copy of jQuery to prevent any conflicts with the host page's use of jQuery.
    • (03:50) K Scott asks about some of the impacts of injecting their Glimpse content into the DOM. Anthony discusses issues with CSS, since the host page's resets and selectors can affect Glimpse's display. Glimpse includes a custom CSS reset and they scope their CSS rules.
    • (05:50) K Scott asks if the shadow DOM and HTML5 specifications for widgets would help. Anthony says yes and talks about how people are doing things now using iframes and how things would be improved. Anthony compares it to the XAML concepts of the visual and logical trees.
    • (07:45) Jon asks how things have changed from just injecting a div. Anthony explains how they use another div to reserve space at the bottom of the page and introduced a message bus to allow publishing and subscribing rather than handling events and callbacks.
    • (10:33) K Scott asks about patterns used to allow for extensibility and plugins. Anthony talks about how they've refactored, first to separate files and then to modules.
    • (12:40) Jon asks if they've looked at using some common single page application frameworks or other JavaScript frameworks. Anthony says they looked at require.js, but it didn't really buy them anything. They also looked at backbone, but again it wasn't worth the tradeoff of download size and complexity.
    • (15:39) K Scott asks what unit testing frameworks they use. Anthony says they've just got a test harness at this point, but a lot of the testing is manual. They're looking at using TestSwarm and BrowserStack to do browser testing.
    • (18:06) Jon asks about mobile browsers. Anthony explains the current mobile support that's been in Glimpse for a while. He discusses some other features they've looked at in the future.
  • Hobbies
    • (20:30) K Scott asks Anthony about his hobbies. Anthony talks about his new interest in growing his own food and a renewed interest in woodworking.
    • (21:55) K Scott asks Anthony about what he's got coming up. Anthony talks about his summer conference schedule and that he's moving to New York to keep a closer eye on Nik.
Show Links: