Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

advantages and disadvantages of PHP vs ASP 1

Status
Not open for further replies.

ojosVerdes

Technical User
Oct 10, 2002
50
US
What are advantages and disadvantages of PHP compared to ASP (Active Server Pages)?

Ed
 
I'm sure the advantages/disadvantages are the same as what has been discussed in this forum before. A quick search will turn up results.

- - picklefish - -
Why is everyone in this forum responding to me as picklefish?
 
Actually, the last time that thread popped up was several months ago. The thread is going to be deeply buried.

As I see it, PHP has several advantages over VBScript/ASP:[ul][li]platform agnosticism: ASP runs on Win32, but PHP runs on an enormous number of OSes, from Win32 to AmigaOS.[/li][li]server agnosticism: ASP runs under IIS. PHP runs under IIS, Apache, and a number of others.[/li][li]Documentation: the documentation on ASP basically sucks. The PHP documentation is very well laid out.[/li][li]Functionality: PHP provides functionality builtin to the interpreter that you either can't do with ASP or that you have to buy separately. Did ASP ever get an intrinsic way, for example, to upload files, or does one still have to buy a 3rd-party COM object?[/li][li]Cost: With ASP, you have to run IIS on Win32, so you're constrained by Microsoft's license costs. Running an open-source language with an open-source web-server on an open-source OS won't cost you anything at all in license fees.[/li][/ul]

Disadvantages PHP has incomparison to VBScript/ASP:[ul][li]The platform agnosticism prevents PHP from providing tight bingings to any particular OS, so you are sometimes constrained by generic interfaces[/li][/ul]

Actually I can think of only one disadvantage off the top of my head.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
sleipnir214 makes a good summary. To put yourself to sleep with a lengthy discussion, try the previous thread buried at:

thread434-536248

- - picklefish - -
Why is everyone in this forum responding to me as picklefish?
 
Thanks all. I can no go to my boss and show him proof why we should go the PHP route.

 
I taught myself PHP (after a fashion) and in my current job I have been forced to also learn some ASP.

I can say without a doubt that I find PHP much, much easier. Though this, I think, may be down to the documentation as mentioned earlier.

I also bought a book called "Begining PHP" on Wrox Press, which I found to be very helpful. Indeed I still refer to it to jog my poor memory sometimes.
When starting ASP I went and bought the equivelent ASP book (and another on ASP databases) from the same publisher (imaginitively titled "Begining Active Server Pages" and "Begining ASP Databases") and have found them to be much less thorough than the PHP title. I have to constantly cross reference between them even for simple things like conditional loops.

Though I find ASP becoming more bearable now I have had chance to rewrite code I inherited from my predecessor, PHP still gets my vote.
 
sleipnir214

Great post, but a couple of additional notes.

Yes, ASP can upload without a COM object, but its nowhere near as nice, simple and clean as doing it with PHP.

ojosVerdes
To further delve into the functionality of PHP

PHP has very good array handling functions when compared to ASP, looking at things like in_array() and the sorts.

PHP has about 700 functions built in, covering aspects from DB connectivity to image manipulation (like to see ASP do that one!)

hth





Bastien

Cat, the other other white meat
 
AND the NO 1 reason!!!

You have access to the Source Code of PHP.
 
Guys, couple more questions on this. If PHP offers all these great advantages over other commercial programs such as ms ASP and MM Coldfusion, why would the programmers of PHP release the program under Open Source lincense?

Is there paid support available for PHP?

This is another reason why I am trying to convince my manager to move away from ms products. I program in VB and the company pays support for vb. Believe hundreds of dollars.

 
Well, the current 'owners' of PHP, ZEND ( do make their money from selling IDEs and other products that revolve around php. SO there is an income stream to offset the php license lack of cost.

Open source also has the benefit of having a large body fo developers who can both trouble shoot and develop extensions to the language (like MING which can send images to flash on the fly), so support and r&d costs may be reduced to some extent.




Bastien

Cat, the other other white meat
 
ojosVerdes said:
If PHP offers all these great advantages over other commercial programs such as ms ASP and MM Coldfusion, why would the programmers of PHP release the program under Open Source lincense?

I'm not sure of where your question is leading.

If you're question is "How can an open-source product be any good?", then the first thing to keep in mind is that, Mi[¢]ro$oft FUD to the contrary, "closed source" and "quality of code" are not synonymous. Some open-source software is dreck. Some products, like PHP, Apache, MySQL, PostgreSQL and Linux are very very good.

If you're asking the question, "Why would anyone build something useful then just give it away?", I suggest you read Eric S. Raymonds essays "The Cathedral and the Bazaar", "Homesteading the Noosphere" and "The Magic Cauldron". The three essays are available in book form and online

If you're asking the question, "How can anyone make a living off all the effort that must go into producing a product like PHP?", then you have to keep in mind that PHP is published by a commercial corporation, the Zend Technologies, Ltd, an Israel-based company. Although they publish PHP as an open-source product, the publish PHP add-on products which are commercial closed-source.

ojoVerdes said:
Is there paid support available for PHP?
I'm sure there must be, but I've never needed it because:[ul][li]the PHP language is well-organized and so is its documentation.[/li][li]when you are using a successful and popular open-source product, you will find that there are a host of fellow users who are more than happy to help you figure things out for free[/li][li]if worse comes to worst, I can always poke around in the source code to see how it works[/li][/ul]


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
To be fair, ASP.NET is a whole new beast. I haven't had the chance to play with it yet, but have read some literature, and work with a few people who swear by it.

I wish I could elaborate, but like I said I haven't really tinkered yet. I do know that alot of what we get from PEAR is now built into ASP, with the downside that alot of ASP pages are starting to look the same because everyone's using the same bundled forms and so on.

Anyway, I'm still a staunch PHP user, I agree with the above advantages, the only thing requested of me I haven't been able to accomplish so far is a tie in to our corporations window's logins... but I've been told the ability exists, and I know the ASP guys here have done that.
 
skiflyer

ASP has access to a set of windows function for logons, most notably the
Code:
user = request.ServerVariables("LOGON_USER")

which retreives / has access to the NT user account on the local machine. This is what you are after, though I don't know if PHP can access this. ASP is built on a lot of COM objects and it may be possible to create a COM to at this data...


Bastien

Cat, the other other white meat
 
Don't want to sidetrack the conversation... but it's not that simple. Apache can get that information as well. But, you need a more direct tie in to really authenticate the user... and take into account things like domain/cross-domain trust. Have to make sure that just because our two domains share the same name, I can't login with your username on my domain and get access and so on and so forth.

IIS can tie into the windows authentication scheme, use NTLM to receive a username/pwd through a browser prompt, then verify it via the domain's login service. I'm told Apache can do the same, but it's a plugin, and I just haven't had the time to get too down and dirty with it.

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top