Both Herding Code and .NET Rocks talkded with Rob Eisenberg about his Durandal 2014 kickstarter and it sounds VERY promising. He's very focused on modularity and implementing the lates browser native functionality. Go check it out and back him if you think it sounds right, he needs quite a bit more ...
http://www.kickstarter.com/projects/eisenbergeffect/durandal-2014
Monday, January 6, 2014
Saturday, January 4, 2014
Aspect oriented model validations for WebAPI
We're building a brand new web app with the 'latest and greatest' stuff: MVC5, WebAPI 2 and AngularJS. I was looking for a nice way to do model validation in WebApi and I found this article:
http://www.asp.net/web-api/overview/formats-and-model-binding/model-validation-in-aspnet-web-api
Check it out - it's very elegant. So Angular's $http.post() will do some task and if things work out, you get the 400 statuscode and it'll call the success handler. If not, it'll trigger the error callback and I'm displaying the validation messages. Very clean, very re-usable and very few lines of code.
Works fine with a combination of attribute validations, like [Required] and [Range] with IValidateableObject.
http://www.asp.net/web-api/overview/formats-and-model-binding/model-validation-in-aspnet-web-api
Check it out - it's very elegant. So Angular's $http.post() will do some task and if things work out, you get the 400 statuscode and it'll call the success handler. If not, it'll trigger the error callback and I'm displaying the validation messages. Very clean, very re-usable and very few lines of code.
Works fine with a combination of attribute validations, like [Required] and [Range] with IValidateableObject.
Thursday, January 2, 2014
Behavior-Driven development in C# with SpecFlow
Trying out a BDD framework in Visual Studio had been on my list of weekend projects for quite some time. I know of two frameworks for .NET: NSpec and SpecFlow. I was most interested in the latter, since that allows the specs to be written in plain text ( see cucumber ). This, I think, could be useful to verify the tests against the business or the analysts, involved in the development of the application.
Getting started with SpecFlow is really easy - check out: http://www.specflow.org/getting-started/.
Within 10 minutes I had my own adaptation of an example:
No I'll think where and how to apply this in my projects.
Getting started with SpecFlow is really easy - check out: http://www.specflow.org/getting-started/.
Within 10 minutes I had my own adaptation of an example:
No I'll think where and how to apply this in my projects.
Subscribe to:
Posts (Atom)