Technical Insights: Azure, .NET, Dynamics 365 & EV Charging Architecture

Month: November 2013

REST API Versioning

There are a couple of ways in versioning your API

1. Through REST URL . domain.com/v1/Customers, domain.com/v2/Customers

2. Through HTTP Header – add the version as part of Content-type

3. Add the version on the REST object itself as one of the attribute/property

A few excellent articles:

http://stackoverflow.com/questions/389169/best-practices-for-api-versioning
http://codebetter.com/howarddierking/2012/11/09/versioning-restful-services/

Behavior Driven Development – BDD .NET

To me it looks like testing end to end scenario instead of modular function. A unit test might pass but it might fail or behaving differently when we start put into different context

What it is?

In software engineering, behavior-driven development (abbreviated BDD) is a software development process based on test-driven development (TDD).[Behavior-driven development combines the general techniques and principles of TDD with ideas from domain-driven design and object-oriented analysis and design to provide software developers and business analysts with shared tools and a shared process to collaborate on software development, with the aim of delivering “software that matters”.

Behavior-driven development was developed by Dan North as a response to the issues encountered teaching test-driven development:

Where to start in the process
What to test and what not to test
How much to test in one go
What to call the tests
How to understand why a test fails

At the heart of BDD is a rethinking of the approach to unit testing and acceptance testing that North came up with while dealing with these issues. For example, he proposes that unit test names be whole sentences starting with the word “should” and should be written in order of business value. Acceptance tests should be written using the standard agile framework of a User story: “As a [role] I want [feature] so that [benefit]”. Acceptance criteria should be written in terms of scenarios and implemented as classes: Given [initial context], when [event occurs], then [ensure some outcomes].

Framework .NET

http://nspec.org/
http://www.specflow.org/

Visual Studio 2013 Features

An article to keep you guys updated with the latest in .NET world

http://weblogs.asp.net/scottgu/archive/2013/10/17/announcing-the-release-of-visual-studio-2013-and-great-improvements-to-asp-net-and-entity-framework.aspx

There are few things that are very interesting to me:

1. OWIN and KATANA (OWIN is a standard interface between .NET web servers and web application – the goal of the OWIN is to decouple server and application, encourage the development of simple modules for .NET web development and KATANA is the OWIN implementations for Microsoft Servers and frameworks)

2. One ASP.NET – now you can combine ASP.NET web form, MVC and Web API

3. Responsive Project Templates with boostrap

4. Entity Framework 6 – now it supports Async and Task<T>

5. ASP.NET MVC5 – now it supports

Authentication filters: These filters allow you to specify authentication logic per-action, per-controller or globally for all controllers.
Attribute Routing: Attribute Routing allows you to define your routes on actions or controllers.

6. Deep Focus with Code Lens

http://visualstudiomagazine.com/articles/2013/10/01/deep-focus.aspx?m=1

Powered by WordPress & Theme by Anders Norén