RE: [PHP] PHP is a Bloated Kludge, discuss!
| From: | Maxim Maletsky \(PHPBeginner.com\) | Date: | Fri, 05 Oct 2001 00:43:57 +0000 |
| Subject: | RE: [PHP] PHP is a Bloated Kludge, discuss! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69999@lists.php.net to get a copy of this message | ||
> (From behind filing cabinet where I am ducking preparing for flames).
>
> Is it just me or is there anyone else that thinks PHP suffers
> from not being modular.
It is just you and some other people similar to you. Thought this
question was up for a while :-)
> PHP on the other hand seems to load in ALL the code that MAY
> be run. i.e. an include brings things in which are inside an
> if, even if the if equates to false.
Is it really true? I always though it wasn't.
AFAIN: Long time ago require() was working this way. But now, require()
and include() are the same. Loaded only when needed.
> This means that the language is not extendible in the way
> others are. If you do write a function you wish to include
> in 'only the pages you wish to use' you have to first
> include it, then call it.
Well, it has it's pluses and it's minuses, it is extendable, though OOD
works a little different in it. But hey, it compiles on the fly,
remember? That's a plus for developers, especially newbies.
> This has also meant that things like spell checking functions
> are built into the core module rather than called in as or
> when they are needed.
>
> Then there is the way database connectivity is handled.
>
> There are a load of functions (again in the core language)
> with there NAMES containing the name of the database you are
> connecting to.
OK, true. But, this is necessary if you want PHP to automatically
connect to different DBs.
A plus to portability and a minus to... (to what?)
> For example all MySQL functions are mysql_something and I
> guess all oracle ones are oracle_something. This would only
> be a minor inconvenience because wrapper functions can be
> written but from what I can gather different databases have
> different functionality available.
That is why Sascha Sunmann wrote PHPLIB and (Stig?) Bakken created PEAR
(released with every PHP distribution, btw - just waiting for you to use
it)
phplib.netuse.de
php.net/pear
> I know this is partly because different databases have
> different functionality. what I would expect to see is a
> load of generic function which attempt to provide same
> functionality where it is available or implement some of the
> functionality themselves. Obviously for some of the less
> sophisticated databases these functions would have to do more
> work and maybe some functionality wouldn't be available in
> certain databases (but only the things like stored procedures).
>
> Got a nast feeling that ASP (spit) does something like this.
>
> You may cry, it cant be done. however I remember a
> connectivity product that came from Borland (this was back in
> the Paradox Days) which did just this, it even had
> transaction handling built into this connectivity layer for DBase!
>
> Anyway I am playing Devils Advocate.
We all play it once at least ;-)
> What I do like about PHP is how quickly it can be learnt and
> how quick you can build apps with it. Maybe this is at the
> expense of elegance. Maybe PHP5 will address these issues -;)
Isn't it the greatest thing of it?
Just think of this - where else you can become a programmer in a short
time?
Compliling/executing/libraring/connecting just to make a simple
guestbook for your site.
> And there are certainly some very busy PHP sites, you should
> see the traffic levels on indymedia.org during
> anti-capitalist demonstrations and I am sure during the New
> York attacks they went belistic.
Search archives for "php sites" or something like this. The topic comes
up every week or so :-)
Maxim Maletsky
www.PHPBeginner.com