My two cents about software development on the web


Exposing a JSON API with ASP.NET MVC 3

This article on CodeProject shows one way (there are loads of ways, this is just one way) of how you might go about exposing a JSON API that is callable both from the web and via web based APIs from a standard desktop .NET client app, with the minimum of fuss, no config, other than the standard one you get with .NET installed.

It does however make use of ASP MVC 3 so that is assumed, as is .NET 4 and VS2010.


Linkflood #3-2011

  • Unit Testing 101: Are You Testing Your JavaScript? by Christian Johansen [23 feb 2011] – Of course you are testing your code. Nobody writes any significant amount of code and drops it into production without ever running it. What I want to challenge you on in this article is how you are doing your testing. If you are not already automating as much of your testing as possible, be prepared for a productivity and confidence boost.
  • Sample datasets for benchmarking and testing [1 feb 2011] – Sometimes you just need some data to test and stress things. But randomly generated data is awful – it doesn’t have realistic distributions, and it isn’t easy to understand whether your results are meaningful and correct. Real or quasi-real data is best. Whether you’re looking for a couple of megabytes or many terabytes, the following sources of data might help you benchmark and test under more realistic conditions.
  • 3,000 Web APIs: Trends From a Quickly Growing Directory [8 mar 2011] – ProgrammableWeb has reached a major milestone by adding its 3,000th web service API to our API directory. We’ve come a long way when you consider there were only 105 listed at the end of 2005. As we’ve noted previously, the growth rate of APIs doubled, which led to an influx of new services. Below are some of the trends we’ve spotted as the directory marks a new high.
  • If I ran Twitter, this is what I would do. It’s about the service, stupid [12 mar 2011] by Kelly Sommers – What I would do .. oh boy, where to start. The primary thing that rings in my head is this: It’s about the service, stupid. If I was calling the shots I would take the direction that we must satisfy the needs of being a short messaging service and the best damn one possible. Going the route of ads embedded in the client is small potatoes profit wise I think compared to what the service has in it’s back pocket which is simply: data.
  • 10 best alternative operating systems [13 mar 2011] on TechRadar – We’ll look at the best alternative operating systems, with the potential to change the computing landscape over the next decade. There’s only one rule – no Microsoft, Apple or Linux. While some of these new operating systems are still relatively early in development, the technology that they’re introducing could make its way into the next round of updates for the mainstream OSes we use. Helpfully, you can try these projects without having to repartition your hard drive thanks to the excellent (and free) PC virtualisation and emulation tool available from
  • Build What You Know [21 dec 2010] by Ben Werdmuller on 24 Ways To Start – An old maxim for wannabe novelists is “write what you know.” That advice is more inspirational than it first appears to be. Nobody’s suggesting that authors should populate their novels with their friends, families and neighbourhoods. Rather, they should write what they know to be true. It’s a call for artists to address their beliefs about the world and write from the heart. It’s also great advice for entrepreneurs. Whether you’re building a technology business, opening a restaurant or providing a new kind of service, it’s not enough to simply identify a gap in the market and address it. Finding a problem is easy; the key is to find a solution that you’re passionate about, and then create what you know is needed. The best startups aren’t just new companies – they’re manifestos by people who seek to change the world.
  • Building an offline capable mobile web site with jQuery Mobile [12 mar 2011] by Raymond Camden on Coldfusion Jedi – One of the more interesting features of HTML 5 is offline support. As you can guess, this is the ability to cache and store content for use when offline. On a desktop this isn’t terribly useful. Most of us have continuous high speed connections. But on a mobile device it could be incredibly useful. I thought I’d create a simple demo based on the mobile hotel web site I built a few days ago. That site provided contact information for the hotel as well as a map and driving directions with GPS. If the user is offline, then the site won’t work at all.
  • Handle JSON Exceptions Gracefully in ASP.NET MVC 2 [21 apr 2010] by Malcolm Sheridan on DotNetCurry – One thing to keep in mind when using ASP.NET MVC is how to gracefully handle exceptions that are thrown when executing Ajax requests. Normally if an error is thrown on the server, without proper error handling, the client will never know about the error. Another thing I wanted to do was not to litter my action methods with try/catch/finally blocks. They’re good, but I want my action methods to look elegant! By the end of this article, you’ll be able to decorate your action method’s that return a JsonResult with an attribute derived from ActionFilterAttribute.
  • Using ASP.NET, Membership, and jQuery to Determine Username Availability [23 feb 2011] by Scott Mitchell on 4 Guys From Rolla – Many websites use Ajax techniques to check whether a visitor’s desired username is available as soon as they enter it (rather than waiting for them to submit the form). This article shows how to implement such a feature in an ASP.NET website using Membership and jQuery. This article includes a demo available for download that implements this behavior in an ASP.NET WebForms application that uses the CreateUserWizard control to register new users. However, the concepts in this article can be applied to ad-hoc user registration pages and ASP.NET MVC.
  • 6 Popular Content Presentation Design Patterns [1 mar 2011] by Cameron Chapman on Six Revisions – Content is what is considered the “meat” of a website. Content should be usable and displayed in a manner that makes it efficient to read and act on. Now that we have discussed website navigation design patterns, let us now explore popular design patterns for displaying content. Below, we’ve included a few current design trends in content presentation, all based on enhancing the user experience.
  • The Basics of Good Database Design in Web Development [17 mar 2011] by Kayla Knight on onextrapixel – In this article, we’ll go over the basics of how to design a good plan for a database, no matter what its final intended use. For all database designs, there are a set of standard rules and best practices to follow, all of which can help a database stay organized and help to team up with the respective site in a smart and efficient way.
  • 7 Basics to Create a Good Design Brief [17 mar 2011] by Cameron Chapman on Webdesigner Depot – A comprehensive, detailed brief becomes the guiding document for the entire design process, and spells out exactly what you, as the designer, need to do, and the constraints within which you need to do it. In this article we’ll examine the basics needed for a great design brief which should help ease your design work and avoid any problems with your clients.


Linkflood #2-2011

Advantages of CSS3 Media Queries

Product prototyping

  • Designer, Architect, Developer on 24 Ways To Start by Tom Preston-Werner – Over the last six years I’ve bootstrapped three successful enterprises (Cube6 Media, Gravatar, and GitHub) and failed to gain traction with a handful of others. After a lot of thought and reflections on these experiences, I’ve identified three major skills that should be present in order to best build a successful web application. These roles can be loosely defined as the Designer, the Architect, and the Developer.
  • Minimum Viable Product: a guide by Eric Ries on Lessons Learned – One of the most important lean startup techniques is called the minimum viable product. Its power is matched only by the amount of confusion that it causes, because it’s actually quite hard to do. It certainly took me many years to make sense of it. First, a definition: the minimum viable product is that version of a new product which allows a team to collect the maximum amount of validated learning about customers with the least effort.

ASP.NET MVC Best Practices

Blog Engine with ASP.NET MVC


Linkflood #1-2011

  • Creating a NuGet-based plugin engine – the author (Aaron Powell) describes how to create a plugin engine for FunnelWeb plugins or themes.
  • Got an Old Computer? Jolicloud OS Can Now Make it a Zippy Cloud Machine – Jolicloud, the Operating System that primarily serves netbooks, today expanded its support to include computers as many as 10 years old. If you’ve got an old desktop computer with as little as 348MB of RAM, it could be fun and useful again with the help of Jolicloud.
  • Should I work for free? by Jessica Hische – Who’s ready to stop working for free? Hopefully you are! If you have any doubts, consult this handy chart below. Start in the middle and work your way to your answer!
  • EF Code First e NH, due ORM a confronto“, con Pietro Libro e Martino Bordin – Un’overview su due diverse tecnologie di accesso ai dati, l’emergente EF Code First ed il più consolidato NHibernate: modellazione, query e persistenza.
  • How To Know Your Side Project Is Ready To Be A Startup – Building things is great, more people should do it and do it often. The problem is, most people either take the leap at the wrong time OR they don’t take a leap at all, when the signs are there. I recently went through this process a few months ago myself on taking PadPressed, now Onswipe to a full time startup. Here are the 8 things that I realized, which are telltale signs that you might be ready to turn your project to a full time startup.
  • Html.RenderAction and Html.Action – One of the new features being added to ASP.NET MVC 2 is a little helper method called Html.RenderAction and its counterpart, Html.Action. Both of these methods allow you to call into an action method from a view and output the results of the action in place within the view. The difference between the two is that Html.RenderAction will render the result directly to the Response (which is more efficient if the action returns a large amount of HTML) whereas Html.Action returns a string with the result.
  • Creating a fixed header and Footer – If you are looking for a fixed header of fixed footer you have come to the right place. In this tutorial I will be going over the basic page setup for sections of content, the header bar, footer bar, CSS and HTML.
  • How To Use the ADODB.Stream Object to Send Binary Files to the Browser through ASP – Web developers often need to read binary files from the Web server’s file system through Active Server Pages (ASP) and then send the content to the Web browser. Although developers often attempt this with the File System Object (FSO), the FSO is designed to read only ASCII data from the file system and, therefore, does not work. To read binary data from the file system, you must use a component that has the ability to read binary data. The ADODB.Stream object offers this functionality. When you call ADODB.Stream from ASP and use the intrinsic BinaryWrite method from the ASP Response object, you can send binary data to any type of browser with very little code.