Before I move on and pay attention to the subject of this final article, first I'd like to refresh, at least quickly, some topics that were covered with detail in the preceding part of the series. As you'll certainly recall, in the previous tutorial I extended the implementation of the bridge pattern with PHP 5, by defining a bunch of straightforward classes, which when used in conjunction, followed the principles dictated by the mentioned pattern. Speaking more specifically, I created a bridge class called "BridgeDataValidator" which defined the generic structure of a data validation object. This is handy for checking different types of user-provided input. However, the most relevant aspect of this schema rested on the capacity offered by the referenced class to create distinct data validator objects. These objects implemented concretely the required logic for checking numbers, alphabetic values, and email addresses. Naturally, the data validation objects were conceived as independent structures, which resulted in the complete decoupling of the "BridgeDataValidator" class from its own implementation. Of course, if you're familiar with how the bridge pattern works, then you'll realize that all the classes that I developed in the previous tutorial precisely followed that model. Now that I hopefully refreshed the topics that were treated in the preceding article of the series, it's time to focus your attention on the current one. The question that comes up now is the following: is there anything else that can be said about the bridge pattern? Of course there is! In this final tutorial I'm going to show you how to create a highly expandable abstraction layer that will allow you to work with MySQL using different libraries. This sounds interesting, right? Having introduced the subject of this installment, let's leap forward and discover together how to build a MySQL abstraction layer, in this case using the bridge pattern. Let's get going!
blog comments powered by Disqus |