This episode of Herding Code the guys talk to Paul Betts about SassAndCoffee, a NuGet package that adds runtime Sass and CoffeeScript compilation to ASP.NET.
- Jon asks Paul about his role on the Office Labs team [Spoiler alert! Since this podcast, Paul has started a new job at GitHub!]
- Jon asks Paul about why he got interested in Sass and Coffee for web development.
- Jon asks Paul how an Office dev gets away with liking Ruby and Python.
- Paul describes Sass (Syntactically Awesome Stylesheets), a meta-language for CSS that adds in variables, nested rules, inheritance, mixins, etc.
- Paul explains how SassAndCoffee is designed to eliminate fiddling, so he’s gone to great lengths to make the NuGet package just work without any setup.
- Kevin points out that this is at run-time rather than at build. Paul talks about the advantages of run-time compilation (especially interactive CSS edit / refresh) as well as potential downsides (performance, potential for compilation errors). Scott K also mentions that it might be useful for CDN deployment and continuous integration.
- Jon asks about the new package definition file the 1.0 release, and Paul explains how it tells Visual Studio that the .coffee files are to be included with the project build.
- Paul explains how the CoffeeScript compiler works using an HttpHandler, Jurrassic, and V8. Jon asks if he’d looked at IronJS, and Paul describes why that didn’t work for him.
- Paul explains the hurdles he went through to get V8 running under an ASP.NET HttpHandler, since V8 assumes that it will always be accessed from a single threaded process.
- Jon asks Paul about his use of uglify.js for Javascript optimization and compression.
- Scott K asks about the ability to swap out other compilers, e.g. the Google Closure Compiler.
- Paul talks about some of the commits he’s had recently, including support for Nancy, better cache configuration and some useful refactoring. Jon and Paul discuss how some refactoring patches – especially blind Resharpering – are less than helpful.
- The discussion shifts to how Paul got Sass working without requiring the user to have a local Ruby installation, including some crazy tricks with the DLR’s platform resource library to embed a portion of the Ruby standard library as an embedded resource in the NuGet package via a virtual R: drive.
- Jon asks if it’s possible for others to reuse Paul’s Ruby embedding technique in other applications.
- Jon, K. Scott, and Paul discuss commenting policy, and Paul explains why he liberally commented certain sections of the code.
- Paul mentions how the V8 integration falls back to Jurassic in case it can’t run for some reason.
- Kevin asks if Paul looked into creating native ports of Sass or CoffeeScript, and Paul explains why he decided to set up compilers for the original versions rather than port them.
- Jon talks about how he’d looked at Zen Coding and mused about how to implement it in Visual Studio, deciding as Paul had that it’s better
- Twitter question from @elijahmanor about IDE support for Sass and CoffeeScript. Note: since the podcast, the Mindscape Web Workbench has made this available.
- Scott K points out that the MVC 4 roadmap includes support for recipes, which should help with extending the IDE via NuGet.
- Paul wraps up the nerdy internals of SassAndCoffee by explaining how he’s handling loading the 32 and 64 bit versions of the V8 C++ CLI DLL depending on the user’s CPU architecture.
- Jon asks about what server-side hosting requirements are needed to run SassAndCoffee.
- Kevin asks whether the V8 API was easy to work with, and Paul says no.
- Jon mentions that he appreciated all the thanks that Paul had in the readme, and Paul talks about how great it feels to thank people.
- Jon asks what’s next for SassAndCoffee, and Paul says he wants to add Compass.
- Jon (jokingly) mentions that he’s a fan of BrainScript and asks for support.
- Paul and Jon discuss some of the nuttier esoteric languages they’ve seen.
- Jon asks what else Paul’s up to; Paul talks about the Reactive Extensions book he’s working on with Jesse Liberty. Jon asks Paul a bit about what’s new and interesting with Reactive Extensions.
- Jon asks Paul about the interaction between Reactive Extensions and Interactive Extensions, and Paul explains by way of a Reactive Extensions history lesson.
- There’s a discussion on the (intentional) lack of a ForEach operator in LINQ
- K Scott tells his terrifying story from NDC in which Eric Lippert was sitting in his talk.
- Scott K asks about Reactive UI, another of Paul’s projects, an MVVM framework which leverages Reactive Extensions.
Show Links:
- SassAndCoffee git repo, NuGet package
- Paul Betts (@xpaulbettsx)
- Sass
- CoffeeScript
- IronJS
- Jurassic
- V8 JavaScript Engine
- UglifyJS
- Google Closure Compiler
- Zen Coding
- Mindscape Web Workbench
- ASP.NET MVC 4 Roadmap
- Compass
- Silly language things on Esolangs.org
- Programming Reactive Extensions and LINQ by Paul Betts and Jesse Liberty
- Reactive Extensions
- Eric Lippert’s post: “foreach” vs. “ForEach”
- ReactiveUI
- You Are Not So Smart – The Sunk Cost Fallacy
Download / Listen:
[audio://herdingcode.com/wp-content/uploads/HerdingCode-0118-Paul-Betts-on-SassAndCoffee.mp3]