PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > Re: [PHP] What's wrong the __autoload()?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Re: [PHP] What's wrong the __autoload()?

Réponse
 
LinkBack Outils de la discussion
Vieux 12/03/2008, 18h31   #1
Wolf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] What's wrong the __autoload()?


---- Richard Heyes <richardh@phpguru.org> wrote:
> Greg Donald wrote:
> > On 3/12/08, Richard Heyes <richardh@phpguru.org> wrote:
> >> That's not quite the situation. Finding good developers isn't easy, so
> >> lots of companies will go for "acceptable" ones, who are less likely to
> >> know of __autoloads existence. Hence, using __autoload is unwise.

> >
> > A lesser developer should be paid less and should be expected to
> > produce less but he should not in any way be allowed to refrain from
> > learning.

>
> I agree. But having worked in the (then) fast paced environment of
> online DVD rental, time was not available.


Learning always has to happen, even if you don't think it is... Some are just slower then others.

> > How long does it take to understand __autoload() anyway? 5-10
> > minutes?

>
> I would say as long as it takes to read the manual page, which isn't
> that long at all.


And you have to couple in with that the person's mental capacity for what they are trying to learn, their background, and if they have any other knowledge of the subject.

> > You're
> > gonna restrict the entire development team from using a given feature
> > just because you don't want to invest 20 minutes in getting your
> > newbie developer up to spead? That's pure idiocy.

>
> No it's not. It's not like require_once() is a hassle to type/use
> anyhow. Things like editor macros and templates out enormously and
> by using them over __auto load you (a business) could save yourself a
> lot of time and hence money.


I actually prefer to use a site prepend and append, then in the prepend file is where I throw all my requires and such. pretty much takes care of any learning curve since with the prepended file doing the heavy lifting.

Wolf
  Réponse avec citation
Vieux 12/03/2008, 19h21   #2
Stut
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] What's wrong the __autoload()?

On 12 Mar 2008, at 17:31, Wolf wrote:
> ---- Richard Heyes <richardh@phpguru.org> wrote:
>> Greg Donald wrote:
>>> You're
>>> gonna restrict the entire development team from using a given
>>> feature
>>> just because you don't want to invest 20 minutes in getting your
>>> newbie developer up to spead? That's pure idiocy.

>>
>> No it's not. It's not like require_once() is a hassle to type/use
>> anyhow. Things like editor macros and templates out enormously
>> and
>> by using them over __auto load you (a business) could save yourself a
>> lot of time and hence money.

>
> I actually prefer to use a site prepend and append, then in the
> prepend file is where I throw all my requires and such. pretty much
> takes care of any learning curve since with the prepended file doing
> the heavy lifting.


But by doing so you're including a lot of code you almost certainly
don't use on every page. That can pointlessly consume resources on a
busy server.

I use __autoload (and for new projects the SPL version) because I know
that anyone who can't "get it" within 5 minutes is not someone I want
to work with.

Not using language features because some developers might not know
about it is going to restrict you to the sort of instruction set you
get in Assembler. I've been working with PHP for a very long time and
I certainly don't claim to know everything about it or about every
feature it has. Restrict your code in that way and you'll create a
slow unmaintainable mess.

IMHO.

-Stut

--
http://stut.net/
  Réponse avec citation
Vieux 13/03/2008, 05h28   #3
Wolf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] What's wrong the __autoload()?

Stut wrote:
> On 12 Mar 2008, at 17:31, Wolf wrote:
>> ---- Richard Heyes <richardh@phpguru.org> wrote:
>>> Greg Donald wrote:
>>>> You're
>>>> gonna restrict the entire development team from using a given feature
>>>> just because you don't want to invest 20 minutes in getting your
>>>> newbie developer up to spead? That's pure idiocy.
>>>
>>> No it's not. It's not like require_once() is a hassle to type/use
>>> anyhow. Things like editor macros and templates out enormously and
>>> by using them over __auto load you (a business) could save yourself a
>>> lot of time and hence money.

>>
>> I actually prefer to use a site prepend and append, then in the
>> prepend file is where I throw all my requires and such. pretty much
>> takes care of any learning curve since with the prepended file doing
>> the heavy lifting.

>
> But by doing so you're including a lot of code you almost certainly
> don't use on every page. That can pointlessly consume resources on a
> busy server.

Actually, I do use it on every page, as it handles all the user
authentication checks.

> I use __autoload (and for new projects the SPL version) because I know
> that anyone who can't "get it" within 5 minutes is not someone I want to
> work with.

I gotta agree with you there, I don't limit things because someone can't
"get it" within a reasonable amount of time.

> Not using language features because some developers might not know about
> it is going to restrict you to the sort of instruction set you get in
> Assembler. I've been working with PHP for a very long time and I
> certainly don't claim to know everything about it or about every feature
> it has. Restrict your code in that way and you'll create a slow
> unmaintainable mess.


I hate unmaintanable code, it gets REALLY difficult to handle. I go
through and re-write my old code as I learn more new "tricks" with the
newer versions of PHP. After 7 years I am still learning new things
with it.

Wolf

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h26.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12698 seconds with 11 queries