.NET/C# versus PHP

  • Thread starter Thread starter Logician
  • Start date Start date
Arne said:
www.netcraft.com track 200 million web sites.

Arne

Netcraft never has been known for their scientific sampling.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
Logician said:
I recall from years ago, Yahoo! was written in Java/ORACLE

Yahoo in Java ??

Never heard that.

Yahoo is known to be big PHP user.

The biggest Java site is probably EBay.
but what
about Amazon?

Rumours say custom C++ for the core.
Google is famous for liking Linux but I do not what
languages it uses.

Rumours say custom C for search, Python for crawl and Java for a lot
of the secondary stufff.

Arne
 
Logician said:
You obviously did not attend the corporate meetings as I did when it
was released in the late 1980's. Do you know much of the history of
DB2? It was hailed as the DBMS that would re-write all data storage
and would be linked into a new networking architecture driven by OS2.
No one ever talked about MS and IBM put millions into DB2 and its new
thinking. It lost its money and the returns were tiny compared to the
costs. IBM's share value dropped over 60% and the company went into
crisis. DB2 was revamped and re-deployed in client forms to try and
save on costs.

So maybe you need to learn some of the facts before telling me my view
is limited.

http://en.wikipedia.org/wiki/History_of_IBM#1990.E2.80.931999:_IBM.27s_near_disaster_and_rebirth
"on January 19, 1993, IBM announced a US$8.10 billion loss for the
1992 financial year, which was then the largest single-year corporate
loss in U.S. history"

You are wrong on 3 counts:

1)

http://en.wikipedia.org/wiki/IBM_DB2

DB2 was released in 1983 - that is not late 1980's.

2)

And you own link state that the red ink in 1993 was due to
a switch from mianframe to distributed environments not due
to the introduction of DB2 10 years earlier.

3)

Michael was really stating that DB2 is a success - and when
no time specified that means today !

Arne
 
Jerry said:
Netcraft never has been known for their scientific sampling.

They don't intend to make a scientific sampling.

They intend to test every public web site in the world.

A sample size of 100%.

Arne
 
Michael said:
while M$ may have released .NET etc.. for Linux - I for one have not
seen any indication that anything running .NET is anything but Windows.


STATEMENT RETRACTED (read the introduction of a google hit and replied)
After submitting went back to re-read it and it was some sort of April
Fool's prank. :-( Need to do more in depth research before replying..
My apologies.
 
Arne said:
They don't intend to make a scientific sampling.

They intend to test every public web site in the world.

A sample size of 100%.

Arne

First of all, 108M websites is nowhere near all the websites in the
world. Second, there is no way to keep up with the websites - too many
go up and down daily. So right there it is a lost cause. Their sample
is inaccurate.

As a side note, web sites does not equate to servers. So they are off
again.

The "statistics" are 100% meaningless.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
Jerry said:
First of all, 108M websites is nowhere near all the websites in the
world. Second, there is no way to keep up with the websites - too
many go up and down daily. So right there it is a lost cause. Their
sample is inaccurate.

As a side note, web sites does not equate to servers. So they are off
again.

The "statistics" are 100% meaningless.

Perhaps there are proportionally more IIS servers because a single IIS
server cannot host as many web sites as an Apache server?
 
First of all, of course it's Windows for IIS, not Linux.
Where do you get these figures?  Do they include private servers?

Netcraft, which means that they do not. However, I doubt it is much
different for intranet.
My experience is much different.  Apache/Linux is much more prevalent
(and cheaper).

The funny thing about one's experience is that it tends to correspond
to one's area of expertise. As a .NET dev, I've seen many more IIS
servers than Apache, especially on the intranet (and, for example,
many more MSSQL than MySQL installations). I'm sure that, if you're
dealing with PHP on a regular basis, you'd see mostly Apache and
MySQL. But the plural of "anecdote" isn't "data".

That's why, when you need objective results, you have to go to a third
party that does statistical studies.

On a side note, I do not dispute that Apache/Linux is cheaper in
general (it's hard to beat $0 for OS). For a particular case this may
not be so, however - if company already has a strong investment in MS
technologies, and has e.g. a TechNet subscription (because it already
uses some other server products internally), it becomes much less
clear cut.
 
An unmaintainable site can be created in any language.  A maintainable
site can be created in any language.

This statement is half-true, because it omits the other part - some
languages are better at encouraging maintainable code than others. It
is far easier to write unmaintainable code in C, Perl or PHP, then it
is in Modula-2, C# or Ruby. This is something that is also worth
remembering when choosing the right tool for the job. There are often
other factors that may outweigh readability/maintainability issues
(such as the case with C or Perl - they simply offer too much that no-
one else really does), but for PHP they are not there. From a language
design standpoint, it is clearly inferior to pretty much any other
mainstream dynamic language out there (Perl, Python, Ruby, Lua to name
a few). From standard library standpoint, it's the same. So you get
absolutely no benefits from choosing it, _and_ you get all of its
deficiencies.

Okay, so I'm not being fair here. You do get one benefit for PHP - and
I've mentioned it earlier. It's cheap in all ways - labor is cheap,
and hosting is cheap. And, quite often, it is _the_ decisive factor,
even if it's the only one.

But my point still stands.
 
Pavel said:
First of all, of course it's Windows for IIS, not Linux.


Netcraft, which means that they do not. However, I doubt it is much
different for intranet.


The funny thing about one's experience is that it tends to correspond
to one's area of expertise. As a .NET dev, I've seen many more IIS
servers than Apache, especially on the intranet (and, for example,
many more MSSQL than MySQL installations). I'm sure that, if you're
dealing with PHP on a regular basis, you'd see mostly Apache and
MySQL. But the plural of "anecdote" isn't "data".

That's why, when you need objective results, you have to go to a third
party that does statistical studies.

On a side note, I do not dispute that Apache/Linux is cheaper in
general (it's hard to beat $0 for OS). For a particular case this may
not be so, however - if company already has a strong investment in MS
technologies, and has e.g. a TechNet subscription (because it already
uses some other server products internally), it becomes much less
clear cut.

Actually, my previous experience was all Microsoft and Java. I got into
PHP rather late when I had some down time and could spend it learning
the language. And I am much more experienced administering Windows
systems than Linux.

So it's not all one's area of expertise :-)

But I don't argue with getting an independent third party. But Netcraft
does not provide accurate statistics.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
I was really trying to gauge where the market is going.

What I see  is that a lot of people are seeing .NET/C# as history

That's something new for me. Given that investment in .NET as a
primary Windows development platform doesn't show any signs of slowing
down, it's a very strange assessment to make. Certainly not something
I've seen expressed often.
and they are digging up old languages such as Python for new
developments.

I don't think "digging up" or "old" apply to Python much. It had
always had its fair share, pretty much for as long as .NET existed as
the platform (after PHP4 restarted the dynamic language craze back in
2000 - was it?). It's also a fairly modern language, in that today's
Python3K, or even Python 2.6, is in many ways rather far removed from
the original Python except for the most basic language constructs.

However, Python (and pretty much all other mainstream dynamic
languages) still has scalability problems, mainly because of threading
issues with interpreters (google "python giant interpreter lock" for
some interesting read). On the other hand, there is Jython to mitigate
that, and now there's IronPython, too.

Which, by the way, serves to remind that ".NET" doesn't have to mean
"C#". In fact, you can run PHP on .NET too (with all its standard
libraries), and you can use PHP to write ASP.NET and general-
purpose .NET applications:

http://www.php-compiler.net/doku.php?id=core:phalanger_for_.net_developers
I really get issues trying to get any tech help and local web
companies just use PHP and other scripting languages. In fact a local
network/PC specialist had never even heard of .NET when I asked if he
could install it for me.

Out of curiosity, where is that?

In any case, if this is the situation in your area, and if those small
web companies are what you're targeting as hosters, then you have your
answer. In the end, technological platform is defined by what the
market will bear just like everything else.
 
The mainadvantage of PHP is that it is cheap/free?
I don't agree to that, allthough I must say most M$ product are
expensive in my humble opinion.

First of all, I would like to remind you that the world isn't limited
by PHP and ASP.NET. There's also Java, there's Perl, Python, and Ruby,
and there are many more exotic solutions (such as Apple's WebObjects).
Hmm, I have been a programmer for many years, but the reason I like PHP
and switched almost exclusively to PHP for all my serverside needs, is:
- It has a Open Source licence (almost BSD)

Did it actually ever help you (i.e. did you, in the course of web
application development, had to patch PHP source code)?

Then, of course, Java is GPL'd, and Python and Ruby are under BSDL-
like licenses as well.
- Its simplicity. PHP is easy to learn, but has enough serious libs
(PEAR/PECL) to expand it to your liking.

This is very subjective. I can accept that PHP is easier to learn
than .NET or Java, but I seriously doubt that it is easier to learn
than Python.
- I can express myself very easily in PHP, something I find harder to do
in Perl, VB, Java. Perl because I just dislike the notation and
codingstyle. VB is just messy and illogical to me. Java has the problem
that you must learn enormous amounts of classes before you can do simple
things, and UNDERSTAND why it works. ;-) I do like Java though.

Again, this omits Python and Ruby. The latter is particularly
extremely expressive, the former is more verbose, but many find it to
be a golden standard of readability.

But, of course, this whole point is largely subjective.

With respect to "learning enormous amounts of classes" - this is
equally true about PHP, but there it's "learning enormous amounts of
functions". Which is made far worse by the fact that those functions
are rather badly organized (thanks to the lack of namespaces, among
other things), and very inconsistent - you get stuff like, in the same
family of functions, the order of arguments is occasionally reversed
for no obvious reason.
So for me PHP offers the best of all worlds: You can use OO when it
suites you. You don't have to use/learn complex libs/classes unless you
feel like it. And it is very easy to code structured in PHP.

All of these points equally well apply to Perl, Python, or Ruby,
except that all three are much better at "coding structured" than PHP.
It is also hosted all over the world.

This is the only one that PHP can actually claim for itself
exclusively :)
 
Maybe you should consider joining the PHP community then?
In comp.lang.php you can get great help. :-)

This is actually a very good advice.

This whole thread is the equivalent of going to a Mazda forum, and
asking there whether a Kia might actually be better. :)
 
Pavel said:
This statement is half-true, because it omits the other part - some
languages are better at encouraging maintainable code than others. It
is far easier to write unmaintainable code in C, Perl or PHP, then it
is in Modula-2, C# or Ruby. This is something that is also worth
remembering when choosing the right tool for the job. There are often
other factors that may outweigh readability/maintainability issues
(such as the case with C or Perl - they simply offer too much that no-
one else really does), but for PHP they are not there. From a language
design standpoint, it is clearly inferior to pretty much any other
mainstream dynamic language out there (Perl, Python, Ruby, Lua to name
a few). From standard library standpoint, it's the same. So you get
absolutely no benefits from choosing it, _and_ you get all of its
deficiencies.

Okay, so I'm not being fair here. You do get one benefit for PHP - and
I've mentioned it earlier. It's cheap in all ways - labor is cheap,
and hosting is cheap. And, quite often, it is _the_ decisive factor,
even if it's the only one.

But my point still stands.

And I disagree completely with your point. In over 40 years of
programming, I've forgotten more languages then most people learn.

But one thing I have learned - the same general programming practices
which are good in one language are probably good in the others.

Yes, you can create unmaintainable code in C. You can also do it in C#,
Modula 2 and other languages. It's neither easier nor harder - it just
takes good programming practices - no matter what the language (with the
possible exception of APL). Even Assembler can be maintainable.

And if you think PHP is inferior to other dynamic languages, you have
little understanding of PHP. It's much superior to VBScript, for
instance. Sure, it has it's flaws. But so does every language. The
biggest difference is that Zend is working to correct those flaws.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
And I disagree completely with your point.  In over 40 years of
programming, I've forgotten more languages then most people learn.

But one thing I have learned - the same general programming practices
which are good in one language are probably good in the others.

You're welcome to try to apply your common C practices in Haskell, and
see how far that gets you.

In fact, it doesn't even have to be extreme. There's a very common and
well-known phenomenon, when people with C background come to C++, only
to start using it as "C with // comments".
Yes, you can create unmaintainable code in C.  You can also do it in C#,
Modula 2 and other languages.  It's neither easier nor harder - it just
takes good programming practices - no matter what the language (with the
possible exception of APL).  Even Assembler can be maintainable.

Okay, let me try to explain again.

You can write OO programs in raw assembly. This doesn't mean that
assembler language is good for writing OO programs.

Yes, it is easier to write unmaintainable code in some languages. When
I say "easier", what I mean is that your average programmer is more
tempted into writing code that is harder to read later. This usually
happens when the language provides features that are not supposed to
be used in maintainable code, and makes those features _more_
accessible than their "safe" alternatives. The history of PHP is full
of such features, such as register_globals and magic_quote_gpc. In
fact, having the idea of arbitrary code snippets embedded into markup
is one such feature.

Remember that people don't usually work alone (if you do, more power
to you!). Even if you trust yourself, you have to deal with the fact
that there are likely to be programmers on the team with less
experience than you. When it comes to that, a using language and
framework that try hard to prevent people from doing common mistakes
can make a big difference.
And if you think PHP is inferior to other dynamic languages, you have
little understanding of PHP.  It's much superior to VBScript, for
instance.

For the record, I did PHP development a while ago (that was PHP4
though). It was definitely better than ASP (the original one, not
ASP.NET) back then, but...

VBScript has not been developed for several years now. If you wanted
to find something to compare to, you couldn't find a worse example. If
the only dynamic language you can think of that's worse than PHP is
VBScript (which I can agree too), that's damning with faint praise.

Can you come up with any other examples? Preferably some other modern
language, and not a phantom from 90s?
 Sure, it has it's flaws.  But so does every language.  The
biggest difference is that Zend is working to correct those flaws.

Are you implying that people behind Perl, Python and Ruby aren't
working on correcting their flaws?

Besides, why wait for someone to correct flaws, when you can pick out
of a dozen other languages/platforms that don't have those flaws in
the first place?
 
Pavel said:
You're welcome to try to apply your common C practices in Haskell, and
see how far that gets you.

They will get me along quite well - because I didn't say "common C
practices".
In fact, it doesn't even have to be extreme. There's a very common and
well-known phenomenon, when people with C background come to C++, only
to start using it as "C with // comments".

That's not the "common programming practices" I am referring to.
Okay, let me try to explain again.

You can write OO programs in raw assembly. This doesn't mean that
assembler language is good for writing OO programs.

Which is NOT the common programming practices I'm referring to.
Yes, it is easier to write unmaintainable code in some languages. When
I say "easier", what I mean is that your average programmer is more
tempted into writing code that is harder to read later. This usually
happens when the language provides features that are not supposed to
be used in maintainable code, and makes those features _more_
accessible than their "safe" alternatives. The history of PHP is full
of such features, such as register_globals and magic_quote_gpc. In
fact, having the idea of arbitrary code snippets embedded into markup
is one such feature.

You are talking about *very old* versions of PHP. Neither of them has
been acceptable for *years*. They've only been there for compatibility
purposes.

And placing arbitrary code snippets embedded in to markup is one of the
big *advantages* of PHP - not a disadvantage! It's much better than
having to use print statements to output stuff that never changes.
Remember that people don't usually work alone (if you do, more power
to you!). Even if you trust yourself, you have to deal with the fact
that there are likely to be programmers on the team with less
experience than you. When it comes to that, a using language and
framework that try hard to prevent people from doing common mistakes
can make a big difference.

I believe I've worked on much larger projects than you ever dreamed.
Try > 100 programmers for 4 years, in England and the east and west
coasts of the U.S. (3 groups). Ever work on projects with > 4M LOC
written in 370 Assembler? I have. Ever manage projects with 25
programmers for 2 years? I have. Shall I continue?

And in many of those we had no framework - there weren't any. But it
was still easy to make things work properly. We had programming
guidelines and code reviews.

People have become too dependent on frameworks, IMHO. They help mundane
programmers remain mundane. Good programmers are good without them.
For the record, I did PHP development a while ago (that was PHP4
though). It was definitely better than ASP (the original one, not
ASP.NET) back then, but...

Then you really don't know what you're talking about.
VBScript has not been developed for several years now. If you wanted
to find something to compare to, you couldn't find a worse example. If
the only dynamic language you can think of that's worse than PHP is
VBScript (which I can agree too), that's damning with faint praise.

So? It's still being marketed by Microsoft, and still active on many
platforms.
Can you come up with any other examples? Preferably some other modern
language, and not a phantom from 90s?

Let's see... C# comes to immediate mind. A lousy attempt to fix things
which weren't broken.
Are you implying that people behind Perl, Python and Ruby aren't
working on correcting their flaws?

I said nothing about Perl, Python or Ruby. Don't put words into my mouth.
Besides, why wait for someone to correct flaws, when you can pick out
of a dozen other languages/platforms that don't have those flaws in
the first place?

Every language has flaws. Just different languages have different ones.
There is no perfect programming language.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
So? Huge does not equate to valid. A common misconception from
non-statisticians.

.... and the argument that a sample must be biased one way or another,
regardless of how much coverage that sample provides, is used by
someone on nearly everything where samples are taken to try to debunk
information that winds up becoming well-known.

It may not be "valid," IYO, but I challenge you to find a more accurate
sampling of data for the Internet. Being that is not likely, the
Netcraft Web Server Surveys are about the best available data one can
use to see what the Internet looks like from a WWW perspective.

--- Mike
 
Back
Top