View Full Version : PHP or ASP.Net?
Ok, what is better in your opinion - PHP or ASP.Net? Provide a reason for your answer :)
Originally posted by Greg
Ok, what is better in your opinion - PHP or ASP.Net? Provide a reason for your answer :)
PHP is free, open source, non proprietary, and so horribly wonderful. anything .NET is automatically inferior to everything else.
--Petey
Specialagentjim
07-06-2003, 19:42
Professional or Personal stand alone websites: Normally PHP, as its free, open source, yada yada yada.
However, ASP.NET does have its advantages. Such as its tight integration with Active Directory and some of its new uses which haven't been published too much.
I'm not saying one's better than another, I'm just saying they have their own uses.
Personally, I develop for asp.net, but thats mainly because my office uses it so thats what I taught myself. (Gov't tends to like going m$, they just find it easier than trying to figure out a whole new OS [linux]. However, we are going to move to php and MySQL within the next few years for our new projects, mostly as a proof-of-concept for the state of florida gov't system. We'll proboly implement it first, and from there [as long as we do it well] it should spread throughout the state fairly easily).
AJ Quick
07-06-2003, 19:59
PHP totally wins over anything out there. Barely no one uses ASP, and that is for a reason.. it is terrible.
Raven_Writer
07-06-2003, 20:27
Originally posted by AJ Quick
PHP totally wins over anything out there. Barely no one uses ASP, and that is for a reason.. it is terrible.
I'm with AJ on this....I use ASP on Brinkster...for the only reason Brinkster doesn't support PHP.
If my host would allow Windows 2000 server users PHP, then I'd not be contacting Tech Support all the time.
PHP also has more easier syntax in my opinion.
A simple difference:
PHP Text Output:
<?php echo("text here");?>
ASP Text Output:
<% response.write("text here");?>
Also, in ASP, you have to do something like <%response.write("asdfasdf" & non_text_data & ".")%> Where as in PHP, you can just do <?php echo("Data variables allowed in quotes");?>
...............
07-06-2003, 20:46
Gov't tends to like going m$, they just find it easier than trying to figure out a whole new OS [linux].
And also main programs that they use ie Oracle Software would be expensive and painful to upgrade licenses and Computers etc.
back to the topic PHP mainly becasue of OpenSource and Simplicity.
Well, I tried both PHP and ASP before, and I kinda like PHP better myself :) One more question: how to use classes in ASP.Net code on Brinkster? If I just put them with the rest of the code like this
<script runat=server>
Sub Page_Load()...
End Sub
...
Class MyClass
...
End Class
</script>
It puts the class inside the page main class, and usually this screws things up. And codebehind does not work on Brinkster. I tried using the <%@ Assembly %> directive too... :(
Raven_Writer
07-06-2003, 20:57
Originally posted by Greg
Well, I tried both PHP and ASP before, and I kinda like PHP better myself :) One more question: how to use classes in ASP.Net code on Brinkster? If I just put them with the rest of the code like this
<script runat=server>
Sub Page_Load()...
End Sub
...
Class MyClass
...
End Class
</script>
It puts the class inside the page main class, and usually this screws things up. And codebehind does not work on Brinkster. I tried using the <%@ Assembly %> directive too... :(
Beats me really, I just use functions, no classes or whatnot. (That's why all my sites from them are dull).
Alfred Thompson
08-06-2003, 22:14
.NET Rocks! I've seen PHP and it is ok but you can do so much with .NET. And you can program your site in Visual Basic .NET, C#, J#, C++, what ever. THe Visual Studio .NET IDE is the best I have ever worked with. But then I've only been programming for a little over 30 years. :-)
I like .NET so much that I went and got a job at Microsoft. But I liked .NET for years before I made the move.
seanwitte
09-06-2003, 13:03
Its not really a valid comparison. PHP is better than old-school ASP, but ASP.NET is an enterprise-capable framework for distributed applications. Its competitor is J2EE, not PHP so much. I can see why you would like PHP over ASP.NET, but there are some killer development tools available for .NET. For the last few years I've been working on a product in VB that uses ASP as the presentation layer. The improvements in .NET are unreal, but ASP still has a place for simple web sites.
Heres an implementation of echo for ASP:
<%@ Language=VBScript %>
<SCRIPT LANGUAGE="Javascript" RUNAT="SERVER">
var ECHO_TOKEN = '%d';
//-------------------------------------------------------------------------
// FUNCTION: echo
// PURPOSE: Writes a message to the Response stream that contains
// embedded data elements to avoid concatenation.
// ARGUMENTS: text - message string to output. embedded tokens
// will be replaced by the non-formal arguments
// passed to the function at runtime, in order.
//-------------------------------------------------------------------------
function echo(text)
{
_echoHelper(text, ECHO_TOKEN, echo.arguments);
return;
}
//-------------------------------------------------------------------------
// FUNCTION: echobr
// PURPOSE: Writes a message to the Response stream that contains
// embedded data elements to avoid concatenation, with an
// extra break tag at the end.
// ARGUMENTS: text - message string to output. embedded tokens
// will be replaced by the non-formal arguments
// passed to the function at runtime, in order.
//-------------------------------------------------------------------------
function echobr(text)
{
_echoHelper(text, ECHO_TOKEN, echobr.arguments);
Response.Write('<BR>');
return;
}
//-------------------------------------------------------------------------
// FUNCTION: _echoHelper
// PURPOSE: Parses a string and replaces token values with elements
// in the args array in order. Index 0 of the array is not
// included. Performs operation without concatenations.
// ARGUMENTS: text - message string to output. embedded tokens
// will be replaced by the non-formal arguments
// passed to the function at runtime, in order.
// token - replacable string
// args - array of values to insert into text
//-------------------------------------------------------------------------
function _echoHelper(text, token, args)
{
var start = 0;
var finish;
var i;
for (i=1; i<args.length; i++)
{
finish = text.indexOf(token, start);
if (finish >= 0)
{
Response.Write(text.substring(start, finish));
Response.Write(args[i]);
finish = finish + 2;
start = finish;
}
}
Response.Write(text.substring(start, text.length));
return;
}
</SCRIPT>
<HTML>
<HEAD>
</HEAD>
<BODY>
<% dim ip: ip = Request.ServerVariables("REMOTE_ADDR")
echo "This page was requested on %d from IP %d at %d", Date(), ip, Time()
%>
</BODY>
</HTML>
I myself use PHP all the time. Its a simple language that has great integration with mostly any type of SQL server. I have a PHP and web serverr urnning off my computer here right now, it was on windows and now is on linux. I also have a coulple of other places where I use PHP, such as on scriptlance (to bring in some online cash) and helping my friend with his site, plus it's also juts fun to goof around with.
php. why? asp (not going into .NET here) is propreitary, doesn't run on anything but IIS (which means it inherently has security holes) and the syntax is extremely convoluted. i tried learning ASP a while ago, and it set me off the track of hypertext preprocessors (i started using perl for everything. recently discovered that php was alot better for alot of things i was doing.) not to mention that php has unparallelled integration with SQL. like asp, php also has a company behind it (zend) that is pushing development and keeping it organized, but at least zend isn't a coporate money-hogging control freak. :D
seanwitte
10-06-2003, 09:42
Originally posted by AlbertW
asp (not going into .NET here) is propreitary, doesn't run on anything but IIS (which means it inherently has security holes)
I didn't know Chili!Soft was bought by Sun, but there you go. I haven't read much lately, but if Mono works there will be an OSS implementation of the CLR as well. This will run on Apache and Sun ONE.
http://wwws.sun.com/software/chilisoft/index.html
blueWarrior
10-06-2003, 10:11
PHP totally wins over anything out there. Barely no one uses ASP, and that is for a reason.. it is terrible.
Wow, you are very out of line. I am a PHP, ASP and VBScript programmer.
You have to remember that PHP is only for small individual projects, whereas ASP is a professionals language, honestly speaking here guys.
Here is a quote from a man who is heavily involved in PHP.
ASP.NET technology is better than PHP technology.
Read the blog article:
http://www.edwardbear.org/blog/archives/000189.html
So basically it IS a good language. Easy to learn, powerful etc. but if you want something that is universally used, powerful, extendable and PROFESSIONAL check out ASP.NET.
MS has powerful and easy to use OS's and languages sure...but thats only when they actually work. ;) :p
Brandon Martus
10-06-2003, 10:25
Originally posted by blueWarrior
You have to remember that PHP is only for small individual projects, whereas ASP is a professionals language, honestly speaking here guys.
Tell that to all of the professionals working at my company on a successful large-scale PHP software package.
Dave Flowerday
10-06-2003, 10:52
Originally posted by blueWarrior
You have to remember that PHP is only for small individual projects, whereas ASP is a professionals language, honestly speaking here guys.
Uh oh, somebody better contact Yahoo and let them know that PHP is only for small individual projects! ;)
Internet giant Yahoo has picked PHP over alternatives like Java, ASP.Net and Perl for its server-side programming (http://www.vnunet.com/News/1136556)
Ok, interesting to see where this discussion went :) And by the way, there is a way to run asp on Apache on Linux. I dont think that program is open-source though.
Brandon Martus
10-06-2003, 17:30
Originally posted by Greg
Ok, interesting to see where this discussion went :) And by the way, there is a way to run asp on Apache on Linux. I dont think that program is open-source though.
Might you be talking about mod_mono (http://freshmeat.net/projects/mod_mono/?topic_id=92%2C250) ?
blueWarrior
10-06-2003, 17:44
Originally posted by Brandon Martus
Tell that to all of the professionals working at my company on a successful large-scale PHP software package.
I didn't say there was NO professional using PHP. There ARE many companies specifically geared to the deployment of PHP.
On a general level most companies, at the moment, believe that ASP is the professional way of doing things. That is what I have seen from my interaction with many companies.
Martus what company do you work for and what are they currently developing?
Originally posted by blueWarrior
I didn't say there was NO professional using PHP. There ARE many companies specifically geared to the deployment of PHP.
On a general level most companies, at the moment, believe that ASP is the professional way of doing things. That is what I have seen from my interaction with many companies.
Martus what company do you work for and what are they currently developing? The webmaster for the website of a major RAGE sponsor chose to use ASP, IIS, and Frontpage over other web technologies. His reason for using the aforesaid technologies is they--the technologies--are backed by a major software company, the integration between HTML and script is excellent, and website deployment is incredibly easy.. some companies think ASP is the "professional" way of doing things, not necessarily the most efficient, or the most cost effective way. You should understand the politics involved in any company wide decision. Companies use ASP over other languages for the same reason they use an oracle database over MySQL, or a $500 wireless access point over a $200 one: thats just the way things are.
Please note, however, that my comparisons do not reflect which languages/technologies I think are better. I still believe personal preference should factor into language choices...
blueWarrior
10-06-2003, 18:26
Those are basically some of the reason's why I BELIEVE in ASP. But like I said most of my personal projects are done in PHP, so I prefer PHP.
"some companies think ASP is the "professional" way of doing things, not necessarily the most efficient, or the most cost effective way. You should understand the politics involved in any company wide decision. "
Exactly. I was trying to make the point that even though it isn't the most efficient language it is still an important language to many people.
Again note that I never said anything of efficiency or power :p
Brandon Martus
10-06-2003, 18:47
Originally posted by blueWarrior
Martus what company do you work for and what are they currently developing?
I work for Chimes, Inc. (http://www.chimesnet.com), a wholly owned subsidiary of Computer Horizons Corporation (http://www.computerhorizons.com/).
marketing blurb: Chimes, Inc. provides workforce procurement and vendor management services to Global 1000 companies. Through scaleable, web-based software, Chimes administers the entire hiring cycle to identify, leverage and manage the enterprise-wide spend on human capital. More is on the website, if you are really interested.
NOTE: Both sites listed above were created by CHC's marketing department, and the design/technology used on it is in no way related to our actual product or the technology used in it. :) I don't want to hear anything about the CFM & Flash not being the PHP I was talking about above...
PHP and ASP.net are both good.
Simply speaking, PHP is easier to learn (IMO because of the absolutely MASSIVE number of free scripts available, as well as the easy to access, complete documentation).
ASP.net is no more "professional" or "industrial-strength" than PHP. The computer language you choose to write in is mostly a personal preference. Its like eating with either a soup spoon or a tablespoon. They are both spoons and they both get the job done. :D
Personally, I think ASP.net has won the MARKETING war, but not so much the technology side of things. PHP and ASP.net are both equally suited for serious corporate use, insofar as they both allow you to create large, complex, "enterprise-ready" applications. (Which brings up the question of what exactly constitutes "enterprise-ready". Neither language has any real advantage over each other, as they both have rather large featuresets.)
So in the end, I'd just look at cost/benefit, and pick PHP. :D And even better is that so many people use PHP that its almost impossible not to find someone to ask questions to when you get conused.
Alfred Thompson
11-06-2003, 22:29
A couple of things about ASP .NET. One is that it is still pretty new compared to PHP. So we'll see in the long run. Also ASP .NET is not a language but an under laying system. If you want to program using ASP .NET you have a choice of languages. In fact you can create a class in one language (say VB .NET) and use it to write a program in C++ or C# or J# or one of I think 15 other languages. So comparing it to PHP is not quite apples and apples.
Also the company that makes ASP .NET is a big sponsor of FIRST. It seems to me there was a Microsoft logo on display at every FIRST event. So they can't be all bad can they?
Raven_Writer
12-06-2003, 11:52
Originally posted by Alfred Thompson
...Also the company that makes ASP .NET is a big sponsor of FIRST. It seems to me there was a Microsoft logo on display at every FIRST event. So they can't be all bad can they?
Microsoft's logo was on every banner on the screens at GLR, Pittsburgh, and Houston.
M$ is all in it for the money, and has continous updated on XP Home (which is good and bad).
I still say PHP is better....espicially if you know C++.
Alfred Thompson
12-06-2003, 17:35
Microsoft is not all "in it" what ever that means for the money. I know a lot of Microsoft people, including some of the ones responsible for FIRST getting money, and being in it for the money is not why Microsoft contributes to FIRST. Or does a lot of other things either.
Did you know that Microsoft is the largest corporate contributer to charity in the country? Did you know that Microsoft employees contribute 25% of all the blood donated in the Puget Sound area? And there is more.
You think you know Microsoft because of what people who hate Microsoft tell you and they're often wrong. It's a good company with a lot of good people working there.
Originally posted by Joel J.
The webmaster for the website of a major RAGE sponsor chose to use ASP, IIS, and Frontpage over other web technologies. His reason for using the aforesaid technologies is they--the technologies--are backed by a major software company, the integration between HTML and script is excellent, and website deployment is incredibly easy.. some companies think ASP is the "professional" way of doing things, not necessarily the most efficient, or the most cost effective way. You should understand the politics involved in any company wide decision. Companies use ASP over other languages for the same reason they use an oracle database over MySQL, or a $500 wireless access point over a $200 one: thats just the way things are.
Please note, however, that my comparisons do not reflect which languages/technologies I think are better. I still believe personal preference should factor into language choices...
i think this has it just about right as far as why ASP seems like a good choice
personally i would use php over asp (although i know niether much) but if i had a choice i would use perl over anything anyday unless the application specifically required a lot of computationaly intensive tasks that did not deal with text but then web stuff isnt supposed to be cpu intensive... and just in case one can always embed perl in c/c++ and the other way around (perl has dynamic loader of compiled C (and other languages) objects which is very usefull)
the reason for choosing php over asp is the whole opensource thing.. i'm sure microsoft has put quite a bit of work into this whole asp/.net business and that it works very well but it feels nice knowing that if i need help with php, i can seek it from thousands of excellent php users that know everything that there might be there to know and probably encoutered the problems i am facing on their own... these people use the language and want to improve the language... it is as if i'm trying to say that there is sort of a "community" or culture among the open source / free software that proprietary technolgies just dont create
Alfred Thompson
12-07-2003, 09:30
the reason for choosing php over asp is the whole opensource thing.. i'm sure microsoft has put quite a bit of work into this whole asp/.net business and that it works very well but it feels nice knowing that if i need help with php, i can seek it from thousands of excellent php users that know everything that there might be there to know and probably encoutered the problems i am facing on their own... these people use the language and want to improve the language... it is as if i'm trying to say that there is sort of a "community" or culture among the open source / free software that proprietary technolgies just dont create
Actually there is quite a community around Microsoft products. You should visit the Microsoft.public news groups or sites like www.gotdotnet.com. There are all sorts of people there willing to hep people with problems. One advantage of a commercial program is that if there are bugs found someone one will be paid to fix them. With open source one either has to be knowledgeable and have time enough to fix a bug or hope that someone else will.
Stephen Kowski
12-07-2003, 21:03
just to clear up any misconception ASP and ASP.NET are two COMPLETELY different things....the fact that they interact with server components and a similar style of language (assuming u don't use C#). ASP is a scripting language(much like PHP), but the ASP.NET technology is a completely object oriented language.
Comunities? wow ok.... www.codeproject.com www.aspalliance.com www.gotdotnet.com I could keep going but i have other things I need to be doing.....I have tried PHP (successfully I might add) and ASP along with the new .NET technologies....you're pages load faster due to precompiled code, controls have the ability to autopostback to the same page seemlessly, etc etc....there are so many advantages to .NET i can only begin to name them....With Server 2003 it is disgusting how powerful .NET is.
For you ppl that like C++....is php better? hahaha that's funny because Microsoft has released both Visual C++.NET and C#.....now what is easier for a c++ developer staying in the existing language or having to learn a derivative like Pearl....?
P.S. for all you M$ haters out there is the mono project to bring the .NET Framework to Linux (so someone in that community seems to believe in it...)
Raven_Writer
13-07-2003, 10:51
Originally posted by Stephen Kowski
just to clear up any misconception ASP and ASP.NET are two COMPLETELY different things....the fact that they interact with server components and a similar style of language (assuming u don't use C#). ASP is a scripting language(much like PHP), but the ASP.NET technology is a completely object oriented language.
Comunities? wow ok.... www.codeproject.com www.aspalliance.com www.gotdotnet.com I could keep going but i have other things I need to be doing.....I have tried PHP (successfully I might add) and ASP along with the new .NET technologies....you're pages load faster due to precompiled code, controls have the ability to autopostback to the same page seemlessly, etc etc....there are so many advantages to .NET i can only begin to name them....With Server 2003 it is disgusting how powerful .NET is.
For you ppl that like C++....is php better? hahaha that's funny because Microsoft has released both Visual C++.NET and C#.....now what is easier for a c++ developer staying in the existing language or having to learn a derivative like Pearl....?
P.S. for all you M$ haters out there is the mono project to bring the .NET Framework to Linux (so someone in that community seems to believe in it...)
Isn't hating M$ just a persons opinion? I don't think it should reflect on how well M$ is doing, or if some guy is making a conversion of .NET Framework to the Linux O/S. I personally like PHP over ASP mainly because of the simplexity. In php, u don't have to create objects to open file, you just using something like fopen("hi.txt"); (I'm not sure if that's correct, but I'm just making a point).
Technically, PHP isn't dependent on a particular language either. I mean, uou could write a bytecode compiler that'd parse C or whatever you wanted. What is actually executed is the bytecode anyway. But whats the point? ;)
As to speed, PHP is disgustingly fast EVEN THOUGH its uncompiled. When you parse a 5 megabyte file, and then run several thousand MySQL queries in under 7 seconds, I don't think I'm going to worry all that much about losing performance because its uncompiled.
As to the lack of community. I guess I was wrong. Maybe the forums I frequent just have more helpful PHP people. Umm, but at the same time, my experience is alot of ASP scripts cost money, whereas PHP has a rather large number of freeware scripts. Just what I have seen though.
Leon Machado IV
14-07-2003, 20:41
Coming into this discussion, does anyone know a good way to learn PHP? Email me at lmachadoiv@inspirationinc.org or post here, thanks.
get your hands dirty. php.net (the official php site) has a disturbingly detailed manual. get to know it.
also, i suggest looking at other people's code. and also maybe learning some basic programming if you haven't already. outside of that, a simple google search for php tutorials should get you quite a few good tutorials.
Raven_Writer
22-07-2003, 19:04
Originally posted by HFWang
get your hands dirty. php.net (the official php site) has a disturbingly detailed manual. get to know it.
also, i suggest looking at other people's code. and also maybe learning some basic programming if you haven't already. outside of that, a simple google search for php tutorials should get you quite a few good tutorials.
http://www.hotscripts.com (I think it is) has a lot of open-source and pay-to-use scripts for a vary of languages.
Learn a lil' of C/C++ and JavaScript if you wish, PHP is like those to combined IMHO.
Alright,
I have to stickup for ASP.NET. I got involved with for my senior software project and basically I became a believer. My background includes a lot of VB, there for using ASP.NET (even more so than ASP) allowed me to leverage my existing knowledge base in VB and create very rich web applications. This was a huge plus of ASP.NET for me. I've since picked up C# and now frequently finding myself switching back and forth between the two which is a big plus of .NET it doesn't matter what you write it in you can even use a Java-like language heck there are even perl.NET implementations.
Another big advantage of .NET is the ability to create rich multi-page, applications with your own user controls, code behind, etc. As I did with my project, or as I've done on my website very simple single page only .aspx pages. Also .NET lets you leverage existing web technology for example applying a style sheet to the rich .NET Web Controls. .NET has been really easy for me to pickup and it doesn't require anything more than two free downloads to get started so it is free as well. The Framework, IIS (comes with windows), and WebMatrix (asp.net) are all you need.
If you are looking for hosting I use www.discountasp.net they offer every ASP/.NET related service possible including the ability to publish directly from VS.NET something lacking at most other .NET hosts. It costs $90/yr and I like that because you only have to think about the payment once a year and not worry about it the rest so that comes out to what about 7.50 a month which is really good for all the features they offer.
So Go ASP.NET ;-)
-Justin
Raven_Writer
24-07-2003, 12:02
AffinityHosting.net is also pretty good (not sure if they Support .NET...but tech support is speedy......:|)
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.