Re: Trying to catch up

From: Date: Sat, 14 Oct 2000 21:08:22 +0000
Subject: Re: Trying to catch up
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-372@lists.php.net to get a copy of this message
Hi Wolfram, This is exactly the reason why I submitted Date_Calendar (now called Date_Calc) to PEAR, so these types of things can be discussed and fixed. I have no problem with changing things and cleaning up to comply with PEAR documentation, code styles, etc. As a matter of fact, all those functions like first_sunday_of_month have been removed since they were only calling the N_weekday_of_month with static values (I thought this would be nice for code legibility, but it seems to just clutter the class). As for first_day_of_month(), how about last_day_of_month()? You cannot specify a particular day since you aren't sure of how many days may be in the month. first_day_of_month() merely complimented this function, and it comes in handy when drawing calendars. I suppose I could make X_day_of_month(), then have first_day_of_month() call this function with the static value of 1. Thanks for the input, this is the kind of thing that really helps fine-tune the class. Monte Wolfram Kriesing wrote: > > 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 > > -- > PHP Extension and Add-on Repository (PEAR) mailing list. > Documentation can be found at http://pear.php.net/doc/pear.html > To unsubscribe, e-mail: php-pear-unsubscribe@lists.php.net from the > mail address you subscribed with. -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/

« previous php.pear (#372) next »