ImageResizer, Amazon’s CloudFront and ASP.NET’s MVC4 Razor Helper Methods


  Well, the title is certainly a mouthful and hopefully a honey trap for SEO.  The thing is, I’m really going to talk about all those things.  I just went through a short exercise that I thought would be useful to share. Background For Silicon Valley Code Camp, I use the toolkit ImageResizer written by  Nathanael Jones.  For those of you that deal with any quantity of images on their web sites, I strongly recommend taking a look at this.  Before I used this toolkit I written my own image handlers that did some similar things but not nearly as well or with so many features.  One of the issues we have on code camp is that we try and show lots of pictures all the time.  Sponsors and speakers are … Continue Reading

Building a Simple REST Controller with Microsoft Visual Studio 2012 and WebAPI


Three Part Series (Part 1)   Building a Simple REST Controller with Microsoft Visual Studio 2012 and WebAPI Using Sencha ExtJS 4.2 and Sencha Architect 2.2, Build a Simple REST client (to feed WebAPI server) Add CRUD to REST client for calling Microsoft WebAPI server   REST can be a very loaded term that brings up lots of discussions of what it means.  Just to mention a few sites that define it take a look at this list: What is abundantly clear is there is not … Continue Reading

CodeIt.Right Takes Refactoring To The Next Level


Background I’m a big believer in using refactoring tools to help improve the quality of the code I right.  I just added another tool to my arsenal called CodeIt.Right from submain.  I can’t say for sure whether the other tools commonly used will somehow perform the refactoring I’m going to show, but I can say I really like how CodeIt.Right does it.  When I say it takes it to the next level, what I mean is it shows me things I know I should be doing (or in this case I’m fixing code that I got from someplace else.   As it turns out, the place I got it from was Microsoft’s samples for building Windows Store 8 apps.  If you want to find the original code, take a look at the WindowsBlogReader example to find the … Continue Reading

Simple Type Safe Coding in Microsoft’s C#

  I often like to show programming tips around simple things.  Over the years, I’ve found that it is easy to get Lazy and do cutting and pasting type coding, however for reliability and maintainability, it’s important to stick to the principle of less is more. Below is just a simple pattern I often use when doing something that requires processing over a set of images (or anything) multiple times. foreach (var rec in imageDetails) { const string imageTypeFull = "ImageTypeFull"; const string imageTypeThumb = "ImageTypeThumb"; foreach (var imageType in new List<string> {imageTypeFull, imageTypeThumb}) { var bytes = imageType == imageTypeFull ? … Continue Reading


Get every new post delivered to your Inbox

Join other followers: