> As for (1) even in my pre-OO days I was used to using a single generic
> for all database access. The only time that more than one DAO existed
> for a different DBMS engine. This is why I have one DAO class for MySQL,
> for PostgreSQL and another for Oracle. If you are incapable of writing
> single generic DAO then it just shows that you still have a lot to
> For an idea on how this works take a look at
I'm absolutly sure that I have a lot to learn. Really a lot. :-)
I have post some days ago, a way for using a generic CRUD class and DAO, but
I get no replys so I wrongly suppose that my question was a nonsense
question, and that CRUD and DAO would be a nonsense.
> As for (2) it should be obvious that pagination is not an entity in its
> right that has its own properties and methods, it is merely a function
> can be performed on any entity within the system.
> It should also be
> that the requirements of pagination cannot be satisfied in a single
> class as
> some of the processing has to be handled in the presentation (UI) layer
> while the remainder is handled in the data access layer.
That's why I was thinking on using a Decorator Object on the Pagination
Class (that will retrieve DAO values to operate).
> layer needs a means to submit a request for a particular page number as
> as the page size (rows per page). These two values are sent to the DAO
> then translates them into values for LIMIT and OFFSET. After the DAO
> issued the sql SELECT statement it needs to return two values - the
> page number and the last available page number. The presentation layer
> needs a mechanism to display these two values. This is explained in
Thanks for explain the workflow! I will read.
> If you still don't see how this works then you can run my sample
> at http://www.tonymarston.net/php-mysql/sample-application.html You can
> download the code so that you can step through it with your debugger.
I haven't learn how to use a debugger yet. And I'm sure it would help me a
lot on understanding some data workflow...
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php