im looking for opinions on two OOP related design issues for code im
targeting to PHP5.

(1) im writing (actually porting) a DateTime class which matches the
functionality of the Java Date class. it actually does much more, and that's
the issue. in looking at the Javadocs reference page for Date, a lot of what
i have scheduled for my class has been deprecated in Date for various
reasons. in specific, display formatting, parsing and interval math are
moved into other classes.
    what do you think about having this functionality in one class or
splitting. i agree somewhat in a separation of concerns, but one reason i
tend not to like Java for web development is the fact that there can be too
many classes involved in getting basic things accomplished.

(2) im working on a database access abstraction, again inspired by Java and
JDBC (MySQL driver is written and works, BTW). in Java you have the
Resultset.getXXX methods which gets the value of a given column as a
particular type. Java of course is strongly typed, whereas PHP is not. Is it
useful to implement the getXXX methods natively. i lean toward it primarily
because 1) folks coming from Java will be right at home 2) sometimes you
need to enforce a particular return type coming from a column 3) Metabase
does it for portability, and although it can be done in PHP, its more
efficient to do it in the extension. On the downside there is the issue of
bloat.


BTW : is there sufficient interest in starting a new newsgroup to discuss
PHP5 ?

l0t3k



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to