|
Posted by msch-prv on 06/20/06 19:47
I am about to embark on creating a mid-size web project that heavily
relies on db interactions.
Since most pages will contain recurring form elements (input text
boxes, dropdown boxes, radio buttons, submit forms, tables, etc.), I am
thinking of using blocks to insert components to each page. All
standard elements would be instances of form element classes. Calling
up these objects would generate customized html code.
Ex: a cbo box could be instantiated in a script via:
<p>Select Customer:</p><?php creatElement($cboName, $cboCSS, $cboVal,
$cboOpt, ..); ?>
Would such an approach be more efficient that the traditional
line-by-line approach wrt. debugging, maintenance, etc. ? (I really
dread mixing php and html.). While I like Smarty's templating approach,
it seems Smarty still requires linear coding to do code translation.
I visualize html pages in terms of grids where cells could be filled up
by html block components. Is this approach somewhat too fancy?
Thanks for any insights,
Mark
Navigation:
[Reply to this message]
|