Written on 9/17/2014 in Web development

Requestor part 1


NancyFx AngularJS

The last few months1 I have been considering trying out AngularJS. AngularJS is an MVC framework written in Javascript. It's used a lot nowadays because it is fast, easy to get started with, and well documented2. It's also extendable, something that I believe to be unimaginably crucial in a framework. Easily extendable and a big fanbase means that there will also be a boatload of plugins and support.3

Another framework I was interested in was NancyFx. I quote their introduction here:

Nancy is a lightweight, low-ceremony framework for building HTTP based services on .Net and Mono. The goal of the framework is to stay out of the way as much as possible and provide a super-duper-happy-path to all interactions.

I believe every framework that uses sentences like 'super-duper-happy-path' should be considered for testing. I'm a fan of ASP.Net MVC, but sometimes, the framework is too big and cumbersome. This has been improved a lot lately, with the new project configuration wizard, but there is still a lot of stuff going on in the MVC pipeline that is difficult to control or adapt. Model binding, for example, when you're not using a model, is only slowing you down. NancyFx on the other hand, does the bare minimum out of the box. It is made to be modular, you want functionality X, you have to install module X, or implement X yourself.

Requestor

This brings me to Requestor. I needed a test project, something to play around with. Requestor is a HTTP request tool. Meaning you can test HTTP requests from the browser, which is great. How it works is quite simple. Requirements4:

  • Baboon can input a url
  • Baboon can manage
    • http headers
    • url parameters
  • Baboon can execute a HTTP request using the provided url, http headers and url parameters
  • A history of executed requests should be kept
  • Baboon can create and manage collections of requests
  • Baboon has access to basic settings (base url, amount of history items, ...)
  • Baboon can import / export history, request collection, settings

To fulfill these requirements I am going to use AngularJS to provide the frontend MVC. Twitter bootstrap will be responsible for the looks. NancyFx will purely do routing, I have another project in which I used NancyFx more, but that's for a later blog post. Last but not least, I will be using HTML5 localstorage for storing data. This does mean that it won't be working on older browsers, and perhaps some mobile browsers, but that's allright.

Newer Older Top
blog comments powered by Disqus