Backbone.js

We have decided to use backbone.js for a project at work, so I have been soaking up everything I can find about it. Tekpub has a great series (currently in development) that I am really digging, and it has got me pretty excited.

I recently checked out the Peepcode preview and it looks pretty promising. A co-worker also pointed me to a great book hosted on Github. I’d also like to check out the NetTuts backbone/.NET videos. Can you tell I like video learning?
🙂

I started thinking that WebAPI would probably work really well with backbone rather than a full-blwon MVC site. I started searching and I have been finding some great links, so I thought I’d compile a list of them here:

I am (obviously) a little late to jump on the backbone bandwagon, so there is a ton of great content out there. I would really like to find a project that can allow C# code to be converted into backbone models, but that may be a bit difficult. It would be great to use the strongly-typed models and then add some spice for backbone and have some Nuget-able library that can convert the C# model/spice to backbone for you to save some of the javascript work. Don’t get me wrong – I am not afraid of javascript. Quite the contrary – I have grown to really love javascript. What I don’t like is doing things twice. Writing the backbone views and then writing a lot of the same type of code on the server-side (for the data persistence) just doesn’t sound appealing.

One thing that could maybe make it all a little easier is to use Massive. I recently swapped out some data access code that was using SubSonic to use Massive (eliminating some other DLLs along the way too) and it is pretty cool. Of course, it uses the dreaded dynamic keyword, so no fancy-pants Intellisense, but that is okay. Methinks that a properly coded backbone app using WebAPI would result in very little server-side code anyway, so some dynamic objects pushing and pulling to and from a db would be no big deal.

SVG CSS Injection

Through some random occurence I stumbled upon PJ Onori’s blog. I noticed a post titled “SVG CSS Injection” – that seemed pretty interesting, so I clicked. I was pleasantly surprised.
🙂

I have always thought vector graphics were really cool. I like the concept of SVG, but I haven’t gotten much into it. I still don’t know what tool to use to make the SVG graphics, but once made, PJ’s technique seems like a pretty cool concept. Basically, he “injects” the SVG graphics in the page where he can then manipulate them with javascript. He can change the color on-the-fly, etc. There is a nice demo page to show off his work.

The code is available on Github, so you can fork it if you think it is awesome. I hope to have a chance to play with it. I may not get to use it at work, but maybe I can sprinkle some SVG goodness on this blog. We’ll see…

ASPState

I just had to configure a fresh server install, and I had a little basic setup. It has been a while since I did anything like this, and I don’t remember how to setup the session state DB.

To install the ASPState session state DB use the following command:

aspnet_regsql.exe -ssadd -sstype p -S {Server} -U {Username} -P {Password}

JS MVC/MVVM Frameworks

My recent dive into MVC has me wanting to do some client-side razzle-dazzle. I have a Tekpub subscription and Rob’s MVC3 vid shows off backbone.js. It looks interesting, but it looks a tab bit complicated and cumbersome. I have to say that the URL router stuff is awesome sauce.

I decided I’d start looking around. Last year on one of the Hanselminutes podcasts he spoke with Steve Sanderson about knockout.js. At the time I wasn’t doing anything with MVC, so I did not think it would be of much value, but I filed it away. (NOTE: I realize now I could use knockout, backbone, whatever with Webforms, but did not realize it at the time.) I must say knockout looks pretty sweet. I watched Steve’s presentation at MIX11 and I really love the two-way binding out of the box (that was the one thing I did not care for much about backbone, though I realize there is a plugin for it).

While both knockout and backbone look really cool, I cannot decide which one to go with? Unfortunately there is not a jQuery-like choice here – there is not a real dominant player that everyone has decided on. So, I decided I’d check out some opinions. There is a great question on StackOverflow (naturally) and it has lots of good info. There are some other options to consider as well:

There is a LOT more out there then I thought. I guess I am going to have to take a little time and weigh the pros/cons of each before I go jumping in to using one – not my strong suit!

SignalR

I first heard about SignalR on Scott Hanselman’s blog. He showed an example webchat app in 12 lines of code. It looked pretty cool, but I did not make the time to take a deeper look.

I was just watching the Tekpub Full Throttle episode with Ayende and that led me to Ayande’s blog, where I saw his post “How SignalR killed RavenMQ.”

So, here is my link to the Github project. My personal reminder to make the time to check out SignalR.

Project Github link: SignalR

Cool new MS toys

I recently found out from a friend about MS Research’s Pex. There is some pretty cool stuff you can do with Pex, and the addition of Moles looks like it could be a pretty awesome testing suite. I have only scratched the surface of these tools.

Another cool new toy is NuGet. NuGet offers Gems-like package management for .Net. Cooler still is it is integrated into Visual Studio. You get a Powershell experience within VS to manage your packages. There is a brief intro video from Phil Haack, but I preferred David Ebbo’s extended tutorial.