Month: January 2015

Passing Data to Angular from ASP.NET MVC Views

Angular is a great tool for enriching an ASP.NET MVC application, but you must bridge the gap between your client-side code and your server-side code in order to use it effectively.  In this post, I’ll show you a couple of ways that you can pass data from your Razor views to your AngularJS components. [more]…

Read More

Random Link Roundup–1/29/2015

Are we really almost 1/12th of the way through 2015?  Where does the time go?!?  [more] For the .NET crowd… Brant Wheeler has a nice write-up on doing  Calendar-Quarter Aggregation in MongoDB. C# 6.0 is coming!  If you haven’t memorized the new features, MSDN has a good overview. I’m a big fan of partial rendering…

Read More

Entity Framework, Enums, and TINYINT

Entity Framework supports Enum properties on your model, but there’s one little gotcha that’s bitten me on more than one occasion now.  In your database, you may be tempted to save space by configuring the backing column to use an integer value that takes up less space than a normal int, such as a TINYINT…

Read More

On Occam’s Razor and Refactoring

Continuing on with my ramblings from last time: refactoring is a powerful tool that can help you transition your application (solution) from the complex end of the spectrum towards the simpler end. [more] Let’s consider our simple problem again: “Given an integer X, find the next integer larger than X.”   And our overly-complex solution: f(x)…

Read More

SpecsFor 4.3.1, SpecsFor Helpers 1.4.1 released!

I have two bug-fix releases for you tonight.  First, SpecsFor now supports partial matching on List types, including generic lists.  It works exactly the same as an array.  Here are the passing specs to illustrate what you can do now: [Test] public void then_it_does_not_throw_on_a_matching_pair_of_objects() { var obj1 = new TestClass { Name = "Name", Items…

Read More

Random Link Roundup–1/23/2015

Here’s the first official roundup of 2015!  In a few more years, perhaps you’ll be able to enjoy my roundups in pure holographic beauty! [more]   On the .NET front… Attribute routing is getting better in MVC 6! You can now use Application Insights with Azure Websites.  I actually thought you could already do this,…

Read More

On Occam’s Razor and Software Development

I had an epiphany of sorts the other day.  Maybe what I’m going to describe is obvious to everyone else out there, but it just “clicked” for me all of the sudden:  Occam’s Razor is foundational to our jobs as software developers. [more] What is Occam’s Razor It’s a principle that comes up a  lot…

Read More

Simple PowerShell Function for Publishing to NuGet

I’ve created a simple, re-usable function you can put in your PowerShell profile that will publish a package to NuGet or a local test feed.  This little script allowed me to remove redundant scripts that were scattered across my various projects. [more] I maintain a lot of packages on NuGet these days (seven at last…

Read More

Enforce Project Conventions Using NUnit and SpecsFor

Does your company or project have certain conventions that you are required to follow? Maybe adding a copyright header to each file?  Or using the correct layer super-type for all your controllers, context, etc?  I work on a *lot* of projects these days, and I often forget to follow some of these conventions in my…

Read More

Introducing SpecsFor Helpers!

SpecsFor<Web> Helpers will help you write cleaner, easier-to-read (and maintain!) specs for your ASP.NET MVC applications.  It’s the latest addition to the SpecsFor family, and the first of the Helpers line that I’m working on.  Read on to see what it can do for you and your team! [more] I suppose this really doesn’t qualify…

Read More