 |
|
02-19-2007, 03:00 PM
|
ASP vs. PHP
|
Posts: 19
Name: Rick Sonea
|
Does anyone recommend creating a website in ASP versus PHP? Which one is better and why? I want to learn how to create website but need a starting point. Should i take classes learning ASP or PHP? Hope someone can help!!
|
|
|
|
02-19-2007, 03:03 PM
|
Re: ASP vs. PHP
|
Posts: 5,199
Name: John Alexander
|
I recommend ASP.NET.
You don't need ASP or PHP to create a web site. You can use static html ( that would be the "technology" ) and Notepad ( that would be the editing application ) if you want to. What ASP/PHP do for you is create "dynamic" html, stuff that changes depending on whatever condition you like. That could be how much stock you have in the warehouse, or the phase of the moon.
If you have a Microsoft web server you use ASP or ASP.NET; if you have a Linux server you use PHP.
|
|
|
|
02-19-2007, 03:30 PM
|
Re: ASP vs. PHP
|
Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
Actually, you can use PHP on a Windows Server as well...it's just not a default install. But it does work.
As far as ASP goes, that's what I know (not .NET...that's the Newbie's dept.) If you're going to learn it, do NOT take classes. The code they teach and the way they teach it is outdated, archaic and just plain wrong in a lot of cases.
Major advantages to ASP:
It works and works well with Access databases. If you code it correctly, you can easily have a site that hits 6-digit page views per month with an Access backend. Mind you, you'll probably have to lean on chrishirst and I pretty heavily for that info.
It's not case-sensitive, so if you're someone who like me likes mixed case and ONce IN A WHile TYpes LIke THis, you're forgiven for it relatively easily.
It's easy enough to build custom subs and functions and classes (although I haven't messed much with classes) for whatever purposes you want.
There's a lot of documentation available for it now, contrary to popular opinion. Here are three good sites:
www.haneng.com
www.4guysfromrolla.com
www.asp101.com (good to learn from, but if you do well enough, you will outgrow these code samples).
As far as PHP is concerned...I really don't know the advantages because I can do everything I need to with ASP. So...I'll leave that to someone who actually KNOWS the answer there.
|
|
|
|
02-19-2007, 03:36 PM
|
Re: ASP vs. PHP
|
Posts: 609
Name: Mike
Location: United Kingdom
|
PHP is far more stable and uses MySQL which can do like 7 digit page views
It's very easy to get books and classes on, there is also loads of web documentation.
What more, it's cheaper to find a host to run it off (More people offer it on budget hosting)...or you can run a php environment (such as XAMPP) to tests your scripts on. ASP tends to cost on the £30 a month mark.
PHP is far more easy to program in, for example
PHP Code:
<?php include 'file URL.php'; ?>
includes a file...I shamefully do not know the ASP, but I do know it contains lots of % and stuff...and ASP is un-logical.
I don't mean to sound anti-mircosoft, but ASP is made by mircosoft who have not made a good OS (a maybe programs) in a long time...PHP is free (thats right free) and is made by linux people who fear sun light (Or so i have heard). I gotta say, sun light fearing people would be a lot more safer then mircosoft, cooler too 
__________________
PHP Code:
Add_Talkupation('rogem002'); // Because sharing is awesome!
Last edited by rogem002 : 02-19-2007 at 03:42 PM.
|
|
|
|
02-19-2007, 03:58 PM
|
Re: ASP vs. PHP
|
Posts: 406
Location: WebmasterGround.com
|
PHP is more popular than ASP. Almost all decent web hosting companies offer PHP. For ASP, there are fewer web hosting companies and in some cases, you have to pay extra to host an ASP website.
Also, there are far more free PHP scripts than they are of ASP.
PHP is the WAY to go. No doubt about it.
|
|
|
|
02-19-2007, 04:33 PM
|
Re: ASP vs. PHP
|
Posts: 5,199
Name: John Alexander
|
Adam gave good advice.
An ASP server-side include is as easy as the code posted here, except that people tend to only use one line for it. But server-side includes are a way of faking object oriented programming, which ASP.NET can do natively. That's really the biggest advantage for me, I used to use C++ in the early '90s, and now I can use C# and OOP.
ASP, both old and new, run on Visual Basic, which is about as easy as something can be and still be a programming language. You're not forced to use it, but a lot of people do, and there's an unlimited amount of support for the VB language.
Really though the second most important question is if you want to make a career out of this. A lot of low-rent web sites are made in PHP with a hodge-podge mix of downloaded scripts. I'm not saying there aren't good PHP sites, too, but when it comes to spam it's all PHP because PHP is cheaper. Most corporations use ASP or ASP.NET. If you want to be a professional web developer this is one way to go. If you want to make your site work and be done with it, well I still recommend ASP, but you should also consider PHP.
|
|
|
|
02-19-2007, 05:16 PM
|
Re: ASP vs. PHP
|
Posts: 143
|
PHP my scripting language of choice... I have dabbled in ASP and immediately quit, because I was not as comfortable with it.
I think both PHP and ASP are a bit complex for the beginner to start coding from day #1, and I would focus on learning HTML and CSS so you can learn how to create dynamic menus and proper page layouts.
If you don't learn the foundations of web design (HTML/CSS) then you will have a much harder time in the long run. Unless of course you plan on using a WYSIWYG editor for your entire life.... but what fun is that?
|
|
|
|
02-19-2007, 05:32 PM
|
Re: ASP vs. PHP
|
Posts: 19
Name: Rick Sonea
|
Thanks guys for the insight...I was also told that i should learn html. Do you recommend taking classes to learn html or just buying the books and programs i need?
|
|
|
|
02-19-2007, 05:51 PM
|
Re: ASP vs. PHP
|
Posts: 5,199
Name: John Alexander
|
For memberpro - I get an error message saying "You must spread some Talkupation around before giving it to memberpro again."
For AutoShopLinks - it depends on your learning style. Some people learn best by having a book, and reading it cover to cover. Others learn by getting their hands dirty. Which are you? That should tell you if you need the book or not.
You already have the software to make and test html, in fact, this is probably the easiest software in the world. So if you're a "tinker with it" kind of learner, then all you need to do is make a text file, put html tags in it, save it, and open that file in your web browser. Then make some changes in your text editor, hit save, and refresh your browser to see them. If you can keep doing that until you master it, then you don't need books, but if that's not your style, maybe some texts would be useful.
Also you can look at the html behind this page by doing a view source, and see what ideas other people use.
|
|
|
|
02-19-2007, 06:33 PM
|
Re: ASP vs. PHP
|
Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
There is a misconception that I've noticed and one semi-misconception.
Misconception: ASP costs in the 30 pounds per month range. I don't know where you're looking at Windows hosting, but it's not even CLOSE to that for solid ASP hosting.
www.sectorlink.com
www.webhost4life.com
Those are just two with plans WELL below the 30 pounds per month range.
Semi-misconception: there are plenty of scripts available. The major pro with a script is that it's already coded for you, and the major con with a script is...that it's not necessarily coded for you (or to be more accurate, what your application is.) Scripts usually have to be tinkered with, retrofitted, deconstructed, reconstructed, and by the time all of that's done, you spend more time in 98% of cases doing that than you do just coding from scratch or coding with your own subs and stuff. So scripts aren't always (translation: aren't usually) a good idea.
In my case (and this doesn't apply to others, so I don't count it as a pro), I've also coded 2700 lines of custom ASP subs and functions that I can call whenever I want to cut down on development time. So for me personally, PHP would be almost useless to pick up at this point...then again, I started 7 years ago when ASP, CGI, and Perl were the only games in town (and the latter two are like nuclear quantum physics to me.)
|
|
|
|
02-19-2007, 09:45 PM
|
Re: ASP vs. PHP
|
Posts: 377
Name: Venkat Raj
Location: Salem, South India
|
Well another interesting thread. But this time i am going say somthing against Adam.  I preferred PHP coz i am familiar with C / C++ Programming, though i now VB and delveloped some desk top applications with VB.
PHP and It's advantages.
1. First Things First. Its FREE
Development tool :
ASP/SQL Server : $0–2499
ColdFusion MX/ SQL Server : $599
JSP/Oracle : $0–~2000
PHP/MySQL : $0–249
Server :
ASP : $999
ColdFusion : $2298
JSP : $0–~35,000
PHP : $0
RDBMS :
ASP : $4999
ColdFUsion : $4999
JSP : $15,000
PHP : $0–220
2. Ease of Use
3. HTML Embeddedness
4. Cross platform compaitability
Work on UNIX Flavors
AIX, A/UX, BSDI, Digital UNIX/Tru64,
FreeBSD, HP-UX, IRIX, Linux, Mac OS X,
NetBSD, OpenBSD, SCO UnixWare,
Solaris, SunOS, Ultrix, Xenix, and more
And Works on Windows Flavors
Windows 95/98/ME, Windows NT/2000/XP/2003
Web servers Apache, fhttpd, Netscape IIS, PWS, Netscape, Omni
5. Unlike Cold Fusion, Not Tag Based.
6. Stability
Quote:
|
In a two-and-a-half-month head-to-head test conducted by the Network Computing labs in October 1999, Apache Server with PHP handily beat both IIS/Visual Studio and Netscape Enterprise Server/Java for stability of environment.
|
7. Speed.
Quote:
|
many small benchmarks suggest that PHP is at least as fast as ASP and readily outperforms ColdFusion or JSP in most applications.
|
8. Many Extensions
9. Fast feature development
10. Popularity
11. Not Proprietory
Quote:
|
It is not tied to any one server operating system, unlike Active Server Pages. It is not tied to any proprietarycross-platform standard or middleware, as Java Server Pages or ColdFusion are.
|
12. Strong user communities
All be above features are listed by Tim Converse (Tim boy), Yahoo Search Engineer, but left yahoo last year in dec., and author of PHP5 and MySQL Bible.
Last, but no least.
Quote:
|
Originally Posted by Tim
This is where old-school ASP developers invariably say, “PHP sucks!” They think ASP session variables are magic. Not to burst anyone’s bubble, but Microsoft is just using cookies to store session variables—thereby opening the door to all kinds of potential problems.
|
13. Many stable, OS scripts like, OSCommerce, Drupal, IBP, etc
I don't find anything against these features and advantages, so i prefer PHP.
__________________
All the Buddhas of all the ages have been telling you a very simple fact: Be -- don't try to become.
|
|
|
|
02-19-2007, 10:15 PM
|
Re: ASP vs. PHP
|
Posts: 3,191
|
Quote:
Originally Posted by AutoShopLinks
Thanks guys for the insight...I was also told that i should learn html. Do you recommend taking classes to learn html or just buying the books and programs i need?
|
I learned with this tutorial... http://www.mcli.dist.maricopa.edu/tut/ ...when I was 16. It may be a bit dated but the fact that it is still around is a testament to it's effectiveness in teaching HTML.
As far as ASP vs. PHP. You will hear many zealots on either side however, what it really comes down to is what you feel comfortable with and what your willing to make a major investment in time, money and other factors with. Either are capable of producing very similar results. Most just prefer PHP because it's not a Microsoft product however, this does not inherently make it [ASP] a bad choice.
Last edited by Republikin : 02-19-2007 at 10:16 PM.
|
|
|
|
02-19-2007, 10:29 PM
|
Re: ASP vs. PHP
|
Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
I don't mind anyone toting PHP. If you prefer it, that's fine. But what bothers me is when misinformation or outdated information is presented about ASP from people who either don't use it or don't understand it.
ASP session variables are the same as PHP in that the decrypted value for both are stored server-side, NOT client side. If you want to see this for yourself, visit an ASP site and run a tool such as ieHTTPHeaders. It will show you exactly what session IDs go back and forth. So that's wrong.
The speed test may be misleading as well. It was done in 1999 and probably wasn't done using optimized code on at least one of the languages tested. ASP, for example, will not perform anywhere near as well using the scripts from, say, a tutorial site vs. code that has been optimized for speed and resource consumption. The same PROBABLY (I say probably because I truly do not know) holds true for the other three languages compared as well.
Not only that, the testing of resource consumption for a language can only be fairly measured if the same server is used for all four languages. By server, I mean CPU, HD, RAM, OS, hardware installed, software installed, the whole 9 yards. Apples to apples and all that.
This isn't designed to knock PHP. I won't knock PHP or post things about it that I haven't tested myself. I'm just trying to clear up some misconceptions, that's all.
|
|
|
|
02-19-2007, 11:30 PM
|
Re: ASP vs. PHP
|
Posts: 377
Name: Venkat Raj
Location: Salem, South India
|
Adam, I feel sorry, if i have posted misinformation about ASP. I have to agree one thing, I DO NOT KNOW ASP. The book was released after PHP5 release, so i thought that it was correct.I have clearly stated that all the features are listed by Tim. Not by me. I preferred PHP. Because it has C like syntax. Another three important factors for my decision are cost, cross platform computability and OS packages with community support.
__________________
All the Buddhas of all the ages have been telling you a very simple fact: Be -- don't try to become.
Last edited by Kirtan : 02-19-2007 at 11:32 PM.
Reason: add content
|
|
|
|
02-20-2007, 02:19 AM
|
Re: ASP vs. PHP
|
Posts: 3,024
Name: Forrest Croce
Location: Seattle, WA
|
In the interest of clarity, I want to address some of these points:
Quote:
Originally Posted by Kirtan
Well another interesting thread. But this time i am going say somthing against Adam.  I preferred PHP coz i am familiar with C / C++ Programming, though i now VB and delveloped some desk top applications with VB.
|
The one you're more comfortable in is probably one of the better reasons to go with a particular technology. But you can use C# to write ASPx code.
Quote:
Originally Posted by Kirtan
- 1. First Things First. Its FREE 
|
Well this could be misleading, too. ASP itself is free, it just comes bundled with things ( either an O/S license or a colo server ) that often cost a little more using Microsoft. I'm paying $6 a month to host my personal web site on linux, and $8 to host an IT one on WinServ03 with IIS 6.
Quote:
Originally Posted by Kirtan
Server :
ASP : $999
ColdFusion : $2298
JSP : $0–~35,000
PHP : $0
|
This one I don't understand at all. If you're talking about the software costs, ASP is an environment IIS provides, and IIS comes with Windows. XP Pro is around $200 and Server '03 is more like $500 for a small business.
Quote:
Originally Posted by Kirtan
RDBMS :
ASP : | | |