BundleConfig Considered Harmful

Web apps are getting really large and complex and we need to have plans in place to handle the problems associated with apps of that size. We need to anticipate problems to make sure we don’t overlook something that will come back and bite us when our apps start to grow. One of the most overlooked parts of web apps is how our code is organized and delivered to browsers. This covers everything from what a file looks like, to what the script includes look like, and how this differs from dev to production. Microsoft developers (myself included) tend to be setup for failure in regards to this topic, because of the default project template that we get in ASP.NET. In these templates, Microsoft took a very odd and flawed approach to organization, bundling, minification, etc.

[Continue Reading...]

One Response to BundleConfig Considered Harmful

Adopting TypeScript in a large SPA project

We launched a SPA lately that has been both the most complex project and the largest team that I’ve worked on to date and we’ve had a really terrific time with some new tooling that I’d like to share. All of these tooling changes are fairly easy to adopt in any new SPA and have greatly eased some of the pains associated with the development of a typical SPA.

[Continue Reading...]

2 Responses to Adopting TypeScript in a large SPA project

Building an efficient subscription for knockout computed observables

Subscribing to a ko.computed isn’t the same thing as subscribing to a ko.observable. Ryan Niemeyer has written on the topic and I’ll admit, it took me a while to wrap my head around it. I’ll go over the problem and how we bypass it, but the end result is really handy and reusable: a new ‘efficientlySubscribe’ method that is a part of all ko.computed’s.

[Continue Reading...]

3 Responses to Building an efficient subscription for knockout computed observables

Extending Ryan Niemeyer’s protectedComputed

Ryan Niemeyer has a great article on the protectedComputed that he came up with, but I needed a little more functionality out of it. I ended up adding a few things and wanted to get it online for public consumption if anyone found the new functionality useful, so here it is!

[Continue Reading...]

0 Responses to Extending Ryan Niemeyer’s protectedComputed

There’s no reason to NOT use css sprites anymore

Sprites have always been great for web development but it was a significant undertaking to actually implement them – Not anymore though!

Most developers I know didn’t bother implementing them because of the pain associated with maintaining your sprite and the css classes. Sure you could use an online generator but that was a pain because it wasn’t a super simple process to add / remove images. You’d have to go to a site like css-sprit.es or csssprites.com and upload all your images and then update the project with the updated sprite and css. Bleh, that’s a huge pain. Don’t get me wrong, those sites were extremely useful for those that had to use them, but all this stuff should be done for us nowadays.

I love the idea of sprites but this was too much work, thankfully Microsoft came up with an awesome NuGet package that will probably be a part of MVC4!

[Continue Reading...]

2 Responses to There’s no reason to NOT use css sprites anymore