|
 |
|
|
|
02-20-2007, 04:07 PM
|
Re: ASP vs. PHP
|
Posts: 5,662
Name: John Alexander
|
Quote:
Originally Posted by Kirtan
About cost:
If you decided not to host in a shared hosting service, It will happen when you go for big sites, and host yourself, you need windows server, asp and SQL server.
|
This is absolutely untrue, and totally misleading. ASP can use SQL Server, and you might decide to do this because it's a better, more featured database than MySql, but ASP can use MySql as easily as it can use SQL Server or Oracle. A person who decides to run their own ASP web server only needs Windows Server, which comes with IIS at no extra charge. Saying you "need" SQL Server if you decide to write ASP code and including the price is Enron style accounting.
Whoever you're getting your info on ASP from is lieing to you.
|
|
|
|
02-20-2007, 04:10 PM
|
Re: ASP vs. PHP
|
Posts: 5,662
Name: John Alexander
|
Quote:
Originally Posted by chrishirst
Your first priority should be to learn HTML and how to use CSS to make the HTML appear in browsers how you want it to look.
Server side code is simply a means of delivering HTML to user agents from sources such as databases than cannot be viewed by HTTP requests.
To use code to create web pages you need to know how to create pages in the first place.
|
This is really good advice. Sort of like saying you need to learn to walk upright before you can run a marathon. And a good way of explaining why/when either technology ( ASP/PHP ) is needed.
|
|
|
|
02-20-2007, 08:03 PM
|
Re: ASP vs. PHP
|
Posts: 5,662
Name: John Alexander
|
And for the record, SQL Server is free for up to 4 GB of storage. You can get the time-unlimited, non-trail version from Microsoft, or a 180-day free trial with unlimited storage, again from Microsoft.
I really hope nobody actually believes you have to spend $5,000 on a particular database server just because you write your web code in ASP.
|
|
|
|
03-21-2007, 03:57 PM
|
Re: ASP vs. PHP
|
Posts: 5,662
Name: John Alexander
|
Good info, although using mod_rewrite or anything to do with .htaccess will slow your web site ( and the entire server its on ) down. Before every web request ( "hit" ) is made, the entire .htaccess file is parsed and acted on. Which means for any given page, your whole file will be loaded from disc, parsed, and applied for the html document, for the css file(s) linked to, for the javascript file(s), and each and every image. It's powerful, but a last resort.
Also, although Google is able to index pages with moderate query strings, ASP is able to do the same thing, rewriting URLs, using HttpHandlers.
There are plenty of reasons to go with PHP, but pretend weaknesses in ASP aren't among them.
|
|
|
|
03-21-2007, 04:22 PM
|
Re: ASP vs. PHP
|
Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
I've never tried the HTTPHandlers way (because to the best of my knowledge, that's .NET), but ASP offers a similar method to mod-rewrite that is minimal in terms of server resource: the custom 404. It takes a few hours to figure it out (at least it did in 2000 when I figured it out), but it does work and works very well (the other advantage is that the 404 matches the look and feel of the site for actual 404 pages.) The 404 can be used to rewrite URLs fine, just fine.
As John said, this is yet another "pretend weakness". This is the biggest problem with the PHP vs. ASP argument...too many misconceptions about ASP.
|
|
|
|
03-23-2007, 03:37 AM
|
Re: ASP vs. PHP
|
Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
|
Yeah, I don't think you can do HttpHandlers in ASP classic; I'd never heard of them until .NET. The way we always did this was code that ran at the start of the 404 page; you can send a redirect as long as you haven't sent anything to the client yet. And you can shove your data in session variables, so you don't need a query string.
|
|
|
|
03-23-2007, 04:56 AM
|
Re: ASP vs. PHP
|
Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
|
Quote:
|
While you can create your site in php, you may use apache's killer mod_rewrite module to create clean URLs
|
Actually this is wrong
Just because the code is PHP it does NOT mean you can use mod_rewrite.
PHP can also run on IIS which does not use .htaccess
Quote:
|
I love it and google loves it too
|
This is also incorrect. The use of rewritten URLs simply does NOT make a page "Search Engine Friendly".
It will help if your site code puts barriers in the way of getting the pages crawled, such as 3 or more querystring parameters, but "problems" such as this could be easily avoided at program design time.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|
|
|
|
03-23-2007, 05:07 AM
|
Re: ASP vs. PHP
|
Posts: 189
|
Man, this is kind of pointless. When ppl ask me why do I use, I say "coz I'm more familiar with it", and that's it. I mean common, how pointless it is to compare 2 LANGUAGES? Ppl do it all the time: php vs asp, java vs c, php vs ruby, .... Each has its own advantages and disadvantages. Pick up 1 you like, and master it. For me, the only 2 languages I use the most so far are PHP and Ruby tho I do know C++ and Java.
|
|
|
|
03-23-2007, 05:32 AM
|
Re: ASP vs. PHP
|
Posts: 182
|
PHP- its free!
|
|
|
|
03-23-2007, 08:14 AM
|
Re: ASP vs. PHP
|
Posts: 880
Location: Leeds UK
|
Quote:
|
although using mod_rewrite or anything to do with .htaccess will slow your web site ( and the entire server its on ) down
|
That must be some serious htaccess file you got going on or you only have top level one that does a sitefull of stuff. .htaccess is your friend and yes it can be misused but using it correctly hardly imposes any delay on your pages loading.
Apart from that i agree with "yellow1912"
If you use windows a lot go for asp if your a nix man use php. Its not too hard to make your mind up and both language provide you with the tools you need to put out dynamic content.
|
|
|
|
03-23-2007, 03:36 PM
|
Re: ASP vs. PHP
|
Posts: 5,662
Name: John Alexander
|
Quote:
Originally Posted by BruceWayne
PHP- its free!
|
So is ASP. No charge whatsoever for using ASP.
|
|
|
|
03-23-2007, 04:49 PM
|
Re: ASP vs. PHP
|
Posts: 843
Name: Mike
Location: United Kingdom
|
Quote:
Originally Posted by Learning Newbie
So is ASP. No charge whatsoever for using ASP.
|
No so true. If you use ASP, the cost is your dignity...because your using a Microsoft product 
__________________
My Blog/Site: Please login or register to view this content. Registration is FREE
Last edited by rogem002; 03-23-2007 at 04:50 PM..
|
|
|
|
03-23-2007, 05:03 PM
|
Re: ASP vs. PHP
|
Posts: 5,662
Name: John Alexander
|
Oh god. The zealots have escaped from Iran. Microsoft is the Great Satan, and let there be a fatwa against any infidel who would use their technology?
|
|
|
|
03-23-2007, 05:06 PM
|
Re: ASP vs. PHP
|
Posts: 843
Name: Mike
Location: United Kingdom
|
Quote:
Originally Posted by Learning Newbie
Oh god. The zealots have escaped from Iran. Microsoft is the Great Satan, and let there be a fatwa against any infidel who would use their technology?
|
How off topic.
__________________
My Blog/Site: Please login or register to view this content. Registration is FREE
|
|
|
|
03-23-2007, 05:14 PM
|
Re: ASP vs. PHP
|
Posts: 5,662
Name: John Alexander
|
No more so than pedantic comments about nobody who uses Microsoft products has any dignity. In fact, I think pointing out the silly fundamentalism and evangelicism creeping into this thread is very on topic.
|
|
|
|
03-30-2007, 05:36 PM
|
Re: ASP vs. PHP
|
Posts: 474
Name: Damien
|
I'll add my 2c to this since it seems very few of the posters have the benefit of experience with both technologies.
First of all though, I agree with the sentiments of those before me who have stated that you should: - Use the technology that you're more comfortable with (e.g. based on familiarity due to experience with similar languages)
- Consider the cost of deploying the technology - Windows based hosting is often more expensive
- Ensure that any "facts" touted about either technology has some substance - don't take it on face value...
Next, I want to make it clear that I've used ASP via Javascript and VBScript - although there appears to be an overwhelming majority of ASP advocates dedicated to VBScript; I found pros and cons to both, but also that it's possible to mix the two in one application if needed.
In my experience, the biggest advantage of PHP vs. ASP is that PHP has an absolute truck load of built-in functions/classes, whilst ASP has about a handful? It's a little bit like comparing C to Java - you can either have lots of functionality out of the box (Java), or bolt it on using libraries etc. (C).
Whether this is actually a good thing or not depends on your point of view - my argument is that PHP makes it easier to achieve some common tasks because there is already a built-in function for it. Whilst you may be able to replicate this functionality by writing it yourself in ASP, any code you write will be far less tested than a core function built-in to PHP.
Put another way, the more lines of code you write, the more chance you have of creating bugs in your script/application. The advantage however, is that you have the power to fix a bug in code that you write yourself - if it's hidden away in some built-in function, you can't do that (well you can, but not within PHP coding itself; you need to look at the source code for PHP itself etc.).
Overall, there's a reason MS decided to release ASP.NET, and I think it stems from the fact that ASP was one of the first scripting frameworks of its kind - MS were pretty much pioneers with this. However, as time went on, PHP was born and gained massive popularity, and likewise with others (perhaps more similar to ASP.NET) such as JSP. I therefore believe that MS knew there was a good reason to update their offering in order to remain competitive - no doubt partly in order to keep their MS Server product alive too (since PHP and JSP don't require MS Server, but ASP.NET does).
It's true that ASP isn't entirely defunct of all OOP functionality, but it certainly isn't geared up towards it in the way that ASP.NET / C# and other more modern technologies are (including PHP 5).
In terms of a recommendation for a technology to get to grips with, I'd have to say PHP makes most sense today (comparing PHP with ASP - VBScript/Javascript).
Since PHP syntax and OO implementation has massive similarities with C/C++/Java/C# it is really easy to transition between these languages which are the most popular for serious application development (in the corporate world), and therefore also have the best employment prospects associated with them.
Even if that's of no interest now, it surely makes sense to target the current technologies rather than those that have been superceeded by their developers (i.e. at least go for ASP.NET rather than ASP..).
Disclaimer: All views stated are those of my own, and may not be the same as anybody elses - you are allowed to disagree... but be nice 
__________________
Please login or register to view this content. Registration is FREE :: DDS & Dedicated, UK & USA-based Please login or register to view this content. Registration is FREE, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2003)
|
|
|
|
04-10-2007, 06:37 PM
|
Re: ASP vs. PHP
|
Posts: 2
Name: Ben
|
As both an ASP and PHP coder, I thought I'd also share a few practical (and hopefully non-biased) thoughts on the subject.
First and foremost, I agree with Republikin and others: choose a language that suits you and you are comfortable with (remember that ASP has both VB Script, JScript, and other "languages" that you can choose from but most of the documentation out there will be for VB Script).
Second, read damien_ls' post above. He makes some great points. Notably: if you are new to MS programming, you may want to look at ASP.NET prior to ASP. Also, it's hard to not consider the incredible amount of open source code at your disposal if you go the PHP route. There are some excellent applications out there.
Ok, here are a few "everyday" type differences that might affect you if you choose ASP or PHP over the other for a particular site. I don't think any of them are real "deal breakers" but they may be helpful to know, and I don't think some of them have been mentioned yet.
A few "everyday" differences that I could think of:
1. ASP (and ASP.NET) provides native Unicode support (you can set the character encoding through the Session or page "codepage"). PHP does have a multi-byte string extension that can help you out if you use a language that requires Unicode characters and native Unicode support may be implemented in a future version (v6?). For (much) more detailed information on the subject see a Drupal CMS team member's blog post on the subject, and if you have no idea what I'm talking about or you only care about Western European languages, then great, no worries.
2. ASP's global.asa and Application object provide Application-scope variables, which can be useful. This isn't a huge deal for storing site-wide global variables (since you can always just include a config file at the top of every page), but it is a nice little feature if you want to cache data to memory on the server. PHP doesn't really have an equivalent, although either PHP or ASP will let you cache to disk.
3. PHP has the built-in ability to track user Session vars for user's without cookies enabled. ASP has ways to get around this (and ASP.NET provides a built-in method) through the use of custom programming or additional software tools, but PHP's is built in. (Relevance: Say you have a shopping cart that you want users to be able to access regardless of whether or not they have cookies enabled.).
Likely Different:
While both ASP and PHP will let you connect to several different database systems, you will most likely use MS SQL Server with ASP and MySQL (or PostreSQL, SQLite, etc) with PHP. You can swap either way, but these are the most common pairings because most shared and dedicated hosting providers provide these programming language / database pairs by default and because most of the documentation you will read will assume these pairings.
I realize this isn't a MySQL vs. MS SQL debate, but because of these common pairings you may also want to consider:
1. MySQL offers easy "paging" support (creating pages that give x number of results per page) using "LIMIT" while in MS SQL Server you're going to have to use a cursor, a stored procedure, or just loop through records in ASP until you get to the data you want (Dreamweaver uses this approach, ugh...)
2. MySQL has built-in full text search which is great for doing searches that are more complex than what "LIKE" and a few %'s can do for you. MS SQL Server also has full text searching if the full text indexing service is enabled, but you should note that some shared hosting providers don't provide this service and MSDE doesn't either.
3. As Learning Newbie states, there is a free version of SQL Server that you can use for databases < 4gb in size. For SQL Server 2000 this is called MSDE and for SQL Server 2005, it is called Express Edition. You should note that there are some limitations on these databases that are not imposed on the standard editions. For example, as stated above, MSDE doesn't have full text indexing support and while 2005 Express Edition does, it doesn't have the standard editions GUI tools to manage full text indexing that the other editions offer.
4. I believe as long as you have MySQL 4, you have full support for db transactions in PHP. As of MySQL 5, you can also create views and stored procedures (stored routines and functions) which can be very handy. MS SQL Server implements all of these.
Replies to previous posts:
1. Regarding Session variables on both sides... Both PHP and ASP have access to Session variables and both typically use cookies to track the user, but the actual data held in Session variables isn't stored in the Session cookie (the data is stored in memory or in text files on the server), only the Session Id's are held in the cookie.
2. With either custom 404 pages or an ISAPI filter, you can replicate mod_rewrite's search engine friendly URL's with IIS.
I hope this helps someone.
|
|
|
|
04-18-2007, 04:29 AM
|
Re: ASP vs. PHP
|
Posts: 5
Name: Rick Ralston
|
For the reasons below, I would recommend PHP over ASP.
Speed : PHP is faster and more stable than ASP. ASP is limited by COM-object model.
Cost : PHP runs great on Linux which is free, on the other hand ASP runs on the IIS Server (Internet Information Server) which needs Windows N.T/2000/XP, any of which costs a lot, especially when compared to the price of PHP, nothing.
Extras : In PHP, new components are often available for free but in ASP most new components have to be purchased.
Platform Support :PHP is cross-platform. It supports OS X, Win NT, Windows, Linux, BSD, Solaris, Unix etc. But ASP supports only Microsoft Windows with commercial adaptations for other platforms.
Here are some links for tutors below.
http://www.freeprogrammingresources.com/freephp.html
http://www.php.net/tut.php
http://www.goodphptutorials.com/
http://www.freewebmasterhelp.com/tutorials/php
http://www.freewebmasterhelp.com/tutorials/phpmysql
You can also refer the php manual for clarifications.
For PHP manual : http://www.php.net/docs.php
Hopefully, this will make your decision a little easier.
__________________
Please login or register to view this content. Registration is FREE -- Metrics You Can Count On
|
|
|
|
04-18-2007, 10:21 AM
|
Re: ASP vs. PHP
|
Posts: 147
Name: Martin
Location: London, England
|
Just because it's free, doesn't mean it's great for commercial purposes.
I can understand why a hobbyist would choose PHP. It offers all the support of the open source community plus plenty of free scripts and tutorials to get started with.
I never enjoyed studying ASP. It was a bit of a chore.
I personally use ColdFusion, which is by far the best that I've come across for my personal needs.
|
|
|
|
|
« Reply to ASP vs. PHP
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|