Re: HTML_Div Announcement

From: Date: Sun, 31 Aug 2003 04:08:24 +0000
Subject: Re: HTML_Div Announcement
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20911@lists.php.net to get a copy of this message
That is understandable. Div tags are not difficult to write. Why would I need a class? The reason I created the class is because I moved from doing page layouts with tables to doing layouts with divs. I liked the OO approach that was possible when developing with the HTML_Table package and wished for a div class with the same standard attribute setting and nested element tracking. Also, it came to the point where I was hand-coding a whole lotta of divs (repetetive work), so the next logical step is to put the div coding work into a function. Then when I was developing reusable components using divs I found that it would be nice to make the components have a base class to extend from that managed the div coding details so I can focus on my component specifics. A logical progression I think. So basically if you use a lot of divs (some do, some don't) it cuts down on the need for repetitive coding. If you were to use HTML_Page it seems messier to create an html string variable for each div and then each variable to the page content than to just have a div object than you can easy add content to and then plug into HTML_Page. I guess I'm just a stickler for that kinda thing so it may be that this component appears more useful to me than it would for others.It is small and can seem insignificant, but used effectively it can cut down on repetitive work and make code that generates html output more readable to fellow coders. Hope I didn't make my idea seem more foggy while trying to make it more clear :) --Mike "Stefan Neufeind" <stefan@neufeind.net> wrote in message news:3F51723F.23617.524FA0@localhost... > On 30 Aug 2003 at 17:25, mike@nu-designs.com wrote: > > > Not sure what format is expected in these announcements, > > in short I would like to add a Div package into the HTML category. The > > HTML_Div class extends HTML_Common and tracks nested divs (and adjusts > > code indenting accordingly) similar to the way HTML_Table does. The > > point of this package is to provide an OO interface to the Div > > element, making it easier for developers to use divs w/ css for page > > layout, as an alternative to using tables. Let me know if I need to > > provide more detail. > > Hmm, I yet don't see the practical use / need for some "small" thing > like this. Could you outline this point a bit further? > > Stefan

« previous php.pear.dev (#20911) next »