Fiendish Functions - Filtering Fact From Fiction
Functional programming is a paradigm that has gained in popularity recently with the rise of several new functional programming languages and integration of new features in existing languages. All the same, there are many concerns about functional programming in the developer community. Is functional programming useful for the PHP developer? Will it add complexity to my codebase? This article will respond to some of these misconceptions.
Functional programming is a paradigm that has gained in popularity recently with the rise of several new functional programming languages and integration of new features in existing languages. All the same, there are many concerns about functional programming in the developer community. Is functional programming useful for the PHP developer? Will it add complexity to my codebase? This article will respond to some of these misconceptions.
13 Best Practices for Building RESTful APIs
Facebook, GitHub, Google, and many other giants need a way to serve and consume data. A RESTful API is still one of the best choices in todayβs dev landscape to serve and consume data.
But have you ever considered learning about industry standards? What are the best practices for designing a RESTful API? In theory, anyone can quickly spin up a data API in less than five minutes β whether it be Node.js, Golang, or Python.
Facebook, GitHub, Google, and many other giants need a way to serve and consume data. A RESTful API is still one of the best choices in todayβs dev landscape to serve and consume data.
But have you ever considered learning about industry standards? What are the best practices for designing a RESTful API? In theory, anyone can quickly spin up a data API in less than five minutes β whether it be Node.js, Golang, or Python.
ββHow to connect with gRPC service in PHP application? gRPC PHP tutorial
More and more developers and companies are discovering the benefits of microservices. And while PHP is usually not the first choice for this architecture, it is now more than viable to create efficient web apps based on microservices with PHP. To that end, Googleβs gRPC and Protobuf solutions are a big help. Today, Iβm going to show you how to use gRPC with PHP.
More and more developers and companies are discovering the benefits of microservices. And while PHP is usually not the first choice for this architecture, it is now more than viable to create efficient web apps based on microservices with PHP. To that end, Googleβs gRPC and Protobuf solutions are a big help. Today, Iβm going to show you how to use gRPC with PHP.
The Domain Layer - Clean Architecture & Domain-Driven Design on PHP
The fundamental part of Clean Architecture and Domain-Driven Design is the Domain layer. There all the business and applications rules are laid down and will be controlling the processing of information independently from the infrastructure and frameworks.
The fundamental part of Clean Architecture and Domain-Driven Design is the Domain layer. There all the business and applications rules are laid down and will be controlling the processing of information independently from the infrastructure and frameworks.
ββWriting Clean Code In PHP
In this article, let's learn how to write clean code in PHP. These tips help you to write readable, reusable & refactorable code in PHP.
In this article, let's learn how to write clean code in PHP. These tips help you to write readable, reusable & refactorable code in PHP.
Double Dispatch
The computation of a method call is only dependent on the object receiving the method call. Most of the time that's enough. However, sometimes we need the computation to also depend on the argument being passed to the method call.
Think you have two hierarchies of objects interacting with each other and the computation of these interactions depends on both objects, not only in one of them. Maybe some examples will make this clearer.
The computation of a method call is only dependent on the object receiving the method call. Most of the time that's enough. However, sometimes we need the computation to also depend on the argument being passed to the method call.
Think you have two hierarchies of objects interacting with each other and the computation of these interactions depends on both objects, not only in one of them. Maybe some examples will make this clearer.
ββWhat is Software Architecture?
When it comes to the definition of Software architecture is the process of transforming software features such as flexibility, scale, viability, reusability, and security into a structured solution that meets technological and business aspirations. This definition refers to the features of the software that can affect software architecture. In addition to technical requirements, a long list of features primarily represents a business or operational needs.
When it comes to the definition of Software architecture is the process of transforming software features such as flexibility, scale, viability, reusability, and security into a structured solution that meets technological and business aspirations. This definition refers to the features of the software that can affect software architecture. In addition to technical requirements, a long list of features primarily represents a business or operational needs.
ββWriting better Regular Expressions in PHP
Regular Expressions are powerful, PHP but they are not known to be readable, and more often than not, maintaining a regular expression is not a straight-forward task.
Regular Expressions are powerful, PHP but they are not known to be readable, and more often than not, maintaining a regular expression is not a straight-forward task.
PHP 8.1 is comingβββand it already promises to be one of the best releases
The coming version of PHP, scheduled for November 2021, is already packed with a lot of super exciting features.
The coming version of PHP, scheduled for November 2021, is already packed with a lot of super exciting features.
Design PatternsβββThe Observer Pattern
This is part 2 of my design patterns articles. A lot of credit to Christopher Okhravi. Iβm trying to cover all his videos about design patterns from the book "Head First: Design Patterns".
This is part 2 of my design patterns articles. A lot of credit to Christopher Okhravi. Iβm trying to cover all his videos about design patterns from the book "Head First: Design Patterns".
ββWhy our code tends to become big ball of mud over time
Our codebases seem to corrode over time. Overall quality tends to decrease. Each new change is harder to introduce. We all use OOP good practices, control our dependencies, adjust to SOLID principles and use patterns. And even so, our systems head toward becoming a big ball of mud inevitably. It turns out it is not enough to keep systems viable in an environment of relentless change.
Our codebases seem to corrode over time. Overall quality tends to decrease. Each new change is harder to introduce. We all use OOP good practices, control our dependencies, adjust to SOLID principles and use patterns. And even so, our systems head toward becoming a big ball of mud inevitably. It turns out it is not enough to keep systems viable in an environment of relentless change.
ββBest practices for writing code comments
While there are many resources to help programmers write better codeβsuch as books and static analyzersβthere are few for writing better comments. While it's easy to measure the quantity of comments in a program, it's hard to measure the quality, and the two are not necessarily correlated. A bad comment is worse than no comment at all. Here are some rules to help you achieve a happy medium.
While there are many resources to help programmers write better codeβsuch as books and static analyzersβthere are few for writing better comments. While it's easy to measure the quantity of comments in a program, it's hard to measure the quality, and the two are not necessarily correlated. A bad comment is worse than no comment at all. Here are some rules to help you achieve a happy medium.
Enums in PHP 8.1
They are finally coming β built-in support for enums will be added in PHP 8.1! Some might consider them long overdue, but you don't hear me complain; I'm glad they made it! This post is dedicated to looking at the newly added feature in-depth.
They are finally coming β built-in support for enums will be added in PHP 8.1! Some might consider them long overdue, but you don't hear me complain; I'm glad they made it! This post is dedicated to looking at the newly added feature in-depth.
PHP 8: The JIT
The pros and cons of adding a JIT compiler to PHP. Dmitry Stogov recently opened an RFC to add a JIT compiler to PHP. So, what is that about? Does "JIT" mean "instantly better PHP", or is this a more nuanced topic? Today we'll briefly look at what the "JIT" actually does, and more importantly: the difficulties and opportunities it brings to the PHP world.
The pros and cons of adding a JIT compiler to PHP. Dmitry Stogov recently opened an RFC to add a JIT compiler to PHP. So, what is that about? Does "JIT" mean "instantly better PHP", or is this a more nuanced topic? Today we'll briefly look at what the "JIT" actually does, and more importantly: the difficulties and opportunities it brings to the PHP world.
PHP: Named arguments are your friends
I stumbled upon an article in Stitcher.io that, in a few words, declares that developers should be aware that Named Arguments will break things. Thatβs quite weird when you consider they fix more than what they "break".
I stumbled upon an article in Stitcher.io that, in a few words, declares that developers should be aware that Named Arguments will break things. Thatβs quite weird when you consider they fix more than what they "break".
ββModern PHP data Encryption/Decryption with Sodium extension
Throughout the years PHP has added support for several extensions, libraries, and algorithms to encrypt and decrypt data. With several libraries and extensions with various levels of maintenance, several algorithms each potentially carrying pros and cons, some even inherently being insecure, it is very difficult to select the appropriate PHP extension, library, encryption constructs, and balance the security and performance.
Throughout the years PHP has added support for several extensions, libraries, and algorithms to encrypt and decrypt data. With several libraries and extensions with various levels of maintenance, several algorithms each potentially carrying pros and cons, some even inherently being insecure, it is very difficult to select the appropriate PHP extension, library, encryption constructs, and balance the security and performance.
Starting with Microservices in PHP
In this article, we will take theory and apply it in practice using PHP.
We will use Ecotone Framework and RabbitMQ, to integrate two Services together.
In this article, we will take theory and apply it in practice using PHP.
We will use Ecotone Framework and RabbitMQ, to integrate two Services together.
Accessing private properties in PHP
Private properties can only be accessed by the class that defines the property⦠right? Actually, PHP has a few ways to circumvent this: reflection, closures and array casting.
Private properties can only be accessed by the class that defines the property⦠right? Actually, PHP has a few ways to circumvent this: reflection, closures and array casting.
6 Algorithms Every Developer Should Know
Hello, I am Richard. I am a developer, and you should know that Iβm not a big fan of data structures and algorithms. If you can relate to this, donβt worry; after working on many projects (small and large), I discovered the six important algorithms that every developer should know, and these six will almost always solve every problem in your development process.
Hello, I am Richard. I am a developer, and you should know that Iβm not a big fan of data structures and algorithms. If you can relate to this, donβt worry; after working on many projects (small and large), I discovered the six important algorithms that every developer should know, and these six will almost always solve every problem in your development process.
Do generators really reduce the memory usage?
Recently I noticed some controversy regarding memory usage with generators. It looks like that many people genuinely take generators as a tool that somehow can get them "a big performance boost" when working with large datasets. Sort of a magician's hat, where one can put any amount of data without affecting the PHP process' memory.
Recently I noticed some controversy regarding memory usage with generators. It looks like that many people genuinely take generators as a tool that somehow can get them "a big performance boost" when working with large datasets. Sort of a magician's hat, where one can put any amount of data without affecting the PHP process' memory.