There are many software design principles that you, as a developer, can learn and study. In this article, we are going to take a look at 5 key principles that make up the acronym SOLID.
These principles are meant to make the architecture of an application more flexible, scalable and maintainable. Implementing them in your work can also increase the overall complexity of the project.
Alright, the SOLID principles are the following:
This principle establishes that a class should only handle one specific part of the…
Interfaces are tools to define sets of actions and behaviors. They help objects to rely on abstractions and not on concrete implementations of other objects. We can compose different behaviors by grouping multiple interfaces.
In this article we are going to talk about interfaces in Golang and how to use them.
An interface is a set of methods that represent common behavior for different data types.
With interfaces, we can organize different groups of methods that apply to different types of objects. …
Ruby as many programming languages can create objects that we can use to store properties, methods and perform operations on them. In Ruby, everything is an object, strings, integers, boolean, hashes, arrays and instances of a class.
Each object has a bunch of public methods that we can use. In this article, we will focus mainly on one method — Object Id.
For every object, Ruby offers a method called object_id. You guessed it, this represents a random id for the specific object. This value is a reference of the address in memory where the object is store.
Inversion of control is a principle in Software Development that sometimes could lead to some confusion.
In this article, I’ll explain what Inversion Of Control means, the power of this principle, the benefits of it, and the close relation with Dependency Injection.
This principle states that you should invert the flow of control within your modules, by using another concept that is Dependency Injection. That way we can invert the control by injecting dependencies into your classes and making them work with different types of objects.
This in turn allows your superclasses and subclasses to depend on abstractions and not…
Writing dynamic code can be difficult sometimes. Fortunately, Ruby supports metaprogramming, which allows you to write code that will write more code for you on the fly.
Metaprogramming is a powerful technique when it comes to creating classes or methods and calling them dynamically, which also makes your code DRY. The downside of using metaprogramming is that it is much more expensive than writing normal code, and in my opinion, you should only use metaprogramming when there is no other way to solve the problem or accomplish what you want.
In this article, we are going to talk about how…
Postgres offers two types of views, normal views and materialized views. Both can solve similar problems that are related to encapsulation, abstraction, and speeding up performance.
It is worth mentioning that views and materialized views are not only available when using Postgres as a database, almost all relational databases have support for using views and materialized views.
Let’s defined first what is a view in Postgres.
A view is a set of SQL queries, that can be treated as a table. …
In this article, I’ll cover a gRPC call using a Bi-Directional Streaming — implementing a client that will send a stream request, and a server that will respond with streaming messages.
This is the last article of the series, if you haven’t checked them out, here is the list:
In a bi-directional streaming rpc call, both the client and the server sends multiple messages to each other. Using this type of rpc call, can be a…
In this article, I’ll cover a gRPC call using Server Streaming response— implementing a client and server Go applications.
This is the third article of the series:
In a server streaming rpc call, the client sends a single request, and the server responds with a stream of messages. …
In this article, I’ll cover Client Streaming gRPC calls — implementing a client and server Go applications.
This is the second article of the series:
In a client streaming rpc call, the client sends a bunch of requests and once it is done streaming, the server will return a single message.
In this article, I’ll explain how to make a Unary gRPC call — implementing a client and server Go applications.
This is the first article of the series:
First of all, let’s define some core concepts before starting with the implementations.
Stands for Remote Procedure Calls, and it’s an open source framework that was developed by Google with the intend of creating a faster and more effective protocol for sending and receiving data over the wire.