Skip to main content

Posts

Showing posts from 2019

Flexible APIs with OData Asp.Net Core

Hello everyone, today I would like to present the use of  OData (Open Data Protocol), a protocol for developing APIs, which will turn this development an incredible task. A little bit of the history of this protocol, in 2007 Microsoft had the idea to provide an innovative way for services that provide data to serve their customers  a flexibility beyond it was specifically prepared to offer, the goal was to provide the ability to the  customers  request data and operations that really fits their needs. In 2010 Microsoft in conjunction with other companies standardized this protocol and recently OData was made available to Asp.Net Core . Before we take further, this article was previously published in Portuguese on Medium, so if do you prefer to read in Portuguese there would be better an option for you  Medium . With the arrival of the OData protocol to Asp.Net Core, we can create fully flexible APIs allowing consumers to request various operatio...

Avoiding IF with Strategy Pattern and C# Attribute

Who ever as a developer did not come across a code full of IF's and started having to debug the code mentally, wondering, what could happen when the break-point went into this or that if or else, or simply wrote a method full of IF's which in that moment made total sense to you, but after a few days or weeks without touching in that code, had to return to make a change ... and wondered what I was doing here? Took a longer time to understand your own code? Often for the simplicity of writing codes in a procedural way, we faced with these situations, but concepts of OOP ( Object-oriented programming ) have emerged to facilitate the development of software. And we must make use of these concepts to write software that can be updated without the needs to change something that already is working, beyond it, we should to make extensible code and as important as develop, we must create testable code. In many cases we can use OOP concepts to abstract procedural logic into...