Hello everyone.
I have a project that I am going to be working on and I have created a html helper class. That class looks pretty good if I do say so myself. :)
I think I am missing out on the big picture of OOP though. The way in which I am using this helper class is in my index file like so:
[PHP]
$html->TROpen();
$html->TDOpen();
echo " ";
$html->TDClose();
$html->TDOpen();
$html->Input('submit' ,'submit','Save Data');
$html->TDClose();
$html->TRClose();[/PHP]
This of course will build two td cells with a submit button. What I am seeing that does not look right is that this resembles more procedural programming than OOP. After I have repeated this sequence of, for example, 10 td cells, I am thinking that there has to be a better way to do this.
It seems to me that maybe I should be extending the helper class to a different class where I build the different boxes I need then call those boxes in my index file. Am I correct on this?
I feel like I am almost there guys in my quest for understanding how to implement OOP. :)
Thank you for any input!
Frank
I have a project that I am going to be working on and I have created a html helper class. That class looks pretty good if I do say so myself. :)
I think I am missing out on the big picture of OOP though. The way in which I am using this helper class is in my index file like so:
[PHP]
$html->TROpen();
$html->TDOpen();
echo " ";
$html->TDClose();
$html->TDOpen();
$html->Input('submit' ,'submit','Save Data');
$html->TDClose();
$html->TRClose();[/PHP]
This of course will build two td cells with a submit button. What I am seeing that does not look right is that this resembles more procedural programming than OOP. After I have repeated this sequence of, for example, 10 td cells, I am thinking that there has to be a better way to do this.
It seems to me that maybe I should be extending the helper class to a different class where I build the different boxes I need then call those boxes in my index file. Am I correct on this?
I feel like I am almost there guys in my quest for understanding how to implement OOP. :)
Thank you for any input!
Frank
Comment