Building Searchable Encrypted Databases with PHP and SQL
This question shows up from time to time in open source encryption libraries' bug trackers. This was one of the "weird problems" covered in my talk at B-Sides Orlando (titled Building Defensible Solutions to Weird Problems), and we've previously dedicated a small section to it in one of our white papers.
The question is, How do we securely encrypt database fields but still use these fields in search queries?
This question shows up from time to time in open source encryption libraries' bug trackers. This was one of the "weird problems" covered in my talk at B-Sides Orlando (titled Building Defensible Solutions to Weird Problems), and we've previously dedicated a small section to it in one of our white papers.
The question is, How do we securely encrypt database fields but still use these fields in search queries?
Factory and Repository in the Domain
Iโm a big fan of the book Domain Driven Design, and for some time Iโve been pushing the principles and patterns in my workplace. Iโve never managed to get โintoโ the more theoretical parts of the book, and I chuckle each time one of my colleagues refers to the โcontours of the domainโ, however itโs up there with books that have caused a substantial shift in my thinking.
#advanced #ddd
Iโm a big fan of the book Domain Driven Design, and for some time Iโve been pushing the principles and patterns in my workplace. Iโve never managed to get โintoโ the more theoretical parts of the book, and I chuckle each time one of my colleagues refers to the โcontours of the domainโ, however itโs up there with books that have caused a substantial shift in my thinking.
#advanced #ddd
The case for singleton objects, faรงades, and helper functions
Last year I took several Scala courses on Coursera. It was an interesting experience and it has brought me a lot of new ideas. One of these is the idea of a singleton object (as opposed to a class). It has the following characteristics
Last year I took several Scala courses on Coursera. It was an interesting experience and it has brought me a lot of new ideas. One of these is the idea of a singleton object (as opposed to a class). It has the following characteristics
Easy PSR-7 with Zend Diactoros
Itโs no mystery that Iโm a fan (most-of-the-time) of the Zend Frameworkโโโheck Iโm a Zend Framework 2 Certified System Architect (Phew! Big title). But as a crusader for decoupled libraries I was beginning to be disillusioned by the gentle giant and itโs enormous spiderweb of dependancies.
Itโs no mystery that Iโm a fan (most-of-the-time) of the Zend Frameworkโโโheck Iโm a Zend Framework 2 Certified System Architect (Phew! Big title). But as a crusader for decoupled libraries I was beginning to be disillusioned by the gentle giant and itโs enormous spiderweb of dependancies.
Event-Driven PHP with ReactPHP: Event Loop And Timers
PHP was born in the 90s and was a very powerful tool for creating web pages. From its born it has a synchronous run-time, that means that we start execution of some function, and the code flow is blocked until this function is being executed. And it was not considered as something bad. On the opposite many libraries consider that the blocked flow is normal.
PHP was born in the 90s and was a very powerful tool for creating web pages. From its born it has a synchronous run-time, that means that we start execution of some function, and the code flow is blocked until this function is being executed. And it was not considered as something bad. On the opposite many libraries consider that the blocked flow is normal.
Being a Full Stack Developer
A full stack developer who can get from a prototype to full MVP (minimum viable product) is often considered a jack of all trades, master of none, and with good reason. To define the modern full stack developer, we first need to focus on what the full stack developer used to be.
A full stack developer who can get from a prototype to full MVP (minimum viable product) is often considered a jack of all trades, master of none, and with good reason. To define the modern full stack developer, we first need to focus on what the full stack developer used to be.
Your interpreter isnโt safe anymore โ The PHP module rootkit
Before I begin, I want to make it clear that I condemn the act of using rootkits or any other form of malware without clear consent from the individual or organization being targeted. This post aims to educate the reader about the dangers of malicious PHP modules and outline the very real threat that they pose.
Before I begin, I want to make it clear that I condemn the act of using rootkits or any other form of malware without clear consent from the individual or organization being targeted. This post aims to educate the reader about the dangers of malicious PHP modules and outline the very real threat that they pose.
Make your Laravel App Fly with PHP OPcache
Every time you execute a PHP script, the script needs to be compiled to byte code. OPcache leverages a cache for this bytecode, so the next time the same script is requested, it doesnโt have to recompile it. This can save some precious execution time, and thus make your app faster (and maybe save some server costs).
Every time you execute a PHP script, the script needs to be compiled to byte code. OPcache leverages a cache for this bytecode, so the next time the same script is requested, it doesnโt have to recompile it. This can save some precious execution time, and thus make your app faster (and maybe save some server costs).
Build A Simple Chat With ReactPHP Socket: Server
In this article, we are going to build a simple chat server based on ReactPHP Socket Component. With this component, we can build simple async, streaming plaintext TCP/IP or a secure TLS socket server.
In this article, we are going to build a simple chat server based on ReactPHP Socket Component. With this component, we can build simple async, streaming plaintext TCP/IP or a secure TLS socket server.
Using non-breakable spaces in test method names
Yes. This article is about using non-breakable spaces to name tests. And the fact that itโs awesome. And why you should use them too.
Yes. This article is about using non-breakable spaces to name tests. And the fact that itโs awesome. And why you should use them too.
Doctrine sharding
We chose Doctrine as our ORM so letโs see what it offers to us.
First of all you have to note that Doctrine is composed mainly by two different parts: DBAL and ORM. ORM leverages DBAL functionalities and itโs completely transparent for sharding. DBAL is the layer weโre interested in. Please note weโre using DBAL 2.5.12 as the moment of writing.
We chose Doctrine as our ORM so letโs see what it offers to us.
First of all you have to note that Doctrine is composed mainly by two different parts: DBAL and ORM. ORM leverages DBAL functionalities and itโs completely transparent for sharding. DBAL is the layer weโre interested in. Please note weโre using DBAL 2.5.12 as the moment of writing.
Maybe in PHP
Doing functional programming in a language as PHP, which is almost completely used as an imperative or object oriented way, is not always easy. Good progresses have been made thanks to the introduction of callable type hints in PHP 5.4 and the diffusion of functional interfaces like the ones present in PSR-7.
Doing functional programming in a language as PHP, which is almost completely used as an imperative or object oriented way, is not always easy. Good progresses have been made thanks to the introduction of callable type hints in PHP 5.4 and the diffusion of functional interfaces like the ones present in PSR-7.
Whatโs all this โimmutable dateโ stuff, anyway?
A simple but real-world example of the difference between a mutable and immutable object, and why you should careโฆ
A simple but real-world example of the difference between a mutable and immutable object, and why you should careโฆ
Event Sourcing for the rest of us
Event Sourcing, The CommandBus or Repository of 2017? Surly youโve heard about it, but what exactly is it?
Event Sourcing, The CommandBus or Repository of 2017? Surly youโve heard about it, but what exactly is it?
RESTful API Design Tips from Experience
A working guide of API design tips and trend evaluations.
A working guide of API design tips and trend evaluations.
Building a realtime dashboard powered by Laravel and Vue (2017 edition)
At Spatie we have a tv screen against the wall that displays a dashboard. This dashboard displays the tasks our team should be working on, important events in the near future, which music is playing at our office, and so on.
At Spatie we have a tv screen against the wall that displays a dashboard. This dashboard displays the tasks our team should be working on, important events in the near future, which music is playing at our office, and so on.
Slack App with Laravel
You always wanted to know how to create a Slack app?
Well, who doesnโt want to?
You always wanted to know how to create a Slack app?
Well, who doesnโt want to?
How to Analyze Tweet Sentiments with PHP Machine Learning
As of late, it seems everyone and their proverbial grandma is talking about Machine Learning. Your social media feeds are inundated with posts about ML, Python, TensorFlow, Spark, Scala, Go and so on; and if you are anything like me, you might be wondering, what about PHP?
As of late, it seems everyone and their proverbial grandma is talking about Machine Learning. Your social media feeds are inundated with posts about ML, Python, TensorFlow, Spark, Scala, Go and so on; and if you are anything like me, you might be wondering, what about PHP?
Building Scalable Applications Using Event Sourcing and CQRS
About a year ago, I came across the terms event sourcing and CQRS. I have been fascinated by it ever since. Right now, I am in the middle of building out event-driven microservice infrastructure at Andela using event sourcing. Check out Building Out an Antifragile Microservice Architecture @ AndelaโโโDesign Consideration; my previous blog post to find out some of the design consideration we had to make.
About a year ago, I came across the terms event sourcing and CQRS. I have been fascinated by it ever since. Right now, I am in the middle of building out event-driven microservice infrastructure at Andela using event sourcing. Check out Building Out an Antifragile Microservice Architecture @ AndelaโโโDesign Consideration; my previous blog post to find out some of the design consideration we had to make.
UDP/Datagram Sockets with ReactPHP
When you send data through the sockets, there are situations when you really do not care if some packets are lost during the transition. For example, you are streaming a live video from your camera. The order of the frames is less important than timely delivery, you only want the frames to arrive at the clients as soon as possible. And it also does not matter if some of the frames are lost. You are not going to make a resend request just to make sure that all the frames are shown to the client in the correct order because otherwise your live video will be delayed.
When you send data through the sockets, there are situations when you really do not care if some packets are lost during the transition. For example, you are streaming a live video from your camera. The order of the frames is less important than timely delivery, you only want the frames to arrive at the clients as soon as possible. And it also does not matter if some of the frames are lost. You are not going to make a resend request just to make sure that all the frames are shown to the client in the correct order because otherwise your live video will be delayed.