Home arrow PHP arrow Finishing a Form Helper Class for an MVC-based Framework in PHP 5

Finishing a Form Helper Class for an MVC-based Framework in PHP 5

In this sixth part of the series, I finish building a basic HTML form helper class. Doing this adds yet another important component to the sample MVC-driven framework we're developing in this group of tutorials.

TABLE OF CONTENTS:
  1. Finishing a Form Helper Class for an MVC-based Framework in PHP 5
  2. Review: adding a form helper class to the MVC-driven framework
  3. Finishing the HTML form helper class: a method for rendering text area elements
  4. The complete definition of the HTML form helper class
By: Alejandro Gervasio
Rating: starstarstarstarstar / 2
June 21, 2010

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

If youíre a PHP developer who wishes to learn how to develop an extensible framework that relies on the structure of the Model-View-Controller design pattern to separate business and application logic from visual presentation, then you've come to the right place.

Welcome to the sixth installment of the series that focuses on building a simple MVC-based framework in PHP 5. Made up of fourteen tutorials, this series walks you through the progressive development of a stack of modular classes. These classes can be put together to work very easily under the schema imposed by the MVC pattern.

Now itís time to recall the concepts that were deployed in the last tutorial, in case you haven't read it yet. In that part of the series I started to build a helper class whose main task was rendering different elements of an HTML form, such as input boxes, radio and submit buttons, and so forth.

The loosely-coupled and flexible structure of this class helper allows you to use it either as a standalone entity or within the context of the MVC-based framework that Iím currently developing, which is all good and neat. Nonetheless, despite this benefit, the class in its current incarnation lacks an important feature. It cannot construct another common web form element, such as a basic text area.

Since the form helper class must suit that specific need, in the next few lines Iím going to add a whole new method to it that will be responsible for rendering those HTML elements.

Now that you know what to expect from this sixth chapter of the series, itís time to get our hands dirty with some functional code. Letís get going!



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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: