As of late I have been finding myself using an oop approach rather than a
procedural one. But, it usually consists of a couple base classes and 1
created specifically for a site. I am currently working on 1 that will
basically be used to create divs (or spans) and the styles used with them
for use in creating cms's. As of now, it is a single class that sets css
properties. I just trying to figure out if I should further break down and
create separate classes for each type of property .. i.e. font, border,
margin .. etc.
Here is some example code:
$mod = new Module("Test"); // constructor setting name and Id attributes
$mod -> setBorderWidth( 1);
$mod -> setBorderColor( "#336633");
$mod -> setSize(300, 200);
$mod -> setPosition(50, 50);
$mod -> setFontColor("# 000000");
$mod -> setVisibility(" visible");
$mod -> render("HELLO") ;//creates the opening div (or span) tag and places
the function's argument between that and a closing tag
just trying to get a couple of opinions
--
Chris Mosser
procedural one. But, it usually consists of a couple base classes and 1
created specifically for a site. I am currently working on 1 that will
basically be used to create divs (or spans) and the styles used with them
for use in creating cms's. As of now, it is a single class that sets css
properties. I just trying to figure out if I should further break down and
create separate classes for each type of property .. i.e. font, border,
margin .. etc.
Here is some example code:
$mod = new Module("Test"); // constructor setting name and Id attributes
$mod -> setBorderWidth( 1);
$mod -> setBorderColor( "#336633");
$mod -> setSize(300, 200);
$mod -> setPosition(50, 50);
$mod -> setFontColor("# 000000");
$mod -> setVisibility(" visible");
$mod -> render("HELLO") ;//creates the opening div (or span) tag and places
the function's argument between that and a closing tag
just trying to get a couple of opinions
--
Chris Mosser
Comment