Trying to catch up
| From: | Wolfram Kriesing | Date: | Sat, 14 Oct 2000 12:11:11 +0000 |
| Subject: | Trying to catch up | ||
| Groups: | php.pear | ||
| Request: | Send a blank email to php-pear+get-370@lists.php.net to get a copy of this message | ||
I am trying to catch up with all the existing PEAR stuff and with this
mailing list too,
because i also want to distribute to the PEAR classes
During my research i came across the last mails about the Date_calendar
class and i also
downloaded the HTML_Forms class and if i look just through the phpdoc of
those
two classes already the used naming conventions are different
one uses "method_name_name" and the other uses studlyCaps, as defined in
http://pear.php.net/doc/pear.html:
"Methods should be named with initial lower-case studlycaps like this:
myFunction(). "
Are the current developments still far from what the final result will
be?
Or is this mix going to last?
Should not first be discussed what class-groups (like in Java - util,
lang, system, ...) are needed
how they are named, in which subdirectory they go and what their basic
functionality
should be - before the work gets done.
I also see the problem that many people are developing classes which are
very useful
to a minority or which are so special that others will rewrite their own
because they dont
understand it. Sorry to say but functions like " first_monday_of_month "
scare me.
How do i go about getting dynamically the Xth monday of a month, when i
have a
function called "first_..." or "second_..." why are those not
parameters....
Do more than 60 methods in one class not already qualifiy for a
subclass?
It seems that i am really only shooting agains Date_calendar here, but i
am only trying
give some - hopefully - helpful input. And Date_calendar was just the
lastest
class i came across.
Here some general PEAR questions:
1. Why not stick to a class strucutre as there are others (approved) for
other programming
languages, like Java? There will be a lot of advantages, like easier
changing from Java to PHP,
and portability etc.
2. Is hungarian notation not a topic to discuss in PEAR? I find it very
helpful - when u know
the name of the function u know what it is returning and you dont need
to switch
forward and back through source code and documentation ... and all the
known
advantages.
3. Is for PEAR also meant to write wrapper classes for all the non-OO
PHP functions,
like the array functions? I am asking that because since PHP4 there are
many new array
functions and the naming is not really "one style", some are called
array_xxx and others
dont have this prefix.
I hope all this is seen as constructive input ... as which it is meant
Wolfram Kriesing