| ||Date ||Title ||Author ||Hits |
| || 05-18-10 || ||Alejandro Gervasio ||13342 |
In this second part of the series, I show you how useful late static bindings can be for dealing with a hierarchy of classes in static environments. In this case, the classes that compose that hierarchy are simple implementations of the registry design pattern, but this feature can be utilized in different situations and yield similar results.
| || 05-17-10 || ||Alejandro Gervasio ||16025 |
PHP 5.3 introduced a number of valuable features to the popular and constantly developing language, but some of them seem less useful at first glance than they actually are. Late static bindings fall into this category. This article series shows you how to unlock the true power of LSB to work for you.
| || 04-28-10 || ||Alejandro Gervasio ||13470 |
Being one of the most popular contenders in the exciting, but very often complex, terrain of software design, the Strategy design pattern is a well-trusted paradigm. It allows you to build more flexible and efficient applications by appealing to the functionality of two of the big pillars of solid object-oriented programming: favoring Composition over Inheritance, and encapsulating the concepts that vary. This is the conclusion to a six-part series that shows you how to use the Strategy design pattern to validate incoming data.
| || 04-27-10 || ||Alejandro Gervasio ||12345 |
In this penultimate part of the series, I will build a strategy class that validates URLs using the built-in PHP function “filter_var().” This process is similar to defining other strategy classes discussed in previous parts, so you shouldn’t have major difficulties understanding its underlying logic.
| || 04-26-10 || ||Alejandro Gervasio ||13783 |
In this fourth part of a series on the strategy design pattern, I extend the functionality of the sample validation program by adding another strategy class to it. The new class will check the validity of a supplied email address.
| || 04-21-10 || ||Alejandro Gervasio ||9705 |
In this third part of a series on validating incoming data with the strategy design pattern, I create a brand new strategy class that can check whether or not a supplied input value is a float number. The addition of this class extends the capabilities of the sample validation program that I’m building in this series.
| || 04-20-10 || ||Alejandro Gervasio ||13965 |
If you’re a PHP developer who wants to learn how to implement the Strategy design pattern in a real-world project, then you might want to take a look at this article series. Over the course of its six tutorials, you’ll walk through the development of a modular and flexible application, which will use this powerful pattern to validate different types of data, including integer and float numbers, email addresses and URLs.
| || 04-19-10 || ||Alejandro Gervasio ||13819 |
Welcome to the final installment of a series that provides an overview of the Iterator, Countable and ArrayAccess SPL interfaces in PHP 5. Made up of six parts, this series teaches you how to build a fully-working MySQL abstraction class that takes advantage of the methods inherited from these native interfaces to manipulate database record sets easily by using an array syntax.
| || 04-14-10 || ||Alejandro Gervasio ||24404 |
If you’ve been doing some research lately on the web about how to implement different design patterns, be it in Java, PHP or Python, you'll probably have noticed that the Strategy pattern is one of the most popular contenders in the field. It has been covered countless times in all types of media, ranging from books and magazines to e-zines and personal blogs. In this article series, I'll show you how to use this popular design pattern to accomplish one of the more common tasks a website must perform: validating user-supplied data.
| || 04-12-10 || ||Alejandro Gervasio ||8694 |
In this fifth part of a six-part series on the Iterator, Countable and ArrayAccess SPL interfaces, I implement the rest of the methods declared by the ArrayAccess SPL interface within the “MySQLi_ResultWrapper” class that you saw in a previous part. Once this process is completed, the class will be able to treat records in database result sets as if they were plain array elements.
| || 04-07-10 || ||Alejandro Gervasio ||34759 |
Welcome to the final part of a series on implementing the Data Mapper design pattern in PHP 5. This series teaches you the key concepts that surround the development of data mapper classes. It complements the corresponding theory with a decent variety of code samples.
| || 04-06-10 || ||Alejandro Gervasio ||10770 |
In this fourth part of a six-part series, that covers the Iterator, Countable, and ArrayAccess SPL interfaces, I show how to partially implement the methods declared by the ArrayAccess SPL interface within a sample class that manipulates MySQL result sets.
| || 04-05-10 || ||Alejandro Gervasio ||9195 |
Welcome to the final part of a series on the Reflection API. Through a decent variety of functional code samples, this series shows you how to take advantage of the power offered by reflection to analyze the internal structure of your classes and interfaces by using an object-oriented approach.
| || 03-31-10 || ||Alejandro Gervasio ||23408 |
In this penultimate part of the series on the data mapper design pattern, I demonstrate how to provide the UserMapper class we've previously created with the ability to delete users from its associated MySQL table.
| || 03-30-10 || ||Alejandro Gervasio ||9816 |
In this third part of a seven-part series on the Iterator, Countable and ArrayAccess SPL interfaces, I give the MySQLi_ResultWrapper class developed in the previous part the capability of counting the number of rows contained in a given result set. I'll do that by implementing the "count()” method declared by the Countable interface. Doing this will make it possible to use an instance of the class to traverse data sets and count records as if they were plain PHP arrays, which is quite appealing to client code that works with the class’s API.