I've recently upgraded my MacBook Air to macOS 26 Tahoe and one thing I noticed was that Rodeo's rules were no longer working. With the help of exiftool, I worked out that when exporting to JPEG from Photos for macOS 26 Tahoe, the Object Name, Caption-Abstract and Keywords IPRC …
78 result(s) for “object”
Destructuring is a huge part of ES6. If you want to learn all about the different parts of destructuring check out my ES6.io video tutorials or read some of the other articles on this blog. This post is a dead simple introduction to what destructuring actually is . Along with ar…
There’s one last thing we need to know about destructuring objects, and that is the ability to set defaults. This one’s a little bit confusing, so bear with me here and we’re going to circle back for another example later on in a couple of videos over at ES6.io…
В этой части мы рассмотрим разработку и использование директивы AngularJS, которая позволит добавить карту в интерфейс нашего приложения. Ссылки на предыдущие статьи вы найдете в конце страницы. Директивы в AngularJS предназначены для работы с DOM (Document Object Model – объект…
I’m going to put to vote soon another of my RFCs, namely one about “objects as keys“. So, I want to outline the case for it here and address some criticisms and questions raised while discussing it. Why we may want it it? Traditionally, in PHP array keys could …
If you're not using interfaces in PHP, you are missing out on a powerful object-oriented programming feature. An interface defines how to interact with a class. By defining an interface and then implementing it, you can guarantee a "contract" for consumers of a class. Interfaces…
Read the full post on https://stitcher.io/blog/request-objects-in-tempest
What: SymfonyLive 2026 Where: CineStar CUBIX Berlin When: April 23-24, 2026 Benjamin will be attending SymfonyLive 2026 and contributing a talk focused on one of the most relevant changes in modern PHP. With PHP 8.4, native support for lazy loading and proxy objects becomes part…
When my coworker today asked if he could cast an array to a object. I couldn’t really answer the question. Don’t think i ever done that. So let’s try. right? Cast array to object $arr = array('foo' => 'baz'); $obj = (object) $arr; var_dump($obj); object(stdClass)#1 (1) { [&qu…
by Yitzchak Schaffer (@YitzOfTheBits) The true focus of this post is how to retrieve given member values of associative arrays in PHP, but it will touch on analagous constructs in other popular languages, namely Java’s Map, Python’s dict, Ruby’s Hash, and Javas…
Cal Evans hosts his friend Matthias Noback as they talk about Domain Driven Design and Matthias’ new book “Recipes for Decoupling. @matthiasnoback Show Notes Recipes for Decoupling Matthias Noback's blog Object Design Style Guide Audio This episode is sponsored …
Quick one here but today, thanks to Tez on Stack Overflow, I discovered that PHP's null coalescing operator (the double question mark operator) can fail when you use a function at any part of the statement.
EDIT: Some of my latest articles have had traffic orders of magnitude larger than the one mentioned below, making the figures completely obsolete. It looks like my latest blog post, A Diagram of the Ruby Core Object Model, has had quite a bit of a success in the Ruby community. …
I am a visual learner. A picture is worth a thousand words. When I started learning Ruby, I could not find a decent diagram that would just sum up the Ruby classes, modules, and their hierarchy. So I made mine. By hand. On an A4 sheet. Here is the result (click for a full size v…
Python-oracledb rowfactories are a powerful way for Oracle Database queries to alter the representation of fetched rows, reducing the amount of application boilerplate code and data copying. This blog shows how easy it is to use a Python Data Class with a rowfactory to transform…
DateTimeImmutable::modify() Alters the timestamp. Like DateTime::modify() but works with DateTimeImmutable. Duh. I don’t see what’s so hard about this, @pda. Of course, it doesn’t actually do what the name says and modify an unmodifiable object at all. So, at least there’s that;…
In this short article we will see what immutable objects are and why we should consider to use them. Immutable object is an object that does not change its state after it was created. Immutable objects usually are very simple. You may already seen them as enum types or primitive…
We recently attended a talk about lazy-loading by Nicolas Grekas and it inspired me this blogpost! We can find lazy-loading in all modern PHP applications, in ORMs, for example. But is there more usage…
While running coderetreats, I have the opportunity to see a lot of people working on Conway’s Game of Life. As we go through the day, I make comments about design, both in the large and in the small. Over the years, I’ve seen similar patterns pop up across many different develop…
By default, Laravel uses Carbon for dates, but the object returned by the \\Illuminate\\Support\\Facades\\Date helper is mutable.
Strongly-typed object-oriented code helps me tremendously during refactoring. When I realize I need to pass more information from one place to another, I usually take my first step by changing a return typehint, or adding a required parameter to a method. Running PHPStan after m…
We're going to discuss Golang's "context" objects (context.Context). I'll assume you're at least passingly familiar with them. It's useful if your request handlers can share information about a request. Often the request data itself (http.Request) has everything you ne…
#vimeoembed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto; } #vimeoembed iframe, #vimeoembed section object, #vimeoembed section embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } Here's a video ex…
Stateless Services As more frameworks and libraries, particularly in the PHP world, move towards adopting the Dependency Injection pattern they are all faced with the problem of bootstrapping their application and constructing the object graph. In many cases this is solved by a …
As a long-time PHP enthusiast and contributor, I’ve always been fascinated by how PHP can evolve to improve developer experience while maintaining its simplicity. Over the years, I’ve explored various ways to enhance the language, including my previously published Object Initial…
In this article, we’re gonna demystify RFC: Object Initializer which was proposed by me up for discussion on PHP Internals. Motivation The motivation behind Object Initializer RFC was dictated by a large number of repetitions when creating simple objects like DTO and a lot…
I’d like to present my concept of inner classes for PHP based on other languages and PHP limitations. What are those inner classes? Nested Inner Class UML In object-oriented programming (OOP), an inner class or nested class is a class declared entirely within the body of a…
There are many implementations of Hydrator and Extractor pattern. What is Hydration? Hydration is the act of populating an object from a set of data. Hydrators have wide usage in ORM and Data Mappers their responsibility is to provide entity objects from relational database. Hyd…
Following the raging success of PHP 7.0 additions scalar type hints and return types, there is also place for object typehint and return type. That feature can replace double is_object() validation inside function/method. I decided to write an RFC:Object-typehint. Why do we need…
I do a lot of Code Reviews, and without proper automation of most of the low level items that you are usually "remarking" to colleagues it is a frustrating experience for everyone involved and takes more time that needed. My natural tendency is towards action over plan…
Symfony Object Mapper Component# Check out the slides of my conference at the Symfony Con: Mapping is something that you see in many frameworks over the web in every programming languages. Doctrine, for example, has a quite complex mapper to transform the relational database rep…
An example of how to drop modules on a target using the syscall memfd_create
Have you heard of the Swift programming language? Swift is a programming language used general-purpose which is developed by Apple Inc. It’s a multi-paradigm (object-oriented, protocol-oriented, block-structured etc.) programming language which is mainly developed for iPad…
We've all seen it: `new Human()` followed by three `setName()`, `setAge()`, `setEmail()` calls that are always there. Not optional - just pretending. These are constructor arguments in a fluent disguise, and they leave your objects half-valid every time someone forgets one. So I…
The globalThis proposal introduces a unified mechanism to access the so-called “global object” a.k.a. “the global” in any JavaScript environment. It sounds like a simple thing to polyfill, but it turns out it’s pretty hard to get right.
Fun fact: var foo = { H̹̙̦̮͉̩̗̗ͧ̇̏̊̾Eͨ͆͒̆ͮ̃͏̷̮̣̫̤̣Cͯ̂͐͏̨̛͔̦̟͈̻O̜͎͍͙͚̬̝̣̽ͮ͐͗̀ͤ̍̀͢M̴̡̲̭͍͇̼̟̯̦̉̒͠Ḛ̛̙̞̪̗ͥͤͩ̾͑̔͐ͅṮ̴̷̷̗̼͍̿̿̓̽͐H̙̙̔̄͜: 42 }; is valid JavaScript. It may not be immediately obvious, but the real surprise here is that the Cthulhu-esque property name is not surrounded by q…
Performance is an important subject when a project grows. There are some good practices that make projects more maintainable, like dependency injection, however, creating all the objects at the beginning of the request could reduce the application performance. If some of the cre…
Io is amazing. Here’s a (naive) JSON interpreter in Io. JSON := Object clone do( curlyBrackets := method( call message arguments foreach(msg, self setSlot( call sender doString(msg name), JSON clone doMessage(msg next ?next) ) ) self ) squareBrackets := method( call message argu…
I have just published my first entry on the new Solar project blog. Go read about Using registry_set to auto-register objects. It’s one of the cool new features of Solar version 1.0.0alpha2.
Validation is one of the most common tasks when building many types of software applications. Talking more specifically about the Symfony Framework, its Validator component offers a very powerful set of APIs to validate objects, arrays, forms and much more. We are going to see a…
After more than a two years of work (the first commit was on July 20 2016), jms/serializer v2.0 is going to see the light. jms/serializer is a popular library to serialize/deserialize objects from/to XML and JSON. The installs counter on packagist has already passed 20 million d…
Recently, while speaking at the Symfony Berlin User Group, during the Q&A session, I was asked to comment on how to solve an issue when using FOS REST Bundle and JMS Serializer. The JMS Serializer is a library that allows to serialize and deserialize and object graph into a …
Scholarships for the Oct 19-21 Practical Object-Oriented Design Course (POODNYC) in New York City have been awarded! Winners are listed below, but before I introduce them I'd like to give an overview of the applicant pool and selection process. I'll be awarding scholarships for …
I'm feeling suspicious of nil. What is nil? In a recent newsletter I pondered true and false and suggested that thinking of them as normal, everyday objects could expand your ideas about OOP. Today I'll continue with this theme by considering nil. What _is_ nil? A str…
Scholarships for the Oct 29-31 Practical Object-Oriented Design Course (POODNC) in Durham, NC have been awarded! Winners are listed below, but before I introduce them I'd like to give an overview of the applicant pool and selection process. I'll be awarding scholarshi…
I love object-oriented design. It’s like open source software in general; perfect strangers come up with ideas that can save me time and money and then, out of the goodness of their hearts, go to a fair amount of trouble to pass these ideas on. I benefit from their efforts every…
You’re an object – Stand up straight and act like one! Imagine you have this code: Code 1: class MyView attr_reader :target def initialize(target) @target = target end def double case target when Numeric then target * 2 when String then target.next # lazy example fail when Array…
Not as Painful as it sounds… Nothing is more pleasing than beautiful code. And nothing is more heart-breaking than watching beautiful code get destroyed. Lately, I’ve been paying particular attention to SOLID Object Oriented Design (OOD) principles and their interaction with TDD…
Haven’t found a better solution class Something < ActiveRecord::Base class JsonSymbolized def self.load(string) JSON.parse(string, symbolize_names: true) end def self.dump(object) object.to_json end end serialize :field, JsonSymbolized end
I was trying to figure out a simple way to have data from a database injected into a domain object in PHP. I don't want to enforce that the domain object implements setters and getters for every property, and the burden on the developer for implementing the data injection interf…
JWT, JWE, JWS, etc. are terrible designs and need to be scrapped, not resuscitated.
Earlier on in my programming career, I got pretty heavy into Object-Oriented Programming and all the various design patterns around it (there are a lot). I used to worship at the alter of Martin Fowler and zealously look for opportunities to implement all of the various Gang of …
tl;dr When creating value objects representing time, I recommend choosing how finegrained the time should be with your domain experts and round it off to that precision in the value object. When modeling important numbers, it’s considered good form to specify the precision. Whet…
Dear Helper Functions, _You are an escape._ In a world of rigid object-orientation, you offer freed...
When we think about interfaces in software development, it’s easy that our thoughts go the interface keyword used in many Object-Oriented languages like Java and C#. But interfaces are a much more general concept, and they could be defined as: an interface is a shared boundary a…
Either is one of the easiest data structures which can be used to make your code safer and more composable. It is not particularly complex but sometimes it is still hard to grasp, especially for programmers used to a procedural or object oriented approach. In this post I’ll try …
The so.ch website follows a clear objective: users should be able to get things done quickly, directly, and without unnecessary detours. Instead of reflecting the traditional administrative logic of “Which office is responsible?”, so.ch focuses on the user’s actual need: “…
The PHP world is not known for good unit test coverage. It’s mostly a cultural issue, but there is a technical aspect to it as well. PHPUnit allows you to create mock objects, but that assumes your codebase uses the Depedency Injection pattern. If not, it’s very hard to add...
I was recently assigned to work on a node.js project — a first, for me. I discovered that it comes with a neat CLI debugger built in, which is very handy when diving into an unknown codebase. However, when inspecting a variable, it doesn’t show me its type; only its...
Welcome to the 10th PHP Coding Puzzle ! The Sudoku Game The objective of Sudoku is to fill a 9×9 grid with numbers so that each row, column, and 3×3 sub-grid (or “box”) contains all of the digits from 1 to 9. To solve a Sudoku puzzle, you need to use logic …
Welcome to our new series of articles, PHP Design Patterns Games! In this article, we will explore the Strategy Pattern, which is a behavioral design pattern that enables an object, called the context, to change its behavior dynamically by selecting a suitable algorithm from a g…
I really like _with style functions that accept a FnOnce callback. The scoping rules work out really well when using these functions. I was working with the slab crate recently and used the Slab#insert_with function. This function takes a callback where an object is supposed to …
Working is extremely nice once you have a grasp on the basic concepts. But, one of the coolest promises (some pun intended) is the ability to use the render view helper. At its core, the render object lets you render a template with a view class wrapping it. However, the real po…
Today, I was playing with Ember Model while looking at refactoring from a raw Backbone project to Ember. Since writing this article, I have found a more useful reopen method within Ember's Object Model. One of the things that immdiately hit me was that all requests are built by …
How to combine service interfaces, factory functions, and the Null Object pattern to build TypeScript scripts that run without credentials or third-part...
Learn how Expressive can improve a Laravel application by keeping Eloquent as the database layer while moving business logic to fully typed objects. Read more
Motivation Storing PHP objects (or simpler data types like arrays) in caches always requires some kind of transformation. You need a way of encoding/decoding data so that it can be stored and loaded properly. In most languages, this process is known as object serialization. PHP …
One of the most important objectives for the Open Sourcing Mental Illness project is to help people get the support they need for mental health challenges in the workplace. I’m so proud that we’ve had our Mental Health in Tech guidelines available as ebooks from our …
Example is based using Aura.Di. But the functionality will be same for any containers. First register the service Zend\View\HelperPluginManager, so that we can access the same object. To register the form helpers, create the object of Zend\Form\View\HelperConfig and pass the Zen…
The Aura.Http package provide you the tool to build and send request and response. Instantiation: # The easiest way is 1 2 3 <?php $http = require 'path/to/Aura.Http/scripts/instance.php'; What it gives you is an object of Aura\Http\Manager. If you want to create manu…
This guide will allow you to use value objects in PHP without a special $obj->equals() method. Instead, you can use the === or == operator to compare two value objects. This guide will also show you how to use a…
Michal Kral
Michal Kral
Michal Kral
Michal Kral
Seifeddine Gmati
Morgan
Rob Landers