473,657 Members | 2,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

10 Reasons Why PHP is Better than ASP

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/
Jan 16 '08 #1
24 2288
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/
Jan 16 '08 #2
Toby A Inkster <us**********@t obyinkster.co.u kwrote:

> 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)
Sl********@bls. gov
http://members.cox.net/slatteryt
Jan 16 '08 #3
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" <Sl********@bls .govwrote in message news:id******** *************** *********@4ax.c om...
Toby A Inkster <us**********@t obyinkster.co.u kwrote:

>> 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)
Sl********@bls. gov
http://members.cox.net/slatteryt


Jan 16 '08 #4
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

Jan 16 '08 #5
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" <mm******@nospa m.nospamwrote in message
news:EB******** *************** ***********@mic rosoft.com...
>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

Jan 16 '08 #6

"Tim Slattery" <Sl********@bls .govwrote in message
news:id******** *************** *********@4ax.c om...
Toby A Inkster <us**********@t obyinkster.co.u kwrote:

>> 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!
Jan 16 '08 #7
"Mark" <mm******@nospa m.nospamwrote in message
news:EB******** *************** ***********@mic rosoft.com...
>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.

Jan 17 '08 #8
"Leon Mayne" <leon@rmv_me.mv ps.orgwrote in message
news:7F******** *************** ***********@mic rosoft.com...
"Mark" <mm******@nospa m.nospamwrote in message
news:EB******** *************** ***********@mic rosoft.com...
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
Jan 17 '08 #9
"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:en******** ******@TK2MSFTN GP02.phx.gbl...
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.

Jan 17 '08 #10

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

Similar topics

77
5667
by: nospam | last post by:
Reasons for a 3-tier achitecture for the WEB? (NOTE: I said, WEB, NOT WINDOWS. DON'T shoot your mouth off if you don't understand the difference.) I hear only one reason and that's to switch a database from SQL Server to Oracle or DB2 or vice versa... and that's it.... And a lot of these enterprises don't need it as they already know what database they are going to use and they don't plan on switching in and out database in the first...
1
2203
by: DickChristoph | last post by:
Hi I am interested in converting a Access 97 application to VB.Net (well okay rewriting). This would be a VB.Net client with a SQL Server backend, as opposed to my other alternative which would be rewriting this as an Access XP application with a SQL Server backend. I have worked enough in VB.Net at home to known that this would be a better solution but this would be the first application for our company using VB.Net (a largely...
3
1842
by: Glen W via DotNetMonster.com | last post by:
I need 10 reasons to give to my boss to convince him to upgrade to VS 2005. So far I've got the 2 obvious ones: Generics and Refactoring, one makes code safer the other makes writing code easier. I also like snippets and partial classes. Any other suggestions would be greatly appreciated. --
13
2635
by: Noesis Strategy | last post by:
When I ordered my new laptop, Sony didn't offer Access 2003 in its bundles. Recently, I have begun to design Access databases using an copy of Access 2002 from my previous laptop. It works fine, but I would like to have all the office apps on the same version. So I have a few questions: 1) Is the file format the same as 2002? Can 2002 users read 2003 files? 2) What are the major reasons for upgrading to 2002 ?
19
1656
by: WebMatrix | last post by:
Hi, I developed ASP.NET application in VB.NET about a year ago; it has been in production since. Now they want to add new features change some of the existing ones, it's not a major rework, but probably a week of work or so. My dilemma is that I have switched to C# since than and want to continue coding in C#. Now would be a good time to port this app to C# with new features which will add probably twice as much time to development of...
97
4011
by: Master Programmer | last post by:
Thinking of learning VB.NET? New programmer? Thinking of Moving over from VB 6.0? Read on friend, let me help you make a more informed decision......... Microsoft are a pathetic company, but they have got worse over the last 5 years. Here are just a few reasons (there are many more), not to sacrifice
46
2154
by: Sensei | last post by:
I was having an interesting discussion about the ANSI C and some ``weird inconsistencies'', or at least what at first sight can be seen as an imbalance. I hope someone can satisfy my curiosity. The standard provides means to open files associating a /path/ with a /stream/. The standard does not provide any means to handle /directories/. There are three streams defined by the standard, stdin stdout stderr. Am I right? Now, what is the...
23
6590
by: Ali Bobo | last post by:
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...
28
1900
by: RMZ | last post by:
This may come across as a trolling message, it's not ment to be. It's intended to share a recent experience I had with Mac OS in an entertaining way. I'm doing this because I love technology in general and most programmers I know are passionate about technology, unfortunately many of them stay away from Mac. Some as if it's the forbidden fruit (you know you're out there) and others because they think it's OS for people who aren't...
0
8399
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8312
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8504
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4159
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.