Blog Archive
  • The Old Development Language Switcheroo

    April 2, 2013
    csharp career Dart fsharp javascript Kotlin node.js typescript

    As a C# developer I think I’m pretty safe in saying that its not going away any time soon however, its my opinion that to not become irrelevant you need to have options. Some may argue that its better to be master of one than a Jack of all trades but lets just say you can’t find your next job in the primary language you want to work in. What do you do?

    I have looked more into JavaScript recently and with that comes server and client scope for the use of the language so with some understanding of JS that would be probably the best bet for me however, as much as this may annoy some I think I actually prefer statically typed languages.

    Now I know there is TypeScript that I could use for my node.js apps but I see that as more of a workaround and not a core feature of JavaScript. I’m not saying anything bad against JS and the libraries/frameworks that I have used I like but I just find it easier to learn and know what I can do when I have decent intellisense showing me what I can do with my code.

    Read more →
  • The many approaches to Entity Framework

    March 4, 2013
    .net asp.net mvc csharp entity framework github SRP

    I recently had a need to look into using Entity Framework (EF) for a ASP.NET MVC project. In the past I have always used PetaPoco as my ORM of choice and with hearing nothing but bad things about EF I was a little sceptical. There are various ways to use EF, Code First being one of them and the easiest from what I can gather and luckily the approach I needed to get up to speed on. This means you can define your model in code and EF will turn that into tables in your database.

    The way I was going to see how EF could be architected in an application was to create a MVC application that provided CRUD capabilities for Customers, Orders and Products. Nothing complicated but something enough to see how EF could be fitted in with a MVC application. I would also like to use a unit of work pattern such as instantiate a model class, set some properties and call a save method. I would also like to keep the architecture well enough abstracted so that another ORM could take its place easily enough if needs be.

    I will list the various approaches I took investigating the how EF could be integrated. They are not in any chronological order.

    Read more →
  • Evaluating KnockoutJS and AngularJS – Part 1

    February 5, 2013
    angularjs handlebars javascript knockoutjs learning oss sammyjs

    As I stated in my earlier post “JavaScript is the future…maybe” so with that in mind I had to brush up my JS skills and get more involved with the language’s core concepts so after watching some videos and reading some articles I was ready to look at KnockoutJS and AngularJS.

    Before I actually looked at these two I spent some time with SammyJS but realised afterwards it was mainly MVC based and not around 2-way binding that Knockout and Angular offer. However, I really liked it and it seemed very familiar and easy to use, the reason being it was inspired by Sinatra which we all know Nancy was also inspired by and we also know how much I like Nancy!

    Getting to grips with any language or frameworks is tricky and the best way to do it is to write an application using it. The next difficult thing to overcome is an idea for writing an application. ToDo list’s are very common with JavaScript frameworks and there is a whole website for you to peruse but after looking at SammyJS and their docs they walk through writing a simple shopping basket so I thought I’d use that.

    Read more →
  • Evaluating KnockoutJS and AngularJS – Part 2

    February 5, 2013
    angularjs handlebars javascript knockoutjs learning oss sammyjs

    In Part 1, I described how I was using the demo tutorial from SammyJS to get a better understanding of AngularJS and KnockoutJS.

    In this blog post I will focus on what I found when using KnockoutJS.

    Again if you just want to get to the code then feel free to take a look here for Angular and here for Knockout.

    Knockout

    Firstly Knockout should be commended on their documentation and online tutorials. Their website tutorials follows a step by step approach and once you have completed each step you can click through to the next section. You can also leave the tutorial and come back to it and it will remember where you left. There is great support in the KnockoutJS room in Jabbr and I’d like to thank David Spörri for answering my newbie JS and Knockout questions.

    Read more →
  • Using AngularJS/BackboneJS in Windows 8 JavaScript app

    January 24, 2013
    angularjs backbonejs github javascript knockoutjs oss windows 8 winjs

    To help me expand my JavaScript knowledge as I said I would in my previous post I thought I’d write a Windows 8 application using JavaScript.

    After following a few “Hello World” tutorials from Microsoft I thought I’d take a look at the ToDo list demos shown at TodoMVC.com.

    This website/Github repository takes the ToDo demo and implements it in all the various JS frameworks and libraries out there. As I said previously its a minefield.

    Anyhow, I thought I’d start with Backbone, copy the files, add the references to WinJS and hit F5 and bingo. However, I got the below error:

    Unhandled Exception

    Read more →
  • JavaScript is the future…maybe!

    January 9, 2013
    .net angularjs backbonejs csharp javascript knockoutjs learning node.js oss typescript

    I’m not one for New Years resolutions but I thought it was time I looked at JavaScript more in depth.

    I looked at Node.js a while back and found it very interesting and I probably need to go back to it. Over the last month or so there has been a large discussion about async in .Net frameworks and there appears to be a lot of misunderstanding about it (and lets leave it at that, I don’t want to start another flame war) but the thing we can definitely say with Node.js, well JavaScript to be fair is that it is perfectly asynchronous and non-blocking.

    As a web developer I have used JavaScript from the early days of Response.Write moving onto frameworks such as script.aculo.us and MooTools and finally ending up with jQuery which has come pretty much a standard these days so my JavaScript skills are not completely new.

    However, there has been a large push to use JS more and more for rich user friendly applications with things like KnockoutJS, AngularJS and BackboneJS on the client and Node.js on the server. Microsoft has even taken a prominent role in helping bring Node.js to a Windows environment as it started out on *nix based platforms. They have also started contributing to and including scripts in their Visual Studio project templates for jQuery.

    Read more →
  • Why use NancyFX?

    December 19, 2012
    .net asp.net mvc asp.net web api community nancyfx oss

    When a new project comes along why should you automatically choose ASP.NET MVC? Yes, its Microsoft based so you may have more of your peers fluent already in that architecture but is there an alternative, a better alternative?

    I believe so and its called NancyFX. Your first reaction, what is so special about Nancy? I also believe you’ll ask what is wrong with ASP.NET MVC but maybe you should look at it differently and ask what is right with Nancy?

    What is Nancy?

    Nancy is a lightweight framework for building websites / services without getting in your way. It’s heavily inspired by a Ruby project called Sinatra, which happens to identify itself as not being a framework, since it doesn’t include all the plumbing of things such as an ORM, lots of configuration, etc.

    Does it implement MVC?

    Nancy does not force you to adhere to the model-view-controller pattern, or any other pattern. It’s nothing more than a service endpoint responding to HTTP verbs. Making it ideal for building Websites, Web Services and APIs.

    Read more →
  • Easily publish a NuGet package

    December 7, 2012
    .net asp.net web api community nuget oss

    I recently published WebAPI.Testing on Nuget but found it a bit tricky to build a package ready for NuGet.

    There is documentation about how to do it but I found it hard to follow so I thought I’d document how I finally got my package ready.

    The easiest way I thought was to have something built into Visual Studio. I spoke to David Fowler and he told me you can edit your *.csproj file and add <BuildPackage>true</BuildPackage> to it.

    When you build your project a *.nupkg is created ready for publishing with NuGet.

    Read more →
  • ASP.NET Web API Testing

    November 29, 2012
    .net csharp asp.net web api community github nancyfx oss

    As the need arose to implement some kind of Web Service/HTTP API I thought I would evaluate NancyFX, ASP.NET Web API and ServiceStack.

    Suffice to say all performed as expected and I was actually surprised to find that implementing ASP.NET Web API was easier than ServiceStack (I know that might be a bit of a statement to make to the ServiceStack followers, sorry). I found Nancy easiest to implement. The very simple API demos can be found on my Github page.

    When it came to testing ASP.NET Web API I found it to be wanting slightly in comparison to Nancy. With WebAPI I could make direct calls to the controller methods to make sure data was returned correctly and I could mock a repository and test that the methods in the repository were being called but there was nothing I could see to test the HTTP response I would get.

    Read more →
  • The For Loop is the devil in disguise

    November 23, 2012
    .net csharp learning

    I recently spoke to someone about the ‘for’ loop who opened my eyes to how unstructured the ‘for’ loop is.

    I have only ever used it in the traditional sense of:

    	for(int i = 0; i < 10; i++)
    	{
    	
    	}
    

    I looked into some more and thought I’d show anybody else who may not have known about this innocent little thing in the C# language. It may exist in other languages but I am explicitly talking about C#.

    	for (; ; )
    	{
    	  Console.WriteLine("Hi");
    	}
    

    For some reason this compiles and executes! Who knew? Smarter people than me obviously. What do you expect it to output?

    The answer is it outputs “Hi” forever as there is nothing to determine when the loop should end however there is nothing to determine when it should start either.

    Read more →
← Newer 6 / 7 Older →

© 2026 Jonathan Channon's Blog. All rights reserved.