Re: Beginner Tutorials for using CLASSES in PHP4

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

 



On 10/9/07, Tony Marston <tony@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>
> ""Nathan Nobbe"" <quickshiftin@xxxxxxxxx> wrote in message
> news:7dd2dc0b0710091015g7c29be93h671aa51bb125198e@xxxxxxxxxxxxxxxxx
> > On 10/9/07, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:
> >>
> >> Why would I use an interface? :)
> >
> > because inheritance is not always optimal.
>
> I have never found a prolem when using an interface was the only solution,
> or even ANY kind of solution. The fact that your designs need it speaks
> volumes of the problems with your designs.


im not the one whose been defending my designs  in this conversation; you
are.
there are plenty of situations where the interface is the more elegant
approach,
thats why its here; and thats why it was added in php5.

>
> There's your problem, then. You are wasting your time trying to implement
> fancy design patterns just because design patterns are supposed to be
> "cool".


i dont recall reading any suggestions to use design patterns because they
are cool.
infact the advice ive read is to only use them when they make sense.

Loader class, Controller Base class, Front Controller - I have none
> of that crap in my code, so I don't encounter the problems you have. When
> I
> see code like "$this->load->library('email') " I just thank my lucky stars
> that I don't have to maintain it. I think some serious refactoring is long
> overdue.


id have to say code igniter is quite a bit more popular than radicore.
maybe youre the one who has some refactoring to do.

Perhaps you are trying to implement something from another language and
> expecting PHP to be just like that other language, which is always a
> stupid
> mistake. PHP is different, therefore the solution will be different. I
> suggest you learn how PHP works and design accordingly, and stop trying to
> force it into emulating another language.


well php has certainly gotten its influence from a number of other
languages.
where do you think the additional features in php5 got their inspiration
from?

btw;
heres the definition of implement from dictionary.com

im·ple·ment
<https://secure.reference.com/premium/login.html?rd=2&u=http%3A%2F%2Fdictionary.reference.com%2Fbrowse%2Fimplementation>
  /n. ˈɪmpləmənt; v. ˈɪmpləˌmɛnt, -mənt/ Pronunciation Key - Show Spelled
Pronunciation[n. *im*-pl*uh*-m*uh*nt; v. *im*-pl*uh*-ment, -m*uh*nt]
Pronunciation
Key - Show IPA Pronunciation –noun 1.any article used in some activity, esp.
an instrument, tool, or utensil: agricultural implements.
notice the use of article; ie data; ie; you are wrong about member variables
not being part of a classes implementation.
if a variable local to a function can be considered part of its
implementation; then a variable local to a class can be
considered part of its implementation; its that simple.


-nathan

[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