Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > 10 Reasons Why PHP is Better than ASP

Reply
Thread Tools

10 Reasons Why PHP is Better than ASP

 
 
Ali Bobo
Guest
Posts: n/a
 
      01-16-2008
1. PHP.NET the greatest API resource known to MAN
2. If you have a problem, someone will have already implemented a
solution in PHP for you
3. Syntax is better, closer to C, C++, and Java. Unlike VB where
anything goes.
4. To run ASP you need IIS on windows, which is not free, for PHP
however you need Linux and Apache which are FREE!!
5. Great built in support for ftp, email, graphics package GD2 and
also MySQL (also FREE).
6. PHP will run on Unix, Linux, Solaris and Windows. ASP is mainly
only Windows associated but you can use it on linux with additional
modules installed.
7. PHP code is much faster, ASP is developed on the COM based
architecture, this is an overhead for the server.
8. mod_rewrite, need I say more.
9. Advanced Perl-compatible regular expression functions and loads
of built in support for regular expressions on the whole.
10. Greater control over error handling, and more detailed error
messages.

http://www.hwhappy.co.uk/2006/11/30/...tter-than-asp/
 
Reply With Quote
 
 
 
 
Toby A Inkster
Guest
Posts: n/a
 
      01-16-2008
Ali Bobo wrote:

> 2. If you have a problem, someone will have already implemented a
> solution in PHP for you


Although PHP is one of my favourite programming languages, I do think that
some of these reasons are not so good, so feel I should "correct" some of
them, or at least further elaborate.

Regarding point #2, yes, that's often the case, but half the time their
solution is junk and needs extensive rewrites to remove obvious security
flaws. The reason there's so many free PHP scripts out there is because
there's millions of PHP scripters out there. It may come as a shock to
some of you, but not all of them are geniuses.

> 3. Syntax is better, closer to C, C++, and Java. Unlike VB where
> anything goes.


PHP's syntax is better because it's closer to C? If anything, similarity
to C's syntax should be classed as a disadvantage. C is a step up above
assembly, but that's all that can be said in its favour.

Of the C-like languages, C#, Java and Javascript are far more elegant in
syntax than PHP. But if you want to see a language with a truly nice
syntax, check out AppleScript.

Besides which, ASP.NET (the latest incarnation of ASP) is a container
format which supports the use of various different languages within it.
Sure, VB is common, but so is Javascript. Perl within ASP is not unheard
of. It's even possible to script PHP within ASP.

> 4. To run ASP you need IIS on windows, which is not free, for PHP
> however you need Linux and Apache which are FREE!!


You do not need either Linux or Apache for PHP. There are various other
operating systems and web servers that will run it. I happen to do a lot
of my testing on Apache for Max OS X. PHP will even run on IIS on Windows.

Whatsmore, there are various alternative implementations of ASP, some of
which are free. However, much like with C#, a lot of people rely on
specific quirks and extensions of Microsoft's implementation, so the
result will not run on the alternative implementations.

> 5. Great built in support for ftp, email, graphics package GD2 and
> also MySQL (also FREE).


MySQL is a pretty crummy database though.

> 6. PHP will run on Unix, Linux, Solaris and Windows. ASP is mainly
> only Windows associated but you can use it on linux with additional
> modules installed.


Contradicting point #4 yourself now.

> 7. PHP code is much faster, ASP is developed on the COM based
> architecture, this is an overhead for the server.


COM-based ASP is pretty old. ASP.NET pages can be pre-compiled, allowing
very fast execution.

PHP scripts can be cached in a compiled form if you use eAccelerator or
similar, but this functionality will not be included in PHP by default
until 6.0 is released.

> 8. mod_rewrite, need I say more.


mod_rewrite is written in C, not PHP.

> 9. Advanced Perl-compatible regular expression functions and loads
> of built in support for regular expressions on the whole.


VBScript as of version 5 (which is quite old now) supports regular
expressions, but they're pretty limited compared to Perl's regexs.
However, as I said earlier, ASP is not just limited to VBScript. Perl will
happily run within ASP, and Perl's regexs are certainly Perl-compatible!

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 17 days, 4:39.]

Gnocchi all'Amatriciana al Forno
http://tobyinkster.co.uk/blog/2008/0...llamatriciana/
 
Reply With Quote
 
 
 
 
Tim Slattery
Guest
Posts: n/a
 
      01-16-2008
Toby A Inkster <(E-Mail Removed)> wrote:


>> 3. Syntax is better, closer to C, C++, and Java. Unlike VB where
>> anything goes.

>
>PHP's syntax is better because it's closer to C? If anything, similarity
>to C's syntax should be classed as a disadvantage. C is a step up above
>assembly, but that's all that can be said in its favour.


I VASTLY prefer C, C++, java, e to VB or any of its variants. Of
course your can use Javascript for ASP pages, which removes this
objection.e to script PHP within ASP.

>> 4. To run ASP you need IIS on windows, which is not free, for PHP
>> however you need Linux and Apache which are FREE!!

>
>You do not need either Linux or Apache for PHP. There are various other
>operating systems and web servers that will run it.


Exactly, that's what OP really mant to say. ASP is proprietary, it
runs only on Windows/IIS. PHP runs anywhere.

--
Tim Slattery
MS MVP(Shell/User)
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://members.cox.net/slatteryt
 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      01-16-2008
re:
!> ASP is proprietary, it runs only on Windows/IIS. PHP runs anywhere.

Not so.

Grasshopper enables you to produce .NET Web and server applications that
run on Linux & other Java-enabled platforms using ASP.NET 2.0 controls,
role-based security, and C# generics.

http://dev.mainsoft.com/




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Tim Slattery" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Toby A Inkster <(E-Mail Removed)> wrote:
>
>
>>> 3. Syntax is better, closer to C, C++, and Java. Unlike VB where
>>> anything goes.

>>
>>PHP's syntax is better because it's closer to C? If anything, similarity
>>to C's syntax should be classed as a disadvantage. C is a step up above
>>assembly, but that's all that can be said in its favour.

>
> I VASTLY prefer C, C++, java, e to VB or any of its variants. Of
> course your can use Javascript for ASP pages, which removes this
> objection.e to script PHP within ASP.
>
>>> 4. To run ASP you need IIS on windows, which is not free, for PHP
>>> however you need Linux and Apache which are FREE!!

>>
>>You do not need either Linux or Apache for PHP. There are various other
>>operating systems and web servers that will run it.

>
> Exactly, that's what OP really mant to say. ASP is proprietary, it
> runs only on Windows/IIS. PHP runs anywhere.
>
> --
> Tim Slattery
> MS MVP(Shell/User)
> (E-Mail Removed)
> http://members.cox.net/slatteryt




 
Reply With Quote
 
Mark
Guest
Posts: n/a
 
      01-16-2008
A couple of years ago, I was charged with producing a comparitive analysis of
ASP, ASP.Net and PHP. Have to admit the experience with PHP made me vow
never to use it again...

"Toby A Inkster" wrote:
> Ali Bobo wrote:
>
> > 2. If you have a problem, someone will have already implemented a
> > solution in PHP for you

>
> Regarding point #2, yes, that's often the case, but half the time their
> solution is junk and needs extensive rewrites to remove obvious security
> flaws. The reason there's so many free PHP scripts out there is because
> there's millions of PHP scripters out there. It may come as a shock to
> some of you, but not all of them are geniuses.


There's that... And there's the fact that many of the modules written into
the php engine are not built by geniuses either. Many are not thread safe
and unless you're running in an apache-mode (every request siloed to a
separate process) you pretty much take your life in your hands.

And then there's the crappy release environment that comes with linux. The
test box I had was a version of linux that was about 9 months old at the
time. It came with php 4 from Redhat even though php 5 had been out a couple
of years by then. (a sys admin told me Redhat muddies the waters even further
by making their own mods to the "open source" packages they bundle, so their
versions aren't the same everyone else gets.

I was supposed to test php 5, since it was supposed to have great new
features, but you couldn't *get* an rpm for a version of linux 9 months old.
The user groups all said that it was *unreasonable* to expect an rpm for
linux that old. They wanted me to upgrade linux with a clean install. For
php.

So I tried downloading the source and building from scratch. About 1/3 of
the modules going into php wouldn't build from source. About a week blown to
debugging other people's great open source stuff.

> > 5. Great built in support for ftp, email, graphics package GD2 and
> > also MySQL (also FREE).

>
> MySQL is a pretty crummy database though.


MySql's not such a crummy database, but it does have a *lot* of quirks. You
pretty much have to throw out everything you ever knew about query
optimization for MySql. And to the OP's point, it's free.

Of course, the .Net framework has a lot of the other doodads the OP
mentioned in it, plus there's an open source community to fill in around the
edges.

> > 7. PHP code is much faster, ASP is developed on the COM based
> > architecture, this is an overhead for the server.

>
> COM-based ASP is pretty old. ASP.NET pages can be pre-compiled, allowing
> very fast execution.
>
> PHP scripts can be cached in a compiled form if you use eAccelerator or
> similar, but this functionality will not be included in PHP by default
> until 6.0 is released.


That was one of the interesting parts of my tests, actually. I didn't
spring for Zend Accelerator (which goes against the OP's point about
everything being free), so my timing numbers were pretty much php
out-of-the-box vs the others.

I found that as long as you could keep everything in the underlying c
libraries, php was really fast, but if most of your work was in the script,
php fell *way* behind ASP.Net, slightly behind ASP, finishing only ahead of
Mono which was a dog on all the tests.

Then there's the bastardization-of-perl (and perl is a bastardization of c,
bourne shell, sed and awk) syntax of php which I find personally repellent.

More recently, I went to a conference for SugarCRM, a product written
entirely in php. You heard the ususal open source mantras of "rock solid,
fast and free" but all the questions in every user group session were "why is
it so slow?" and "why don't you fix your bugs?"

Mark

 
Reply With Quote
 
Andy B
Guest
Posts: n/a
 
      01-16-2008
I had my experiences with php as well... it sucked.... In the time it took
me to create 20k worth of php scripts for a website, I have created a 19.5mb
website with better design and security. I was on a few mailing lists where
people claimed that php was "secure". From my results, it is about the most
open to hackers I can find. I had people tell me to keep all of the php
files "outside" the web root and it will be secure. If they didnt know, most
webhosts you pay for wont let you outside the web root. Anyways...off the
soapbox...


"Mark" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>A couple of years ago, I was charged with producing a comparitive analysis
>of
> ASP, ASP.Net and PHP. Have to admit the experience with PHP made me vow
> never to use it again...
>
> "Toby A Inkster" wrote:
>> Ali Bobo wrote:
>>
>> > 2. If you have a problem, someone will have already implemented a
>> > solution in PHP for you

>>
>> Regarding point #2, yes, that's often the case, but half the time their
>> solution is junk and needs extensive rewrites to remove obvious security
>> flaws. The reason there's so many free PHP scripts out there is because
>> there's millions of PHP scripters out there. It may come as a shock to
>> some of you, but not all of them are geniuses.

>
> There's that... And there's the fact that many of the modules written
> into
> the php engine are not built by geniuses either. Many are not thread safe
> and unless you're running in an apache-mode (every request siloed to a
> separate process) you pretty much take your life in your hands.
>
> And then there's the crappy release environment that comes with linux.
> The
> test box I had was a version of linux that was about 9 months old at the
> time. It came with php 4 from Redhat even though php 5 had been out a
> couple
> of years by then. (a sys admin told me Redhat muddies the waters even
> further
> by making their own mods to the "open source" packages they bundle, so
> their
> versions aren't the same everyone else gets.
>
> I was supposed to test php 5, since it was supposed to have great new
> features, but you couldn't *get* an rpm for a version of linux 9 months
> old.
> The user groups all said that it was *unreasonable* to expect an rpm for
> linux that old. They wanted me to upgrade linux with a clean install.
> For
> php.
>
> So I tried downloading the source and building from scratch. About 1/3 of
> the modules going into php wouldn't build from source. About a week blown
> to
> debugging other people's great open source stuff.
>
>> > 5. Great built in support for ftp, email, graphics package GD2 and
>> > also MySQL (also FREE).

>>
>> MySQL is a pretty crummy database though.

>
> MySql's not such a crummy database, but it does have a *lot* of quirks.
> You
> pretty much have to throw out everything you ever knew about query
> optimization for MySql. And to the OP's point, it's free.
>
> Of course, the .Net framework has a lot of the other doodads the OP
> mentioned in it, plus there's an open source community to fill in around
> the
> edges.
>
>> > 7. PHP code is much faster, ASP is developed on the COM based
>> > architecture, this is an overhead for the server.

>>
>> COM-based ASP is pretty old. ASP.NET pages can be pre-compiled, allowing
>> very fast execution.
>>
>> PHP scripts can be cached in a compiled form if you use eAccelerator or
>> similar, but this functionality will not be included in PHP by default
>> until 6.0 is released.

>
> That was one of the interesting parts of my tests, actually. I didn't
> spring for Zend Accelerator (which goes against the OP's point about
> everything being free), so my timing numbers were pretty much php
> out-of-the-box vs the others.
>
> I found that as long as you could keep everything in the underlying c
> libraries, php was really fast, but if most of your work was in the
> script,
> php fell *way* behind ASP.Net, slightly behind ASP, finishing only ahead
> of
> Mono which was a dog on all the tests.
>
> Then there's the bastardization-of-perl (and perl is a bastardization of
> c,
> bourne shell, sed and awk) syntax of php which I find personally
> repellent.
>
> More recently, I went to a conference for SugarCRM, a product written
> entirely in php. You heard the ususal open source mantras of "rock solid,
> fast and free" but all the questions in every user group session were "why
> is
> it so slow?" and "why don't you fix your bugs?"
>
> Mark
>



 
Reply With Quote
 
Steve
Guest
Posts: n/a
 
      01-16-2008

"Tim Slattery" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Toby A Inkster <(E-Mail Removed)> wrote:
>
>
>>> 3. Syntax is better, closer to C, C++, and Java. Unlike VB where
>>> anything goes.

>>
>>PHP's syntax is better because it's closer to C? If anything, similarity
>>to C's syntax should be classed as a disadvantage. C is a step up above
>>assembly, but that's all that can be said in its favour.

>
> I VASTLY prefer C, C++, java, e to VB or any of its variants. Of
> course your can use Javascript for ASP pages, which removes this
> objection.e to script PHP within ASP.
>
>>> 4. To run ASP you need IIS on windows, which is not free, for PHP
>>> however you need Linux and Apache which are FREE!!

>>
>>You do not need either Linux or Apache for PHP. There are various other
>>operating systems and web servers that will run it.

>
> Exactly, that's what OP really mant to say. ASP is proprietary, it
> runs only on Windows/IIS. PHP runs anywhere.


oh so wrong!


 
Reply With Quote
 
Leon Mayne
Guest
Posts: n/a
 
      01-17-2008
"Mark" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>A couple of years ago, I was charged with producing a comparitive analysis
>of
> ASP, ASP.Net and PHP. Have to admit the experience with PHP made me vow
> never to use it again...


I code for a site written in PHP and although it is very fast, it's a
nightmare to work with. It's perfect for beginners and linux zealots who
code in their bedroom by themselves, but when you start trying to do team
development with it it becomes a nightmare.

MySQL is also fast and free, but so is SQL Express. The 4Gb database limit
hasn't been much of an issue to me yet. The stored procedure functionality
in MySQL is incredibly basic and irritating to use, and if you are stuck
with a MySQL <= v4 server then you'll have to use ad-hoc queries for
everything. Something I hate doing.

 
Reply With Quote
 
Anthony Jones
Guest
Posts: n/a
 
      01-17-2008
"Leon Mayne" <leon@rmv_me.mvps.org> wrote in message
news:(E-Mail Removed)...
> "Mark" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >A couple of years ago, I was charged with producing a comparitive

analysis
> >of
> > ASP, ASP.Net and PHP. Have to admit the experience with PHP made me vow
> > never to use it again...

>
> I code for a site written in PHP and although it is very fast, it's a
> nightmare to work with. It's perfect for beginners and linux zealots who
> code in their bedroom by themselves, but when you start trying to do team
> development with it it becomes a nightmare.
>
> MySQL is also fast and free, but so is SQL Express. The 4Gb database limit
> hasn't been much of an issue to me yet. The stored procedure functionality
> in MySQL is incredibly basic and irritating to use, and if you are stuck
> with a MySQL <= v4 server then you'll have to use ad-hoc queries for
> everything. Something I hate doing.
>


SQL Express isn't very scalable though so it wouldn't be useful on a busy
site. I don't know anything about MySQL but I doubt it has the deliberate
connection limit that Express has. If you need to deliver a DB intensive
site at minimal cost then an open source DB such as MySQL would be worth
consideration. However, the potential extra hours of effort to get a
reliable and perfomant solution when using something like MySQL as opposed
to SQL Server standard ought not be overlooked as cost.


--
Anthony Jones - MVP ASP/ASP.NET


 
Reply With Quote
 
Leon Mayne
Guest
Posts: n/a
 
      01-17-2008
"Anthony Jones" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> SQL Express isn't very scalable though so it wouldn't be useful on a busy
> site. I don't know anything about MySQL but I doubt it has the deliberate
> connection limit that Express has. If you need to deliver a DB intensive
> site at minimal cost then an open source DB such as MySQL would be worth
> consideration. However, the potential extra hours of effort to get a
> reliable and perfomant solution when using something like MySQL as opposed
> to SQL Server standard ought not be overlooked as cost.


No, you wouldn't use SQL Express on a big site, unless you wanted to start
small and when the money started coming in and the database size increases
you could buy SQL Server Standard (or workgroup) and install it, and then
migrate your database onto it.

There are better free open source databases than MySQL though, like
http://www.postgresql.org/ people just tend to advocate MySQL because it's
easier to use.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Are there technical reasons why Emacs is better than an IDE? Philippe Faes VHDL 15 07-13-2011 12:24 PM
PHP Training Institute In Delhi, Live Projects on PHP. Short TermPHP Courses, PHP Scripts, PHP Training with Live Projects. Rajive Narain Java 0 09-18-2009 10:47 AM
Re: 10 Reasons Why PHP is Better than ASP Toby A Inkster ASP .Net 20 01-17-2008 04:22 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
25 Reasons to Aviod the SD-10 (was 15 Reasons to Aviod the SD-10) Steven M. Scharf Digital Photography 823 07-02-2004 12:55 PM



Advertisments