PHP
  Home arrow PHP arrow More Examples of Creating Command Obje...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
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: 4 stars4 stars4 stars4 stars4 stars / 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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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


       · Over the course of this second part of the series, you'll learn how to use command...
       · It's again clear what it does and how it does it, but it's not clear "why" I would...
       · Thank you for posting your comments here. Concerning your question, it doesn’t mean...
       · I trust that there are occasions where it could be usefull. I'd love to see a...
       · Thank you again for commenting here. I’ll keep in mind your suggestion on the...
       · A nice article and good explanation of how the command pattern works. I do agree...
       · Hi friend,Thank you for the kind comments about my article on the command...
       · I had the same exact question - why and when do you really have an advantage of...
       · Reading the first page of this article made me dizzy. I felt like I was reading one...
       · Hello Nikolai,Thank you for posting your questions here. As I said before, this...
       · Hello there,Thank you for commenting my PHP article, and certainly I accept your...
       · Thanks AlejandroA good working example of the described pattern and conveyed...
       · Hi Jon,Thank you for your positive comments on my PHP article. I really...
     

       

    PHP ARTICLES

    - Validating Web Forms with the Code Igniter P...
    - Output Buffering
    - Paginating Database Records with the Code Ig...
    - HTTP Headers in Web Development
    - Project Management: Administration
    - Building a Database-Driven Application with ...
    - User Authentication for a Project Management...
    - Introduction to the CodeIgniter PHP Framework
    - Adding Users for a Project Management Applic...
    - Migrating Class Code for a MIME Email to PHP...
    - Login and Logout Authentication for a Projec...
    - Composing Messages in HTML for MIME Email wi...
    - Project Management: Authentication
    - A Better Way to Determine MIME Types for MIM...
    - Project Management Overview





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway