PHP
  Home arrow PHP arrow More Examples of Creating Command Objects with PHP 5
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

More Examples of Creating Command Objects with PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 6
    2006-12-19


    Table of Contents:
  • More Examples of Creating Command Objects with PHP 5
  • Building an array command class
  • Creating two more command classes
  • Building an array commanded class
  • Including all the classes in one hands-on example

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    More Examples of Creating Command Objects with PHP 5
    ( Page 1 of 5 )

    Are you one of those PHP developers who wants to expand your background in design patterns by learning an additional one? If your answer is affirmative, then this series might be appealing to you. It will teach you, in three educational tutorials, how to create and implement command objects with PHP 5.

    Frankly speaking, the application of the command pattern with PHP is an accessible topic that seems to be much harder to grasp than what it really is. Essentially, the logic that stands behind the referenced pattern will allow you to establish a carefully-crated relationship between at least two objects, where the first one, usually called the commanded, presents a specific method coded in such a way that it houses all the logic required for being called into another object, in this case named "commander."

    Since the previous definition looks rather difficult to grasp, at least at first glance, the best course of action to take in this case is simply to annex to the corresponding theory into some comprehensive examples. In this way the mentioned pattern can be understood much more clearly, and at the same time, it brings new possibilities for including it into complex applications.

    Naturally, in the previous article I followed the learning methodology that I mentioned above by defining some command classes, which were originally capable of instructing a commanded object on how to display a specified input string. Of course, the examples were rather primitive and they should be considered only like that. However, it's important to mention here that all the code samples that I wrote previously came in really handy for demonstrating by an understandable approach, how to create and use command objects with PHP.

    Now, and turning special attention to this second article of the series, I'll develop a few more hands-on examples concerning the pattern in question, thus you can reaffirm the concepts learned in the preceding installment.

    With the theme of this article already established, let's continue exploring the creation of command objects in PHP 5. Let's get started!



     
     
    >>> More PHP Articles          >>> More By Alejandro Gervasio
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT