473,388 Members | 1,340 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

What PHP represents

What PHP Represents

There is no shortage of complaints one could make about php as a
language, and although the list does shrink with each release, some of
them are inherent to the origins and development process of this, the
most popular of the web-based, server-side, glue-languages.

That said, most descriptions of what is good about php, fail to do it
justice. Although they are generally enthusiastic and sometimes
fanatical, no amount of religious zeal about its coolness or easiness
can make up for missing the main point. Out of the theoretical realm of
language design and into the economic reality, php is the most powerful
(programming) language so far created.

This would not be true if it didn't sit on top of powerful tools
written in other languages, it wouldn't be true if it wasn't so easy to
integrate it with things like html, apache and mysql, but it does and
it is; and this combination provides the most efficient way to achieve
the main economic purpose that our society has for computers. It's the
same purpose that the ancient sumerians had for clay tablets:
recording, storing and accessing business information. The knock-on
benefits of this for all other kinds of information storage and
communication are obvious, but it's a computer's role as a super
filing-cabinet that puts bread on the table.

Stock, customers, suppliers, workers, money, tools. Keep track of these
and you can keep track of your business, keep track of your business
and just maybe you can make some money.

Even running on a local server, a web application might be slower than
a properly designed thick-client program. It's almost certainly going
to be less pretty, but since when is that the point? If you want your
information to be accessible and your interface to be customisable and
your programming tools to be free, then you can't beat php; or more
broadly, you can't beat the LAMP platform of which php is God.

This "superglue" language is more popular on the www than any other,
but it's even more useful in a local environment, serving web
applications. It's not the best for every purpose, of course, but it
represents for economic activity what television represents for
propaganda. Nothing else really comes close.

Anyway, that's how I see it (now I must get back to my stock-control
system)

Jul 17 '05 #1
23 2772

"darwinist" <da*******@gmail.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
What PHP Represents
<snip>
Nothing else really comes close.

I definitely took some liberty with my <snip> of your post so it may be
somewhat out of context. I looked at PHP several years ago and didn't care
for it much. It most likely evolved since then but I preferred Java/jsp then
and still prefer Java now for web-pages. But given the popularity of PHP
there must be something to it or everyone wouldn't be using it. ( Errr... I
think I just made the Windows argument.)

Jul 17 '05 #2
On Tue, 21 Jun 2005 22:46:25 -0400, Larry Qualig wrote:
"darwinist" <da*******@gmail.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
What PHP Represents
<snip>
Nothing else really comes close.

I definitely took some liberty with my <snip> of your post so it may be
somewhat out of context. I looked at PHP several years ago and didn't care
for it much. It most likely evolved since then but I preferred Java/jsp then
and still prefer Java now for web-pages. But given the popularity of PHP
there must be something to it or everyone wouldn't be using it. ( Errr... I
think I just made the Windows argument.)


PHP, while popwerful, does suffer from some serious and often cripling
flaws. It really takes some of the worst features of almost very lanugage
it steals ideas from.

For example, it's loose typing and declaration system as well as its almost
complete lack of scoping contexts make it much more difficult to write
bug-free code than other scripting languages that provide these features.
Hell, even old style VB had Option Explicit to require the declaration of
variables prior to their use.

While it does improve every version, it seems to take a significant amount
of time for the majority of distro's to upgrade, much less the users. The
latest version of SuSE still ships 4.x, for instance (and no way to easily
upgrade short of a tarball or seeking out a third party RPM, and given how
tightly SuSE has integrated apache and php etal into YaST that means some
significant surgery to decouple it).

There's no doubt that PHP is a powerful language, and the issues with it
are not insurmountable. It's much like the Star Wars universe though. Not
a single hand rail in sight, anywhere.
Jul 17 '05 #3

"Erik Funkenbusch" <er**@despam-funkenbusch.com> wrote in message
news:sa**************@funkenbusch.com...
On Tue, 21 Jun 2005 22:46:25 -0400, Larry Qualig wrote:

It's much like the Star Wars universe though.
Not a single hand rail in sight, anywhere.

Jul 17 '05 #4

"Erik Funkenbusch" <er**@despam-funkenbusch.com> wrote in message
news:sa**************@funkenbusch.com...
On Tue, 21 Jun 2005 22:46:25 -0400, Larry Qualig wrote:

It's much like the Star Wars universe though.
Not a single hand rail in sight, anywhere.

I understand exactly what you mean. It's obvious that in the future OSHA
will cease to exist.


Jul 17 '05 #5
Erik Funkenbusch wrote:

[snip]
PHP, while popwerful, does suffer from some serious and often cripling
flaws. It really takes some of the worst features of almost very
lanugage it steals ideas from.
I won't disagree there are some/many flaws in PHP. In particular is the
lack of consistancy of function naming and order of parameters to a
function, and the lack of namespacing which they seem determined to not
implement ever.
For example, it's loose typing and declaration system as well as its
almost complete lack of scoping contexts make it much more difficult
to write bug-free code than other scripting languages that provide
these features. Hell, even old style VB had Option Explicit to require
the declaration of variables prior to their use.
VB and PHP and similar in this respect. By default neither will report
errors when trying to use an undeclared variable. You can use the
error_reporting() function in PHP in the same way as Option Explicit to
at least show error messages when attempting to use an undefined
variabled.
While it does improve every version, it seems to take a significant
amount
of time for the majority of distro's to upgrade, much less the users.
The latest version of SuSE still ships 4.x, for instance (and no way
to easily upgrade short of a tarball or seeking out a third party RPM,
and given how tightly SuSE has integrated apache and php etal into
YaST that means some significant surgery to decouple it).


Many people still consider it to be too soon to start using the 5.x
branch hence it still not being the default version in new releases of
SUSE and other Linux distros.

[snip]

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
Jul 17 '05 #6
On Tue, 21 Jun 2005 23:31:04 -0400, Larry Qualig wrote:
"Erik Funkenbusch" <er**@despam-funkenbusch.com> wrote in message
news:sa**************@funkenbusch.com...
On Tue, 21 Jun 2005 22:46:25 -0400, Larry Qualig wrote:

It's much like the Star Wars universe though.
Not a single hand rail in sight, anywhere.

I understand exactly what you mean. It's obvious that in the future OSHA
will cease to exist.


Lol, except it was in the past, before OSHA existed.
Jul 17 '05 #7
> There is no shortage of complaints one could make about php as a
language, and although the list does shrink with each release, some of
them are inherent to the origins and development process of this, the
most popular of the web-based, server-side, glue-languages.


Seriously, what the hell is the point of your post?

Instead of posting your own supposition, take a look at the posts in
this newsgroup. How many of them are complaints about PHP as a
language? One in a hundred? Five hundred?

Jul 17 '05 #8
Larry Qualig wrote:
"darwinist" <da*******@gmail.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
What PHP Represents
<snip>
Nothing else really comes close.

I definitely took some liberty with my <snip> of your post so it may be
somewhat out of context. I looked at PHP several years ago and didn't care
for it much. It most likely evolved since then but I preferred Java/jsp then
and still prefer Java now for web-pages. But given the popularity of PHP
there must be something to it or everyone wouldn't be using it. ( Errr... I
think I just made the Windows argument.)


To fill in the context:
Databases for tracking business resources are just glorified
clay-tablets, but in terms of information technology, that's what
economies need above all else.
PHP is the most powerful language for making such things.

To get into a language war for the fun of it:

Java, from a consistency and design point of view, is a far superior
language, but it's too clean for a glue language (in my opinion).

Although I must admit more ignorance of java than you do of php; does
java let me do this:
<a href="<?php print $TargetURL; ?>">Click Here</a>

or this:
print "hello $Name you should order some {$ClientArray['Popular
Product']}'s because they are awesome. Click $ButtonCode if you want to
be awesome.";

Anyway, as I argue in the OP, the strength of php is in its freedom
(freedom in that the language imposes no architecture on you, freedom
in obtaining the development tools, and freedom in modifying them if
you want), what it can do with just the standard library, and how
efficiently - in terms of amount of code needed - it can do it.

It's certainly not that it's a particularly well-designed language. In
fact it could be argued that php is not even a poorly designed
language, it simply was not designed. It started, and has developed,
based on what various people (Rasmus Lerdorf being the first) wanted to
do with their web sites. The connection between php and web-based
productivity is just that direct.

(That said I would probably switch to python tomorrow if it was equally
at home in a web environment and if you could do all the cool embedding
stuff with it.)

Trying to make php a "proper" scripting language was always an
afterthought. Although it's this afterthought - for example the zend
engine, and more recently proper object support - that has made it such
a viable option for commercial development.

Now it's got the snowball effect of everyone (ie your average web
developer) uses it so everyone (ie your average web hosting company)
supports it, so therefore, everyone uses it because everyone supports
it. This same popularity factor means the standard library is fat, help
is easy to find, and the amount of freely available libraries that you
can find on various third-party websites and start using with one
require_once() statement, is really quite impressive.

It's messy but it's rich and powerful. You could say its strengths are
analogous to the those of the highly promiscuous language we are using
to communicate at the moment (english).

Jul 17 '05 #9
darwinist wrote:
To fill in the context:
Databases for tracking business resources are just glorified
clay-tablets, but in terms of information technology, that's what
economies need above all else.
PHP is the most powerful language for making such things.


There is a purpose of all things, but discussion of benefits/flows
always brings to mind this good old Dilbert's "Look, actual code"
cartoon (thanks google>
http://aces.tabulas.com/ubill/big/di...ctual_code.jpg)

So, hence php.

/m
Jul 17 '05 #10
On 21 Jun 2005 22:34:50 -0700, darwinist wrote:
Although I must admit more ignorance of java than you do of php; does
java let me do this:
<a href="<?php print $TargetURL; ?>">Click Here</a>
Yes, of course. That's pretty basic stuff for any server side language.
or this:
print "hello $Name you should order some {$ClientArray['Popular
Product']}'s because they are awesome. Click $ButtonCode if you want to
be awesome.";
PHP does make string substitution much nicer and easier to read.
Anyway, as I argue in the OP, the strength of php is in its freedom
(freedom in that the language imposes no architecture on you, freedom
in obtaining the development tools, and freedom in modifying them if
you want), what it can do with just the standard library, and how
efficiently - in terms of amount of code needed - it can do it.
While it's true that PHP imposes no real architecture on you, also doesn't
provide one or encourage one. This often leads to architecture-less code
(or the inverse, over-architected code).

For example, consider the relatively common case of a "wizard" like
interface where you move from page to page sequentially but only after each
page has been validated. There are so many different ways to do this, and
most of them will give you enough rope to shoot yourself in the foot
(especially when you consider issues like double transactions from refresh
or back-button use, and the like).

Now, you can argue that products like Zend are there to fill this
"architecture" gap, but for those not willing to invest in something like
Zend, you end up looking through a LOT of bad sample code and experimenting
with trial and error, which is frankly a piss poor way to design an
application.
It's certainly not that it's a particularly well-designed language.
You're good at understatements, i see.
(That said I would probably switch to python tomorrow if it was equally
at home in a web environment and if you could do all the cool embedding
stuff with it.)
You might be more interested in using Mono with ASP.NET
http://www.mono-project.com/ASP.NET
Trying to make php a "proper" scripting language was always an
afterthought. Although it's this afterthought - for example the zend
engine, and more recently proper object support - that has made it such
a viable option for commercial development.
Actually, it makes it a pretty poor choice for commercial development, or
at least large sclae commercial development. They tend to break a lot of
things from version to version. This makes it much harder to make your app
run on all versions, or even keep up with the latest version.
Now it's got the snowball effect of everyone (ie your average web
developer) uses it so everyone (ie your average web hosting company)
supports it, so therefore, everyone uses it because everyone supports
it. This same popularity factor means the standard library is fat, help
is easy to find, and the amount of freely available libraries that you
can find on various third-party websites and start using with one
require_once() statement, is really quite impressive.
I would be a lot happier with PHP if they offered more instruction to new
developers, defined best practices, and didn't have 30 ways to do the same
thing.
It's messy but it's rich and powerful. You could say its strengths are
analogous to the those of the highly promiscuous language we are using
to communicate at the moment (english).


Perhaps, but then the human inference engine works a lot better than the
PHP one.
Jul 17 '05 #11
Marcin Dobrucki wrote:
There is a purpose of all things, but discussion of benefits/flows
always brings to mind this good old Dilbert's "Look, actual code"
cartoon (thanks google>
http://aces.tabulas.com/ubill/big/di...ctual_code.jpg)

So, hence php.

/m


LOL, That Dilbert rocks!
:-)
:-)
:-)

Regards,
Erwin Moller
Jul 17 '05 #12
Erik Funkenbusch wrote:
On 21 Jun 2005 22:34:50 -0700, darwinist wrote: [...] While it's true that PHP imposes no real architecture on you, also doesn't
provide one or encourage one. This often leads to architecture-less code
(or the inverse, over-architected code).
Yes, one could say it fails to provide structure and allows things to
be done that should never be done (I know I've falled into both traps
you mention). One might also say there is no substitute for good
programming practices, and php doesn't try to provide one. No prizes
for guessing which philosophy I'm leaning to at this point in time.
For example, consider the relatively common case of a "wizard" like
interface where you move from page to page sequentially but only after each
page has been validated. There are so many different ways to do this, and
most of them will give you enough rope to shoot yourself in the foot
(especially when you consider issues like double transactions from refresh
or back-button use, and the like).
Mixed metaphors aside, I agree that php gives you "too much" freedom.
On the other hand, the more I learn to deal with this freedom, the more
I resent the imposed structure of other platforms and languages that
I've used.
Now, you can argue that products like Zend are there to fill this
"architecture" gap, but for those not willing to invest in something like
Zend, you end up looking through a LOT of bad sample code and experimenting
with trial and error, which is frankly a piss poor way to design an
application.


Actually I've been surprised, when forced to create a new architecture
from scratch (for the reasons you mention), how quickly and easily it
can be achieved if you tailor it to the specific application and
clarify exactly what you will need instead of trying to include all the
things you might desire in the future.

As long as you don't try to think of the framework as fixed or
complete, and let it evolve (sensibly) with the application, it seems
to be a lot quicker than trying to fit everything within a design
you've created previously, or within a design that someone else has
created.

But that's just my experience to date, I've still got a lot to learn.
It's certainly not that it's a particularly well-designed language.


You're good at understatements, i see.
(That said I would probably switch to python tomorrow if it was equally
at home in a web environment and if you could do all the cool embedding
stuff with it.)


You might be more interested in using Mono with ASP.NET
http://www.mono-project.com/ASP.NET


Thanks for the tip.
Trying to make php a "proper" scripting language was always an
afterthought. Although it's this afterthought - for example the zend
engine, and more recently proper object support - that has made it such
a viable option for commercial development.


Actually, it makes it a pretty poor choice for commercial development, or
at least large sclae commercial development. They tend to break a lot of
things from version to version. This makes it much harder to make your app
run on all versions, or even keep up with the latest version.


The fact that it (trying to make it a proper scripting language) is an
afterthought, is not what makes it a viable option. Quite the opposite,
as you describe. But the fact that it's thought of at all is one of the
reasons it has moved from a hobby language to the most popular on the
web, in huge organisations as well as tiny ones.

Given the cost of the product, I don't think they add new things that
break old things just so you'll buy the latest version, it's more a
matter of ironing out the bumps which, to put on my rose coloured
glasses for a second, should happen less as the language matures.

A lot of times old things are kept for backwards comptability if they
can be, and one might argue it's better to break something which should
be broken and get it over with, rather than wait till even more people
are using and relying on it. In any case I agree it's a problem.
Now it's got the snowball effect of everyone (ie your average web
developer) uses it so everyone (ie your average web hosting company)
supports it, so therefore, everyone uses it because everyone supports
it. This same popularity factor means the standard library is fat, help
is easy to find, and the amount of freely available libraries that you
can find on various third-party websites and start using with one
require_once() statement, is really quite impressive.


I would be a lot happier with PHP if they offered more instruction to new
developers, defined best practices, and didn't have 30 ways to do the same
thing.


I have this problem as well, and so I maintain a list of my own
best-practices which I refine or add to from time to time. Once it had
grown to about a dozen basic principles, I realised that although I was
forced to think about these things because of php, I would have been
far more productive if I had followed these rules for all languages
I've used in the past. The one thing I never expected PHP to teach me
as a programmer is discipline.
It's messy but it's rich and powerful. You could say its strengths are
analogous to the those of the highly promiscuous language we are using
to communicate at the moment (english).


Perhaps, but then the human inference engine works a lot better than the
PHP one.


Jul 17 '05 #13
Chris Hope wrote:
Erik Funkenbusch wrote:

[snip]
PHP, while popwerful, does suffer from some serious and often cripling
flaws. It really takes some of the worst features of almost very
lanugage it steals ideas from.
I won't disagree there are some/many flaws in PHP. In particular is the
lack of consistancy of function naming and order of parameters to a
function, and the lack of namespacing which they seem determined to not
implement ever.


I'm not trying to propogate a flame war - I think this kind of debate is
good and educational.

I must disagree though about the aspersions being flung about here. There
was some very well-argued debate regarding typing on the list recently.
Some poeple like strong typing, some like dynamic typing, some liked other
flavours. Most agreed that the approach taken by PHP wasn't instrinsically
flawed in any way - but some felt more at home with other approaches to the
issue.

I think PHP would benefit from changes to the things Chris explicitly
mentions - i.e. case sensitivity in function names and some way of better
managing the namespace. And the change to object references, and the
try...catch construct in PHP 5 is very welcome. But beyond that, I can't
think of anything within PHP which I think is poorly designed - I don't
feel like I'm making a compromise by developing in PHP rather than Perl or
Java or C.

If you think differently tell us why.
They tend to break a lot of
things from version to version. This makes it much harder to make your
app run on all versions, or even keep up with the latest version.
I've already mentioned there are some fundamental things which changed from
4 to 5. But IMHO PHP is a lot more 'stable' in this regard than a lot of
other tools. Admittedly Perl, Java and C have seen little change in recent
times but can the same be said of *anything* out of Redmond? Have you
started migrating to Apache 2 yet? What about Linux - its had 3 different
firewall tools in the last 4 major revisions - and the process and I/O
schedulers keep changing too.

What I keep coming back to is this: PHP doesn't define architecture, it
doesn't define the rules by which you build applications - should it? Even
using a different set of tools, you need to integrate development with
testing. Both unit testing and integration testing (preferably continious
integration). PHP allows these structures to evolve - because I don't think
they are mature yet for any platform.

Consider this example - suppose we have a function like strtok() - i.e.
splits up a string 'subject' using a string 'div'. It doesn't matter if the
typing of the language is strict and static, if it is compiled or
interpreted, the language can't spot the difference between:
my_split(subject, div)
and
my_split(div. subject)
I would be a lot happier with PHP if they offered more instruction to new
developers, defined best practices, and didn't have 30 ways to do the same
thing.


I wouldn't. There are a lot of things that need to be learnt about how to
use PHP but for the PHP developers to take responisibility for this may
lead to the language being restructured to fit in with the 'rules' when the
'rules' themselves may be flawed. I also think PHP has got the balance
right between simplicity and functionality.

I try to stick to the PEAR style guidelines - but mostly I don't use PEAR
classes in my programs. I use PHPDoc and phpunit. But I know why those
tools are important. To say to a new developer - you must write your code
this way, using these tools and practices just creates boundaries to
participation.

C.
Jul 17 '05 #14

"Chung Leong" <ch***********@hotmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...

Seriously, what the hell is the point of your post?

Relax. PHP does run on Linux/Apache so there is a connection. Which is more
that can be said for a lot of other threads.

Instead of posting your own supposition, take a look at the posts in
this newsgroup. How many of them are complaints about PHP as a
language? One in a hundred? Five hundred?


I suggest you re-read the post. The post was praising PHP, not complaining
about it.

Jul 17 '05 #15
On Tue, 21 Jun 2005 19:39:50 -0700, darwinist wrote:
That said, most descriptions of what is good about php, fail to do it
justice. Although they are generally enthusiastic and sometimes fanatical,
no amount of religious zeal about its coolness or easiness can make up for
missing the main point. Out of the theoretical realm of language design
and into the economic reality, php is the most powerful (programming)
language so far created.


I may not be popular saying this, but I don't think php is the best tool
for the job that it is used for.

I would agree that it is easy and fits in well with the html/xslt side of
things. It also seems to be the best available at the moment, which is
likely to be why it's popular.

But I would say that ruby-rails is much closer to how things should be,
even if your not keen on the language itself, the principle is much
closer to being right. The html page or 'view' of an application should be
an object of that application, not a filter page that needs to pass
through a 'find & replace' function. How many filters (or transcribers?)
can be active per html page now? php, java script, css, w3c ....

Ruby-rails nearly goes that way of taking the view away from the main
code, but I feel as if it got nervous of taking it to the final
conclusion, plus of cause they are at the mercy of html itself.

When we have a language for web that truly separates data - application -
view, so separate in fact that the view could even live on the client PC
if we wanted it to, then we can rave about it. At the moment we're still
on the journey.
Jul 17 '05 #16
> How many of them are complaints about PHP as a language? One in a hundred?
Five hundred?


Even fewer than that, and usually a result of faulty code, not faulty PHP...

ECRIA
http://www.ecria.com
Jul 17 '05 #17
Larry Qualig wrote:
"Erik Funkenbusch" <er**@despam-funkenbusch.com> wrote in message
news:sa**************@funkenbusch.com...
On Tue, 21 Jun 2005 22:46:25 -0400, Larry Qualig wrote:

It's much like the Star Wars universe though.
Not a single hand rail in sight, anywhere.


I understand exactly what you mean. It's obvious that in the future OSHA
will cease to exist.


That, probably, would be a bad thing. On the other hand, product
labelling really needs to be changed. Is it really necessary to point
out that a freshly-poured cup of coffee is hot, or that the drain
un-blocking liquid, intended to dissolve organic materials, is not meant
to be consumed? We need to get Darwin back in the driver's seat. :)
Jul 17 '05 #18

"Kelsey Bjarnason" <kb********@gmail.com> wrote in message
news:tCgue.79202$9A2.45597@edtnps89...
Larry Qualig wrote:
"Erik Funkenbusch" <er**@despam-funkenbusch.com> wrote in message
news:sa**************@funkenbusch.com...
On Tue, 21 Jun 2005 22:46:25 -0400, Larry Qualig wrote:

It's much like the Star Wars universe though.
Not a single hand rail in sight, anywhere.

I understand exactly what you mean. It's obvious that in the future OSHA
will cease to exist.


That, probably, would be a bad thing. On the other hand, product
labelling really needs to be changed. Is it really necessary to point out
that a freshly-poured cup of coffee is hot, or that the drain un-blocking
liquid, intended to dissolve organic materials, is not meant to be
consumed?

I'm inclined to say that the "product labeling" issue is more of an issue
with our litigious society. I think that the only reason these crazy labels
exist is to protect the product makers from frivolous law-suits. Some idiot
drinks drain-cleaning fluid and the lawyers go after the manufacturer for
not warning them not to drink it. A friend at work used to have a daily
calendar with a new crazy lawsuit each day. It's insane what people sue over
and win.

The lawyers are able to somehow twist and distort the picture to the point
where these idiots now become the poor innocent victim. To make matters
worse, the brainiacs on the jury award these huge settlements to them.

We need to get Darwin back in the driver's seat. :)


Definitely. A thousand years ago if someone was *that* stupid they would end
up dead and only the smart would survive. Today the idiots are awarded
millions of dollars so they can live the life of luxury and weaken the human
gene-pool with their offspring. (Note.. they usually life this "life of
luxury" for 2-3 years before they squander all their money.)


Jul 17 '05 #19
BearItAll wrote:
On Tue, 21 Jun 2005 19:39:50 -0700, darwinist wrote:
That said, most descriptions of what is good about php, fail to do it
justice. Although they are generally enthusiastic and sometimes fanatical,
no amount of religious zeal about its coolness or easiness can make up for
missing the main point. Out of the theoretical realm of language design
and into the economic reality, php is the most powerful (programming)
language so far created.
I may not be popular saying this, but I don't think php is the best tool
for the job that it is used for.


Not being popular is what saying things on the internet is all about :)
I would agree that it is easy and fits in well with the html/xslt side of
things. It also seems to be the best available at the moment, which is
likely to be why it's popular.
Right there's best in theory and best in practice. They are rarely the
same in virtue of the fact that humans make such limited theories, and
the universe is not impressed.
But I would say that ruby-rails is much closer to how things should be,
even if your not keen on the language itself, the principle is much
closer to being right. The html page or 'view' of an application should be
an object of that application, not a filter page that needs to pass
through a 'find & replace' function. How many filters (or transcribers?)
can be active per html page now? php, java script, css, w3c ....
Lots of things are more how it "should" be, but the question I'm
interested in is how quickly can one produce something that contributes
economically to an organisation (as an information-tracking tool that
is, rather than as a sellable commodity).
Ruby-rails nearly goes that way of taking the view away from the main
code, but I feel as if it got nervous of taking it to the final
conclusion, plus of cause they are at the mercy of html itself.

When we have a language for web that truly separates data - application -
view, so separate in fact that the view could even live on the client PC
if we wanted it to, then we can rave about it. At the moment we're still
on the journey.


I've been hearing more about ruby (and rails) lately, the only bad
thing it's got going against it at the moment is that I've never used
it. What little code I've read however makes it look very neat and
efficient (code-wise). In any case it would stupid for me to suggest
that PHP will never be superceded, and who knows maybe it will be ruby
that does it. Like most languages that are better than php though, it
has to be better *on the web* or else a lot of people will think "why
bother, it's so much easier in php, and anyway it's all the same once
it reaches the browser"

I don't think PHP is necessarily the best for any and every website or
web-application, but I think it's probably the best (all things
considered) for getting something genuinely and concretely useful (e.g.
a customer database, a timesheet, project or stock database) and
getting it quickly. You can (too) easily do it badly, but you can do
anything badly (and ironically it's often much slower if you do).

Jul 17 '05 #20
on June 22 09:08 am Erik Funkenbusch wrote:
Actually, it makes it a pretty poor choice for commercial
development, or at least large sclae commercial development. They
tend to break a lot of things from version to version. This makes it
much harder to make your app run on all versions, or even keep up
with the latest version.


Isn't Ericsson a real commercial company then?

`This project was financed by Ericsson and was developed by the
Broadband Systems Group (GSBL) of the Electronic and Telecommunications
Department of the Universidade de Aveiro.'

`This application was completely developed using the script language
named PHP to interface the Web server with the database server.'

http://www.e-na.net/the_author.html?..._locale=en#3.9
Marc Andreessen
Opsware
Netscape

Andi Gutmans
Zend Technologies

Rod A. Smith
IBM

JP Rangaswami
Investment Bank Dresdner
Kleinwort Wasserstein

Zeev Suraski
Zend Technologies

http://zend.kbconferences.com/
Jul 17 '05 #21
On Wed, 22 Jun 2005 17:30:21 -0700, darwinist wrote:
BearItAll wrote:
On Tue, 21 Jun 2005 19:39:50 -0700, darwinist wrote:
> That said, most descriptions of what is good about php, fail to do it
> justice. Although they are generally enthusiastic and sometimes
> fanatical, no amount of religious zeal about its coolness or easiness
> can make up for missing the main point. Out of the theoretical realm
> of language design and into the economic reality, php is the most
> powerful (programming) language so far created.


I may not be popular saying this, but I don't think php is the best tool
for the job that it is used for.


Not being popular is what saying things on the internet is all about :)
I would agree that it is easy and fits in well with the html/xslt side
of things. It also seems to be the best available at the moment, which
is likely to be why it's popular.


Right there's best in theory and best in practice. They are rarely the
same in virtue of the fact that humans make such limited theories, and the
universe is not impressed.
But I would say that ruby-rails is much closer to how things should be,
even if your not keen on the language itself, the principle is much
closer to being right. The html page or 'view' of an application should
be an object of that application, not a filter page that needs to pass
through a 'find & replace' function. How many filters (or transcribers?)
can be active per html page now? php, java script, css, w3c ....


Lots of things are more how it "should" be, but the question I'm
interested in is how quickly can one produce something that contributes
economically to an organisation (as an information-tracking tool that is,
rather than as a sellable commodity).
Ruby-rails nearly goes that way of taking the view away from the main
code, but I feel as if it got nervous of taking it to the final
conclusion, plus of cause they are at the mercy of html itself.

When we have a language for web that truly separates data - application
- view, so separate in fact that the view could even live on the client
PC if we wanted it to, then we can rave about it. At the moment we're
still on the journey.


I've been hearing more about ruby (and rails) lately, the only bad thing
it's got going against it at the moment is that I've never used it. What
little code I've read however makes it look very neat and efficient
(code-wise). In any case it would stupid for me to suggest that PHP will
never be superceded, and who knows maybe it will be ruby that does it.
Like most languages that are better than php though, it has to be better
*on the web* or else a lot of people will think "why bother, it's so much
easier in php, and anyway it's all the same once it reaches the browser"

I don't think PHP is necessarily the best for any and every website or
web-application, but I think it's probably the best (all things
considered) for getting something genuinely and concretely useful (e.g. a
customer database, a timesheet, project or stock database) and getting it
quickly. You can (too) easily do it badly, but you can do anything badly
(and ironically it's often much slower if you do).

I agree with you in part, but I think your using the learning curve for
(as an example) ruby-rails as part of the argument against it. When I
think that the application types that you mention would be much more
practical, from a coding and maintenance point of view, by using
ruby-rails.

I would say that anyone starting from a platform of having reasonable
programming skills, irrespective of the language could start producing
working useful code within a week for ruby and two weeks for ruby-rails.
Experience in any language counts for a lot, I still slip back into C when
I really need something quickly, simply because i programmed C for so long
that that is the programming language that I think in.

So, lets say that we have gone through the learning curve and come out at
the other end. Now we can compare php and ruby-rails.

The first thing that stands out is really very simple, most programmers
would of done something in these lines anyway, but ruby-rails offers a
formal way to do it. It creates all of the separation directories, but it
does so in such a way that even to untrained programmers the layout
suggests the best places for various parts of you projects functionality.
Once you have tried a few sample sites, then you realise just how
logically correct it is. Ok, have to admit that some areas of the
separation are a bit shady, but thats true of all projects.

So straight away we have an environment that is easier for maintenance and
code updates, simply because you can go straight to the offending code
area whether the project was written by you or not.

You are talking mainly of database/contact/records work. Well, you point
ruby-rails at your database, then the data itself becomes an object of
your application. It is ruby's job to handle access.

The current down side is that I haven't actually come across an ISP that
offers ruby-rails as one of it's available programming environments. I
have only used it on my own servers.

In defence of php though. Ruby has some speed problems, php writers
would spot that one even in fairly simple code. But maybe the engine will
improve eventually.

Jul 17 '05 #22
BearItAll wrote:
[...]
You are talking mainly of database/contact/records work. Well, you point
ruby-rails at your database, then the data itself becomes an object of
your application. It is ruby's job to handle access.
How is it better to call methods than call functions if you want to
access a database? Interface stuff (eg javascript) is better with
objects because interfaces are decentralised and event-driven. In this
environment, ojects make it easier to keep track of what's happening,
but server-side scripting is essentially linear. There may be a design
argument for using objects, but for reusing someone else's code to save
some records, load some records, and generate an html page; a function
call works the same way as a method call.
The current down side is that I haven't actually come across an ISP that
offers ruby-rails as one of it's available programming environments. I
have only used it on my own servers.

In defence of php though. Ruby has some speed problems, php writers
would spot that one even in fairly simple code. But maybe the engine will
improve eventually.


One would expect so, since it's open source and not without its
followers. I look forward to the time when the open source geeks are
praising ruby more highly than any other language in at least one
field. I'll experiment when I'm unemployed again.

Jul 17 '05 #23
On 2005-06-23, Larry Qualig <Lq***************@uku.co.uk> wrote:

"Kelsey Bjarnason" <kb********@gmail.com> wrote in message
news:tCgue.79202$9A2.45597@edtnps89...
Larry Qualig wrote:
"Erik Funkenbusch" <er**@despam-funkenbusch.com> wrote in message
news:sa**************@funkenbusch.com...

On Tue, 21 Jun 2005 22:46:25 -0400, Larry Qualig wrote:

It's much like the Star Wars universe though.
Not a single hand rail in sight, anywhere.
I understand exactly what you mean. It's obvious that in the future OSHA
will cease to exist.


That, probably, would be a bad thing. On the other hand, product
labelling really needs to be changed. Is it really necessary to point out
that a freshly-poured cup of coffee is hot, or that the drain un-blocking
liquid, intended to dissolve organic materials, is not meant to be
consumed?

I'm inclined to say that the "product labeling" issue is more of an issue
with our litigious society. I think that the only reason these crazy labels
exist is to protect the product makers from frivolous law-suits. Some idiot
drinks drain-cleaning fluid and the lawyers go after the manufacturer for
not warning them not to drink it. A friend at work used to have a daily
calendar with a new crazy lawsuit each day. It's insane what people sue over
and win.

The lawyers are able to somehow twist and distort the picture to the point
where these idiots now become the poor innocent victim. To make matters
worse, the brainiacs on the jury award these huge settlements to them.


...yet this all seems to magically get by the jury somehow.

[deletia]

It's easy to lay the blame at the feet of amoral lawyers (and there
are certainly many) but only if you ignore how American courts actually work.

For any abusive trial decision you would like to whine about, there
were 9 average joes that were willing to go along with the insanity.

--
The best OS in the world is ultimately useless |||
if it is controlled by a Tramiel, Jobs or Gates. / | \

Jul 17 '05 #24

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

112
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please,...
3
by: FroxX | last post by:
Hi all, i have a question. What does those ** mean??? For example: void function(Something **pSomething); I hope someone can help me about it. Thanks,
2
by: msn | last post by:
What is the best way to connect to a sql database in a asp.net page with Visual studio. An example would be great. Thanks Dave
3
by: Joergen Bech | last post by:
Am trying to paint a simple rectangle directly on the screen DC using the code below, but nothing happens?!? Weird. Anyone who can tell me what I am doing wrong? This ought to be...
1
by: Chris Burgess | last post by:
I'm starting a small application to get my feet wet with Test Driven Development. I understand the mechanics of setting up NUnit, but I'm not sure what types of tests I should be writing. The...
21
by: Jim Langston | last post by:
I'm sure this has been asked a few times, but I'm still not sure. I want to create a function to simplify getting a reference to a CMap in a map. This is what I do now in code: ...
6
by: \Frank\ | last post by:
I trying to learn what a Bitmap is. Not a Managed Bitmap Object but one that, for example, comes from the clipboard with CF_BITMAP. I'm guessing that a CompatableBitmap is an array of indices...
4
by: mattG | last post by:
I have a scenario where I have these things that take up (x) number of space. I know the max number of space I will ever have is 512. I am trying to figure out a way to write a formula or...
4
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.