Release Infra.Standard 2.1.0.15

–NEW– 
 

Methods

WebRequestTool.ExecuteDELETE – Execute HTTP DELETE request and returns the response as the specified type.
 
WebRequestTool.ExecuteDELETEAsync – Asynchronous variant of ExecuteDELETE{TPostData}
 

Nuget Package: maqdel.Infra.Standard

Project page: maqdel.Infra

#WTHI? Design patterns in software development

They are templates that identify problems in the system and provide appropriate solutions to general problems that developers have faced over a long period of time, through trial and error.

In 1994 the “Gang of Four” (GoF) formed by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides published the book “Design Patterns, reusable object-oriented software elements”; where the design pattern is introduced in software development and 23 common patterns are documented to solve a specific problem

Patterns are classified into 3 types, “Creational Patterns“, “Structural Patterns“, “Behavioral Patterns“, where:

Creational patterns
They provide various object creation mechanisms, which increase flexibility and reuse of existing code in a way that is appropriate to the situation. This gives the program more flexibility in deciding which objects should be created for a given use case.

Structural patterns
They facilitate efficient solutions and standards regarding class compositions and object structures. The concept of inheritance is used to compose interfaces and define ways to compose objects to obtain new functionality.

Behavior patterns
They deal with communication between class objects. They are used to detect the presence of communication patterns already present and can manipulate these patterns.

#WTHI? The 4 principles of OOP C#

The four basic principles of object-oriented programming are:

Abstraction: Model the necessary attributes and interactions of entities as classes to define an abstract representation of a system.

Encapsulation: Hide the internal state and functionality of an object and allow only access through a public set of functions.

Inheritance: Ability to create new abstractions based on existing abstractions.

Polymorphism: The ability to implement inherited properties or methods in different ways on various abstractions.

#WTHI? SOLID

It is a series of principles and good practices that should be taken as a basis for software development to achieve a code that is cleaner, more maintainable, more scalable in the future and less prone to errors.

SOLID is the acronym for “Single Responsibility Principle“, “Open/Closed Principle“, “Liskov Substitution Principle“, “Interface Segregation Principle“, and “Dependency Inversion Principle“, where:

S: Single Responsibility Principle – Each module must have a single reason to change.
O: Open/Closed Principle – The code should be Open to extend it and add new features, and Closed to modifications, except those that must be made if an error is found.
L: Liskov Substitution Principle – A derived class must be able to be substituted for its base class.
I: Interface Segregation Principle – Several purpose-specific interfaces should be used, rather than a few large interfaces.
D: Dependency Inversion Principle – Must depend on abstractions, not concrete classes.

Classes and Methods in C#

Private class
It is a class whose members can only be accessed by classes in the same environment.

Public class
It is a class whose members can be accessed by classes from any environment.

Protected class
It is a class whose members can only be accessed by the same class.

Abstract class
It is an incomplete class that defines the members that a base class must have.
It cannot be instantiated, it will only inherit.

Sealed class
It is a class that does not allow to be inherited, only instantiated

Private method
Is a method that is only accessible from the same class

Public method
Is a method that can be accessible from any class

Abstract methods
Is a method without implementation that must be implemented when inheriting the class

Virtual method
Is a method that can be overridden by inheriting the class