Token based authentication using ASP.NET Web API 2, OWIN and OAUTH

Token Based Authentication

we’ll use token based approach to implement authentication between the front-end application and the back-end API, as we all know the common and old way to implement authentication is the cookie-based approach were the cookie is sent with each request from the client to the server, and on the server it is used to identify the authenticated user.

Continue reading

Advertisements
Posted in .Net, ASP.NET, Security | Leave a comment

Introduction to MongoDB

NO SQL databases

The conventional databases are relational, that is, they consist of tabular lists of data (also known as “data relationships”, hence the true origin of their name), which relate to each other to store in the most efficient information.

In recent years, the Internet has grown dramatically resulting in new types of applications that need to manage huge amounts of data, which must be introduced and extracted quickly and should be able to scale / grow easily and cheaply. In these systems, flexibility, speed and horizontal scalability are more important than other traditionally crucial issues such as consistency or having a perfectly defined structure for the data.

Continue reading

Posted in Databases | Tagged , | Leave a comment

State Design Pattern

The purpose of the State Design Pattern is allow an object to modify its behaviour when its internal state changes. Although this can often be solved with a boolean or using constants, this usually ends up with a lot of if-else, unreadable code and difficulty in maintenance.

Continue reading

Posted in Architecture | Tagged , | Leave a comment

Adapter Design Pattern

The adapter pattern is definitely one of the most used design patterns in software development. As per GOF guys, Adapter pattern is defined as the following:  “Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.”

Continue reading

Posted in Architecture | Tagged , | Leave a comment

Strategy Design Pattern

Another day, another Design Pattern, in this article I will explain the Strategy Design Pattern.

The Strategy pattern allows you to define an algorithm separately and select the algorithm dynamically at run time. This pattern defines a set of algorithms, encapsulates each one of them and makes them interchangeable. It allows the algorithm to vary independently of the clients that use it.

Continue reading

Posted in Architecture | Tagged , | Leave a comment

Façade Design Pattern

The Façade Pattern it is a very simple pattern, it seeks to simplify the system, from the point of view of the client, by providing a unified interface for a set of subsystems, defining a higher level interface. This makes the system easier to use. The GOF book says the Facade Pattern should “Provide a unified interface to a set of interfaces in a system. It defines a high level interface that makes the subsystem easier to use”.

Continue reading

Posted in Architecture | Tagged , | Leave a comment

Template Design Pattern

The Template Method design pattern is part of the so-called behaviour pattern family. These patterns help solve problems of interaction between classes and objects. This pattern arises from the need to extend certain behaviours within the same algorithm by different entities. That is, different entities have a similar behaviour but differ in certain specific aspects depending on the particular entity.

Continue reading

Posted in Architecture | Tagged , | Leave a comment