HighDots Forums  

site design technologies required heads up please

Website Design comp.infosystems.www.authoring.site-design


Discuss site design technologies required heads up please in the Website Design forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Hallvard B Furuseth
 
Posts: n/a

Default Re: rant about PHP - 05-12-2005 , 05:06 PM






Stefan Nobis <snobis (AT) gmx (DOT) de> writes:
Quote:
There are so many really good languages (like Pike, Python, Ruby,
Common Lisp, Self, Fortress, Nice, Squeak, Scala,...), so why do
so many people choose an ad-hoc language, a kind of a planless
pile of a bunch of features?
Speaking as a new PHP user, with some minor scripts:

With PHP, the code snippets are embedded in the HTML page instead of
the HTML page snippets being embedded in the program.

PHP documents can be put next to HTML documents in a directory in
htdocs/, they don't need to live separately in cgi-bin/. (I'm not the
site admin.)

The language itself? A Perl-like one isn't my preference, but I don't
care much. Well, not Python, unless the whitespace-dependence is
removed. That's a great language, but I do _not_ want indentation to be
significant in the middle of text which I'm likely to readjust every so
often.

--
Hallvard
Don't anthropomorphize computers. They hate that.


Reply With Quote
  #12  
Old   
Stefan Nobis
 
Posts: n/a

Default Re: rant about PHP (was: site design technologies required heads up - 05-12-2005 , 06:28 PM






kaeli <tiny_one (AT) NOSPAM (DOT) comcast.net> writes:

Quote:
If I understand what you're asking, it came about from Perl
scripters who wanted a neater solution. There were already a lot
of people using Perl CGI on the web. They moved to PHP and then
other people started getting in on it.
Hmmm... OK, if all you know is (old/bad style) Perl, PHP may
really be enlightening. But even that time there are so much
better alternatives...

Never mind. Thanks for your patience. At least i had a chance to
train my english a little bit.

--
Stefan.


Reply With Quote
  #13  
Old   
kaeli
 
Posts: n/a

Default Re: rant about PHP (was: site design technologies required heads up - 05-13-2005 , 09:00 AM



In article <87k6m4t6xz.fsf (AT) snobis (DOT) de>, snobis (AT) gmx (DOT) de enlightened us with...
Quote:
kaeli <tiny_one (AT) NOSPAM (DOT) comcast.net> writes:

If I understand what you're asking, it came about from Perl
scripters who wanted a neater solution. There were already a lot
of people using Perl CGI on the web. They moved to PHP and then
other people started getting in on it.

Hmmm... OK, if all you know is (old/bad style) Perl, PHP may
really be enlightening. But even that time there are so much
better alternatives...
See, the thing is, "better" is subjective.
Better for _what_? You know what I mean?
You always have to weigh the pros and cons for each particular situation
before you can say what is better.

You should see some of the language snobs around here. God forbid they even
consider the pros and cons of different setups. They won't even consider
changing things, just because they're so set in their ways.
That happens to some programmers, I guess.

Quote:
Never mind. Thanks for your patience. At least i had a chance to
train my english a little bit.
Hey, no problem. I do like a good debate. *grins*

--
--
~kaeli~
Why do people who know the least know it the loudest?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace



Reply With Quote
  #14  
Old   
Bruce Lewis
 
Posts: n/a

Default Re: rant about PHP - 05-13-2005 , 11:28 AM



Stefan Nobis <snobis (AT) gmx (DOT) de> writes:

Quote:
In short: Many languages solve the problems in dynamic web
programming far better than PHP -- so why do so many people stick
with such a bad tool?
You are assuming that sticking power comes from being a good tool. That
is not necessarily the case.

Learning PHP is difficult, especially if you don't have a C background.
It takes a lot of work to get past the strange error messages from
missing semicolons, the =, ==, === distinctions, and myriad other
gotchas. After all that work, people aren't going to feel inclined to
learn another language, because it was so difficult to learn the first
one.

Second, you get a strong feeling of accomplishment when you get
something done using a difficult language like PHP. "Wow! It took me
four hours, but I got this database-driven page working!" On the other
hand, using an appropriate tool is not exhilarating. "Ten minutes?
Gosh, I'm slow. Looking at this code I should have done it in five."

Third, more difficulty means more traffic on mailing lists and
newsgroups. If a tool just works, people don't ask questions about it.
If a tool is broken, you get lots of discussion and thus higher
perceived popularity.

These three things make for a community with strong advocacy. Riding on
Apache's coattails made the PHP community large. PHP now has a large,
strong community. This is not in spite of PHP's weaknesses; it's
largely because of them.


Reply With Quote
  #15  
Old   
Stefan Nobis
 
Posts: n/a

Default Re: rant about PHP - 05-13-2005 , 12:27 PM



Bruce Lewis <brlspam (AT) yahoo (DOT) com> writes:

Quote:
These three things make for a community with strong advocacy.
Thank you very much for sharing your insights. I think now i
understand people using PHP a bit better (and because i have to
deal with them from time to time, it's a worthful insight to me).

--
Stefan.


Reply With Quote
  #16  
Old   
Lauri Raittila
 
Posts: n/a

Default Re: rant about PHP - 05-17-2005 , 09:36 PM



in comp.infosystems.www.authoring.site-design, Bruce Lewis wrote:
Quote:
Stefan Nobis <snobis (AT) gmx (DOT) de> writes:

In short: Many languages solve the problems in dynamic web
programming far better than PHP -- so why do so many people stick
with such a bad tool?

You are assuming that sticking power comes from being a good tool. That
is not necessarily the case.

Learning PHP is difficult, especially if you don't have a C background.
Sure. Took me hour. I have never used C, and AFAIK PHP is far from C.

That is one of the problems, it is not too powerful.

(my programming has been basic, pascal, java, perl, none very well,
prefer perl over others, but I have mostly done text stuff.)

Quote:
It takes a lot of work to get past the strange error messages from
missing semicolons, the =, ==, === distinctions, and myriad other
gotchas.
They are trivial.

Quote:
After all that work, people aren't going to feel inclined to
learn another language, because it was so difficult to learn the first
one.
The fact is that it is much easier to learn PHP than program for web on
almost any other language, especially on trivial cases.

Quote:
Second, you get a strong feeling of accomplishment when you get
something done using a difficult language like PHP.
Exaxctly what tool is easier?


--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/buy-opera.html?AID=882173


Reply With Quote
  #17  
Old   
Chris Morris
 
Posts: n/a

Default Re: rant about PHP - 05-18-2005 , 04:29 AM



Lauri Raittila <lauri (AT) raittila (DOT) cjb.net> writes:
Quote:
in comp.infosystems.www.authoring.site-design, Bruce Lewis wrote:
Learning PHP is difficult, especially if you don't have a C background.

Sure. Took me hour. I have never used C, and AFAIK PHP is far from C.
Likewise - I started on PHP without having used C at all. I still
haven't used C.

Quote:
It takes a lot of work to get past the strange error messages from
missing semicolons, the =, ==, === distinctions, and myriad other
gotchas.

They are trivial.
Well, ==/=== is less so, since the type system can be obscure at times.

The lack of distinction between numeric and associative arrays has
been a problem occasionally. (There are no numeric arrays, but the
language does a lot of pretending that there are, so far as I can
tell)

The fact that in_array(needle,haystack) but strpos(haystack,needle) -
I've been using PHP several years now and I *still* have to look that
up every single time I use either function.

strpos() but str_replace(), decoct() but deg2rad(), etc.

No function namespaces.

It adds up to being annoying. Not difficult. Just something that takes
more time than it should if it were more consistent.

Quote:
After all that work, people aren't going to feel inclined to
learn another language, because it was so difficult to learn the first
one.

The fact is that it is much easier to learn PHP than program for web on
almost any other language, especially on trivial cases.
Agreed. On less-trivial cases PHP gets less good. I write large PHP
applications for a job, and I do often wish the language had better
features for large-scale programming without me having to write them
myself.

Quote:
Second, you get a strong feeling of accomplishment when you get
something done using a difficult language like PHP.

Exaxctly what tool is easier?
At the moment, I don't know. But, for example:

Form handling. The web uses a lot of form handling. PHP does not make
it easy to do this. If you want a form, with some compulsory fields,
and some optional fields, automatically filled in with the answers so
far if it's submitted partially-complete, but if complete, to do an
action, you have problems.

What would be nicer is being able to do:
form ($handlerfunction,$method) {
input($name,$initial_value,$compulsory,$typecheck, $boundscheck,etc)
...
}
[Extend to have fieldsets support, etc, as appropriate]
and it just works [1].

It's a good templating language - very good for that - less strong for
complex application development.

[1] If anyone knows of a mainstream language that already does this,
I'd like to know.

--
Chris


Reply With Quote
  #18  
Old   
Stefan Nobis
 
Posts: n/a

Default Re: rant about PHP - 05-18-2005 , 04:35 AM



Lauri Raittila <lauri (AT) raittila (DOT) cjb.net> writes:

[Learning PHP]
Quote:
Sure. Took me hour.
Uh? You completley learned PHP? You know about the pitfalls with
converting between strings and numbers? You know how do use
functions as first class objects? You know OOP in PHP (even if
it's a bit crude)?

For me it's impossible to read the spec of PHP in one hour, let
alone understand everything (and i'm trained to learn languages, i
know about three dozens).

Quote:
That is one of the problems, it is not too powerful.
PHP is quite powerful (dynamic typing, functions as first class
objects, arrays, hashes,...). The problem is the chaos: It's a
pile of features instead of simple and straight concepts (simple
example: a simple concept is a sequence; in this case strings,
arrays and even hashes are sequences, all with the same basic
syntax to get elements of the sequences -- in PHP this is not
really the case, [] for strings is at least deprecated, one should
use {} and this is a clear sign of missing simple concepts in the
core of the language or missing expertise in writing parsers).

Quote:
(my programming has been basic, pascal, java, perl, none very well,
prefer perl over others, but I have mostly done text stuff.)
That's all you know and then you say this:

Quote:
The fact is that it is much easier to learn PHP than program for web on
almost any other language, especially on trivial cases.
There are thounds of languages and millions of libraries and tools
out there. Or do you mean: PHP is easier than any other language
*you know of*.

Even then i would say: It depends. Out of the box with only
standard libraries -- yes, in this case you may be right. But with
extra libraries allowed (like PEAR for PHP), even Perl is able to
compete, let alone other languages (Python, Common Lisp,
Scala,...).

And for the trivial cases: There still is SSI.

Quote:
Exaxctly what tool is easier?
For middle to big size web applications? Nearly anything (to name
at least one: Common Lisp with Uncommon Web and CL-SQL -- Lisp has
nearly no syntax and only few very straight forward concepts; i
learned Lisp (much) faster than PHP).

--
Stefan.


Reply With Quote
  #19  
Old   
Lauri Raittila
 
Posts: n/a

Default Re: rant about PHP - 05-18-2005 , 08:31 AM



in comp.infosystems.www.authoring.site-design, Stefan Nobis wrote:
Quote:
Lauri Raittila <lauri (AT) raittila (DOT) cjb.net> writes:

[Learning PHP]
Sure. Took me hour.

Uh? You completley learned PHP?
Of course not. I learned enough to fix simple image gallery
(http://lauri.cambridgelaan.nl/index.phps)

Quote:
You know about the pitfalls with
converting between strings and numbers? You know how do use
functions as first class objects? You know OOP in PHP (even if
it's a bit crude)?
No. But I didn't need to tell that PHP was easy to learn and use.

Quote:
That is one of the problems, it is not too powerful.

The problem is the chaos: It's a
pile of features instead of simple and straight concepts
That is exactly what I meaned by not powerful.

Quote:
The fact is that it is much easier to learn PHP than program for web on
almost any other language, especially on trivial cases.

There are thounds of languages and millions of libraries and tools
out there. Or do you mean: PHP is easier than any other language
*you know of*.
Tell me one that you can learn in an hour to make trivial case. Of course
PHP is not too good for any real programming. But it is very easy to use
for what it is useful.

I think that many languages require you to first set it up somehow, PHP
is most likely already supported...

Quote:
And for the trivial cases: There still is SSI.
IMHO PHP is easier than SSI. (I once read SSI stuff as I intented to use
same syntax in my own preprosessor)

Quote:
Exaxctly what tool is easier?

For middle to big size web applications?
Agree here. But those are not exactly easy. PHP is easy to learn, but
hard to use.

Quote:
Nearly anything (to name
at least one: Common Lisp with Uncommon Web and CL-SQL -- Lisp has
nearly no syntax and only few very straight forward concepts; i
learned Lisp (much) faster than PHP).
I tried to learn elisp last week (while waiting an image (1.5GB) to
print), and in 3 hours I didn't learn enough to make anything with it.
(both times I had some skeleton written by someone else of course which I
tried to edit.)

I think the reason why our opinions differ is that you are good
programmer. Good programmers don't need easy languages, they are far
better off with powerful languages.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/buy-opera.html?AID=882173


Reply With Quote
  #20  
Old   
kaeli
 
Posts: n/a

Default Re: rant about PHP - 05-18-2005 , 08:47 AM



In article <87wtpxlywr.fsf (AT) dinopsis (DOT) dur.ac.uk>, c.i.morris (AT) durham (DOT) ac.uk
enlightened us with...
Quote:
Form handling. The web uses a lot of form handling. PHP does not make
it easy to do this. If you want a form, with some compulsory fields,
and some optional fields, automatically filled in with the answers so
far if it's submitted partially-complete, but if complete, to do an
action, you have problems.
PHP so totally sucks for that.

Quote:
[1] If anyone knows of a mainstream language that already does this,
I'd like to know.
ASP.NET

Easy to make required fields and to have form fields filled in already.
Example:
http://www.asp.net/Tutorials/quickstart.aspx
"Validation controls are added to an ASP.NET page like other server controls.
There are controls for specific types of validation, such as range checking
or pattern matching, plus a RequiredFieldValidator that ensures that a user
does not skip an entry field."

--
--
~kaeli~
Punctuation, capitalization, and grammar are your friends,
and will help people think that you aren't such an ignorant
moron, after all.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.