In the overwhelming quantities of content produced on the Internet each day, I sometimes stumble upon something noteworthy. From this point forward, I am going to take notes in public.| Blog – Jiří Pudil
Almost six months ago, I have released an alpha version of a new, modern AJAX library for Nette Framework named Naja. Now, after half a year in the wild production environment, I guess the time has come for a stable version.| Blog – Jiří Pudil
Do components shared across multiple presenters bloat your BasePresenter? Well, PHP 5.4 comes with a solution to this, with these snippets of reusable code called traits.| Blog – Jiří Pudil
Almost every application needs to work with time: if not for some greater purpose like expiring access credentials, entities usually store information about when they were created or generally when something happened. Telling time is indeed a crucial responsibility, and being able to rely on the mechanism across the whole codebase is really important. But it can get problematic.| Blog – Jiří Pudil
A few minutes ago, I have released a total rework of my intellij-nette-tester plugin that integrates Nette Tester into PhpStorm.| Blog – Jiří Pudil
I've had a really productive couple of weeks and (mostly) weekends recently. I've worked extensively on one of my side projects using modern JS stack including Webpack, faced issues here and there, and found a way to solve them. In the end, I proudly announce three new open-source packages: a modern AJAX library for Nette Framework, Neon loader for Webpack, and a library integrating the Webpack build process into Nette-powered applications.| Blog – Jiří Pudil
Recently, in my bachelor's thesis, I've used extensively the whole Node.js and JavaScript ecosystem, including Webpack for bundling modules. And I love it. So there's no wonder I've tried setting it up in a classic Nette web application as well. Here goes a simple step-by-step example.| Blog – Jiří Pudil
If you host your repositories on Github, you have probably noticed they started verifying GPG signatures back in April. After half a day of pain, googling and experimenting, I came up with this definitive guide on how to set this up in PhpStorm on OS X.| Blog – Jiří Pudil
Testing your application against a real database and pseudo-real data is quite a challenge. I'm going to show you how to automate the process of creating a test database with its schema and filling it with data, all with tools you might already be familiar with, including Nette Tester and Doctrine 2 along with Doctrine Migrations and Data Fixtures.| Blog – Jiří Pudil
Webfonts have become quite a common sight on websites. They give designers the flexibility to choose the perfect type without having to worry about the availability of the chosen fonts. But, on the other hand, they may be a real problem especially on slow connections. Luckily, there is a tool that solves this.| Blog – Jiří Pudil
Unit testing a class that uses Nette's cache can be a pain in the you-know-what. I've found myself writing a very simple cache factory to solve this and make testing classes depending on cache a pleasing experience, so I've decided to make an extension out of it.| Blog – Jiří Pudil
Listing data is essentially the most crucial part of websites. Be it products, articles, photos or whatnots, we usually need to provide the user the way to filter and/or sort the data by some preset parameters. I'll show you how to encapsulate such filtering within an object, build a user interface (in other words, a form) upon it, and use it with Kdyby/Doctrine's query objects to actually filter the data on the database level.| Blog – Jiří Pudil
Last December, I implemented smart forms via Kdyby/DoctrineForms on this blog. Since the documentation of the package seems to be quite lacking in its scope, I decided to share with you how to overcome the pitfalls I had encountered and make it work.| Blog – Jiří Pudil
In order for components in Nette to be as reusable as possible, it is necessary to decouple them from presenters. The cleanest way out of this is to invert the dependency. After all, it's the presenter that requires the component, not vice versa.| Blog – Jiří Pudil
The need for authentication mechanisms that provide more security has been rising during the recent years. Google has ventured into this field with their Authenticator application which is now used not only by Google itself, but also other big players like Github or Dropbox. And you know what? It's not really that difficult to join this elite group. I'm going to show you how.| Blog – Jiří Pudil
Implementing a shiny new feature for one of our clients, we faced a challenging task. We needed to handle uploads of loads of files. Effectively. Without torturing the server with unnecessary stuff.| Blog – Jiří Pudil
Earlier this week, I launched a brand new version of this website. It is written in PHP using Nette and Doctrine, uses Bower and Gulp to build assets, and strives to follow current best practices. And, last but definitely not least, its source code is open.| Blog – Jiří Pudil
This text provides a comprehensive guide on how to configure Nginx and PHP-FPM and make it run smoothly with Nette framework.| Blog – Jiří Pudil
PHPStan has only supported invariant and covariant template types because they are so prevalent in real-world applications. But contravariant template types also have their use cases, and the latest release of PHPStan adds support for them, among other small improvements to generics.| Blog – Jiří Pudil
In my recent post, I've introduced a PHPStan extension that brings support for sealed classes and interfaces to statically analyzed PHP. Looking back, I feel I haven't stressed the main benefit enough, so here I am doing it justice.| Blog – Jiří Pudil
Sealed classes are a useful feature of Kotlin: they allow you to specify which classes are allowed to extend a sealed class (or implement a sealed interface). With the recently released PHPStan 1.9.0, you can now introduce sealed classes to your PHP codebase too!| Blog – Jiří Pudil
Previously, I've discussed working with date and time values both server- and client-side, and I've covered storing temporal data in databases. This time, we're going to talk about telling time.| Blog – Jiří Pudil
I've already talked about working with date and time values on both sides of the web stack. However, in web development, we not only manipulate temporal values, we often need to store them somewhere and retrieve them later. This post discusses the best methods of persisting dates and times in databases.| Blog – Jiří Pudil
I've talked about date and time not being easy in PHP, and it's not easier in JavaScript either. Luckily, similarly to the PHP ecosystem, the community has provided better solutions to date and time than the native Date. Let's discuss them.| Blog – Jiří Pudil
Time is omnipresent in software development. Pretty much every web application works with it in one way or another. Even the simplest blogging platform stores "when" a post should be published and then displays and sorts them using that information. While you might not run into any issues when developing a blogging platform, any more complex system can easily expose how complicated time actually is. Because time is complicated. And yet, many standard libraries in programming languages only gi...| Blog – Jiří Pudil
I love Nette Framework's dependency injection solution. I really do. This post is here to share this passion, explaining why I think it is the best DI solution in today's PHP ecosystem.| Blog – Jiří Pudil
If you are developing a library that needs to make HTTP requests, here's how not to make it difficult for your consumers.| Blog – Jiří Pudil
If you've ever implemented an HTTP API in PHP, you probably know that there's one thing you have to do over and over and over: parse the request body and validate the resulting structure. Now that we have PSR-15, let's use a middleware for that!| Blog – Jiří Pudil
They say you should understand floating-point precision by 35.0000000000014. This post is here to help you: it discusses how floats are (im)precise and why, demonstrates the problems you inevitably encounter when doing math with floats, and presents ways to prevent those problems by using more proper data types and structures.| Blog – Jiří Pudil
There's a new buzzword on the PHP block: frameworkless. The activities of PHP communities last year made it possible to build robust applications, uniquely composed of little bits, without relying on a big framework. Let's find out how they work and if it's a good approach.| Blog – Jiří Pudil
As the business requirements grow, so does the list of dependencies. Managers ask for a new feature, you just composer-require this thing and that other thing, and wire it into the application. But how do you keep track of new features in the dependencies? Or bugfixes? Or, most importantly, security patches?!| Blog – Jiří Pudil
In the course of the last few weeks, I have invested some time into Naja. You might recall my previous announcement in which I stated that there was still one big thing left to do. Well, now it is done!| Blog – Jiří Pudil