Peach Driven Development

There's a virtually infinite number of ways to structure projects when working in an IDE like Visual Studio. Lately I've been thinking a lot about how I structure my solutions, and I'd like to establish a convention that I can use when beginning a new project that helps do the following: Maintain separation of concerns between the various layers of the application (e.g. user interface, database, etc) Does not introduce too much complexity (i.e. no more layers than absolutely necessary to...

Client-side File Upload Size Validation in ASP.NET MVC

Here's a little ASP.NET MVC validation attribute you might find useful: file size validation, complete with client-side validation using the HTML5 File API. We're using bytes for the file size, just for simplicity's sake. First, the server-side validation attribute: using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Web; using System.Web.Mvc; namespace MyProject.Web { [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property...

Avoiding Lock In by Doing The Simplest Thing That Could Possibly Work

I've ventured out and played with various blogging platforms through the years: WordPress, Tumblr, Blogger and Posterious have all powered my site at various points. Most recently it was Ghost. The main reason I've never really been able to settle on one is that I have two essential requirements that none of them fully meet: I want to own the content, and run on my own domain I don't want to spend a lot of time administering the site Most of these platforms do one of these well and the other...