Re: table and class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alain Roger wrote:
Hi,

in my web application (as quite all web applications) i have a lot of
tables. I mean by table the <table> tag with for sure some data displayed in
it from SQL requests.
To not have to write the whole code every time i was thinking to make a
class that :
- will manage the whole design (color, images, width, height of cells,...)
- will manage the paging (to limit the data transfer from DB server to
client browser)
- will manage the sorting and search (classic and advanced) of data based on
some online built query (user should be able to do something like field1 =
value 1 OR field 1 = value2 AND field4 = "a")

therefore i would like to know if to encapsulate everything in PHP classes
(integrating javascript and css) will be the best approach or not ?
because i would like to keep it as simple as possible in order to
redistribute later this package.

or should i mix javascript "classes" and PHP classes ?

thx.


I'd suggest two classes; one(php) which controls the data and outputting it as a table, the other (clientside) which controls the display of the table. Everything directly relating to CSS should be in CSS with an optional 3rd php class/app for generating or controlling the css.

Maybe something like YUI Tables would help you in your quest.

(dare I say it (as always) - Flex 3 is great for this kind of thing..)

Regards

--
nathan ( nathan@xxxxxxxxxxx )
{
  Senior Web Developer
  php + java + flex + xmpp + xml + ecmascript
  web development edinburgh | http://kraya.co.uk/
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux