Miscellaneous Code

  Home arrow Miscellaneous Code arrow The HMVC Design Pattern: Working with ...
MISCELLANEOUS CODE

The HMVC Design Pattern: Working with MySQL and Caching Data
By: Alejandros Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2010-03-03

    Table of Contents:
  • The HMVC Design Pattern: Working with MySQL and Caching Data
  • Review: the current source files for the HMVC-driven framework
  • The default storage mechanism for the framework
  • Coding a cache class

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    The HMVC Design Pattern: Working with MySQL and Caching Data


    (Page 1 of 4 )

    If you’re a PHP coder who wants to expand your existing background in design patterns, then start reading this series of articles. Over the course of its tutorials, you’ll learn how to implement the Hierarchical Model-View-Controller paradigm by developing a fully-functional, object-oriented framework in PHP 5. This is the third part of the series.

    And now that you're aware of the goal of this series, it's time to review the concepts discussed in the previous installment. In the second part of the series, I developed two core components of the aforementioned framework that will allow you to build PHP applications by using a basic HMVC layer.

    The first of these components was composed of a router/dispatcher class that naturally was tasked with parsing a given HTTP request and dispatching it to the appropriate controller. Despite its simplicity and short definition, the second component was the most relevant; it consisted of a basic request-handling class that will permit you to map single requests to one or multiple Model-View-Controller triads, thus making it possible to run web-based programs by relying upon the architecture imposed by the HMVC pattern.

    Although in its current incarnation the framework will let you build applications made up of individual MVC modules, it'd be desirable to make it much more functional by adding a few more classes that allow you to interact with MySQL and cache data. So, in the following lines I'm going to code those components, which you'll find very easy to follow, take my word for it.

    Now, it's time to start providing this HMVC-based framework with the ability to work with MySQL databases and to cache data. Let's go!

    More Miscellaneous Code Articles
    More By Alejandros Gervasio

    blog comments powered by Disqus

    MISCELLANEOUS CODE ARTICLES

    - Creating a Web Page Controller with the HMVC...
    - Coding Controllers and Views for the HMVC De...
    - A Sample Web Application with the HMVC Desig...
    - Adding a Class to Parse Views to an HMVC Des...
    - Building a Model Class for the HMVC Design P...
    - Filtering Input Data and Generating HTML For...
    - The HMVC Design Pattern: Working with MySQL ...
    - Dispatching Requests to MVC Triads with the ...
    - Implementing the Hierarchical Model-View-Con...
    - A Web App Based on a Model for the CodeIgnit...
    - Completing a Model for the CodeIgniter PHP F...
    - Validating Input Data with the CodeIgniter P...
    - Deleting Database Records with the CodeIgnit...
    - Inserting Database Records with a CodeIgnite...
    - Fetching Database Rows with a Model for the ...

    Developer Shed Affiliates

     



    © 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap