Jump to content
Science Forums

PHP vs ASP.NET - which is better


TINNY

Recommended Posts

  • 3 months later...

If you're worried about the price there is a free web devlopment tool for asp.net here called Web Matrix. Doesn't quite have the functionality of VS.Net but it's better than notepad. You'll also need the .Net Framework to develop in .Net but you can get that for free on Microsoft's site.

Link to comment
Share on other sites

I have replied to a similar discussion, but it was on my other account (this one seems to work fine, but the other one seems to have a lot of problems). I also can't beleive that i did not see this one before, I shold have replied earlier...

buthere:

Quote of myself (not a direct quote but close) "

PHP would be my answer. There are a number of reasons why, so here:

PHP vs ASP vs Java vs Flash vs ColdFusion

PHP's main advantage is that it is FREE, and free is good. PHP supports all plartorms, and can be installed on any platform that being windows, linux, mac, unix, bsd, sun os and every server unlike ASP and flash. PHP does not have to be compiled, unlike ASP, Java, and Flash you can at any time change any part of your code in a matter of opening the file in a text editor(any), modifying it and saving your changes and your code and page is updated.

Lets go through the process that you have to go trough with ASP, find a computer with asp compiler, find your code file, modify it, compile it and then put it on the server overwriting the previous file.

ASP.net is junk, in fact all .net based programming languages are (except maybe for VB.net which the entire .net thing was made for), you cant run the programs compiled in .net unless you have a .net platform installed on your computer, as to webpages, as freethinker said you can't view them in Mozilla, Opera or any older version of Netscape.

The problem with flash seems to be in that anybody that does not have flash player installed on their computer can not view your website, hense you loose potential viewers.

ColdFusion Lacks standard and security. Java is great, but it is a hard language to learn, and there is nothing you can do in java, that you cant do in PHP which is not as strict on its synthax.People when speaking of java seem to talk a lot about applet programming and script, Java and JavaScript are two totally, and entirely different programming languages who'se only similarity is in synthax. Main difference being Javascript is a client side programming language and Java is a server side one, big, big difference.

JS's isa client side scripting language and it serves a different purpose than PHP, client side means all your code is visible, + if you use a browser that does not support JS, you cant see any contents; so browsers like Opera and XWeb are automatically out and if i go into my IE options or Netscape options I can always turn JS off, beacause you can use JS to automatically download a virus onto your system. Java is a totally different story, i wont discuss it here, but it is one of those languages that comes close to PHP, and differs only in speed;PHP is faster and more efficient.

So PHP vs. ASP:

 

________________PHP4________PHP5__________ ASP

Software Price ____ free ________free __________ free

Platform Price _____ free _______ free ___________ $

Speed ___________ fast _______ fast __________ slow

Efficiency ________ very _______ very ________ not efficient

Rescources Needed_ few _______ few __________ lots

Security _________ secure ____ secure _______ secure

Platform __________ all ________ all ______ win32 IIS mainly and Apache recently

Open Scource _____ yes _______ yes ___________ no

exceprion handling _ no _________ yes __________ yes

OOP support ____ not strong ____ full ___________ full

 

Another thing that you might consider is Database, and although I am not a specialist in that area, but PHP's uniqueness is also in that PHP is almost a part of a database server, if in other languages Database support is written in addon functions (dlls), PHP's is written in the engine itself, Database almost feels like PHP is a part of it, and thus the speed of their communication is a lot higher than that of ASP and MsSQL's and Oracle and Java's (i think that the advantage is in that the data that is received does not have to be translated, but as i said i'd have to research) MySQL is said to be twice as fast as MsSQL, and new SQLight which come

Link to comment
Share on other sites

I agree that php and mySQL is an incredibly strong combination. Programs like phpnuke offer incredible possibilities.

 

You don't compare ColdFusion, pricewise, but often people claim that it is expensive. You could argue, though, that price-wise you can use ColdFusion for the same money that you can use php. If you buy a hosting account with ColdFusion and mySQL, for example, there is no need to buy ColdFusion since the developer edition is free. You can develop ColdFusion pages using free tools. (I guess I have no need to hide that I am a ColdFusion buff, since I've been using it since 1995). As you mention, MySQL is free. But - if you get a hosting plan with MS SQL Server you don't need to buy the dev tools there, either. The MSDE (Microsoft SQL Server Desktop Engine, if I remember correctly) is free for development use, as are the client tools (Enterprise Manager). Also, ColdFusion runs on both MS and *NIX servers. There is also BlueDragon, which is a free version of the ColdFusion environment (I have never tried it, so I can't say if it is any good).

 

I think the shortest learning curve would be ColdFusion and Access rather than php and MySQL - but Access is not exactly a choice product for web usage, and it requires Windows. Access is good for learning SQL, though, but that is about the only upside when you compare it to MySQL. So I am not going to challenge the preference of php over ASP.NET.

 

However, Alex, you write: "ColdFusion Lacks standard and security."

 

What is your reason for stating this? You don't back it up with anything, you simply state it as fact.

 

Tormod

Link to comment
Share on other sites

PHP is commonly said to be faster and more efficient for complex programming tasks and trying out new ideas. PHP is generally referred to as more stable and less resource intensive as well. Cold Fusion has better error handling, database abstraction and date parsing although database abstraction is addressed in PHP 4. Another thing that is listed as one of Cold Fusion's strengths is its excellent search engine, but it has been mentioned that a search engine is not something that should be included in a web scripting language. PHP runs on almost every platform there is; Cold Fusion is only available on Win32, Solaris, Linux and HP/UX. Cold Fusion has a good IDE and is generally easier to get started with, whereas PHP initially requires more programming knowledge. Cold Fusion is designed with non-programmers in mind, while PHP is focused on programmers.

 

Quote from here

 

 

 

"

However, as an experienced web developer, I appreciate the nuts-and-bolts feel of PHP. Sometimes Cold Fusion hides too much of the detail. In fact, there are certain constructs in CF that seem obfuscatory. For example, CF has its own syntax for creating a web form. Unfortunately this syntax is not simpler than just using straight html, so learning the CF form syntax could in fact prevent a new web programmer from learning the easier html syntax. On the other hand, there is nothing in Cold Fusion that prevents you from simply using the html form syntax.

 

 

The one thing I really miss, however, when using CF instead of PHP, is the wealth of free examples and help that are abundant for PHP. There is nothing remotely similar for Cold Fusion. Because PHP is inherently open (because it’s free), there are tons of examples on the web to help solve various PHP programming problems. In addition, the PHP documentation available on the PHP web site (www.php.net) is significantly better than the CF documentation provided with Cold Fusion. (Especially the CF help documents that come with Dreamweaver, which are useless.)

But that's again PHP4, PHP5 however is supposed to be better, butno solid version isout as of yet, so they cannot really compare the full capabilities of PHP to ColdFusion. "

 

Tormod, as to the error reporting, every time i try to log on as alex, i get a message that says that the username does not match the password or the account is not activated... this one seems to work fine for now though so i'll use it for a little while.

Link to comment
Share on other sites

Well, you don't comment on the security issue.

 

There are tons of ColdFusion help sites, discussion forums etc, so I guess the guy you quoted simply had not used CF in a way which made him seek advice online. The docs that come with Dreamweaver are only that, docs, and they are basically the same that come with ColdFusion itself (I'll be the first to agree, they're crap). There are some excellent books on ColdFusion, however, like Ben Forta's Web Application Construction Kit (WACK among fans) which is the bible for CF developers.

 

If I were starting out today I think I too might have chosen php over CF. One reason is that there is so much freeware about that can be used under GNU license, whereas ColdFusion apps are usually sold at a price (like these forums, pretty expensive compared to free php bulletin boards).

 

But since I feel I know the ins and outs of ColdFusion it's hard to not recommend it, though - it is an exceptionally strong middleware solution that can be run on a wide choice of servers, and it is easily expandable with scripting, custom tags, components, integration with Flash etc, even for beginners.

 

I've sent you a pm about your login problems - you are using the wrong password.

 

Tormod

Link to comment
Share on other sites

  • 9 months later...

Wow, seriously, that has to be the worst, most unbalanced analysis I've ever seen on ASP. NET vs PHP.

 

I've never actually seen someone go to the extent of making a compiled language seem like a bad thing. For one thing, .NET 2.0 will support automatic compilation of ASP .NET files (server will detect new timestamp and will recompile it) and even if it didn't, the compiled aspect of ASP .NET is a good thing ... why would you want to parse through assloads of comments, files, includes, etc when you can have it compiled to bytecode? Perhaps you should step out of your little world and into the world of ENTERPRISE applications!

 

The php syntax is also ridiculously bad. I program PHP for a living and have been able to easily see the advantages of ASP .NET. In PHP you have for loops below echo statements. It's bad coding and PHP encourages/promotes bad coding practices. Separation of content and functionality is the key to ASP .NET and PHP does exactly the opposite.

 

Plus ".NET is junk" is a ridiculously inept statement on your part. The REASON you have to have .NET installed on the server is because it's what's running the bytecode! To complain about installing .NET on a server is about as stupid as complaining about installing an operating system on anything. Like the OS, the .NET framework is responsible for maintaining the sanity and security of the system. The OS prevents processes from taking over kernel level activites just as .NET prevents programs from passing boundaries. .NET also provides a layer of abstraction, allowing you to make your code portable and secure across machines; not to mention that fact that it allows you to compile a myriad of languages into a single CLR (common language runtime).

 

Perhaps you will be more qualified to discuss this when you have designed something more than a personal website. Once you go enterprise level, you will learn a lot more; but for now, I can tell you are ignorant about this issue.

 

 

 

 

I have replied to a similar discussion, but it was on my other account (this one seems to work fine, but the other one seems to have a lot of problems). I also can't beleive that i did not see this one before, I shold have replied earlier...

buthere:

Quote of myself (not a direct quote but close) "

PHP would be my answer. There are a number of reasons why, so here:

PHP vs ASP vs Java vs Flash vs ColdFusion

PHP's main advantage is that it is FREE, and free is good. PHP supports all plartorms, and can be installed on any platform that being windows, linux, mac, unix, bsd, sun os and every server unlike ASP and flash. PHP does not have to be compiled, unlike ASP, Java, and Flash you can at any time change any part of your code in a matter of opening the file in a text editor(any), modifying it and saving your changes and your code and page is updated.

Lets go through the process that you have to go trough with ASP, find a computer with asp compiler, find your code file, modify it, compile it and then put it on the server overwriting the previous file.

ASP.net is junk, in fact all .net based programming languages are (except maybe for VB.net which the entire .net thing was made for), you cant run the programs compiled in .net unless you have a .net platform installed on your computer, as to webpages, as freethinker said you can't view them in Mozilla, Opera or any older version of Netscape.

The problem with flash seems to be in that anybody that does not have flash player installed on their computer can not view your website, hense you loose potential viewers.

ColdFusion Lacks standard and security. Java is great, but it is a hard language to learn, and there is nothing you can do in java, that you cant do in PHP which is not as strict on its synthax.People when speaking of java seem to talk a lot about applet programming and script, Java and JavaScript are two totally, and entirely different programming languages who'se only similarity is in synthax. Main difference being Javascript is a client side programming language and Java is a server side one, big, big difference.

JS's isa client side scripting language and it serves a different purpose than PHP, client side means all your code is visible, + if you use a browser that does not support JS, you cant see any contents; so browsers like Opera and XWeb are automatically out and if i go into my IE options or Netscape options I can always turn JS off, beacause you can use JS to automatically download a virus onto your system. Java is a totally different story, i wont discuss it here, but it is one of those languages that comes close to PHP, and differs only in speed;PHP is faster and more efficient.

So PHP vs. ASP:

 

________________PHP4________PHP5__________ ASP

Software Price ____ free ________free __________ free

Platform Price _____ free _______ free ___________ $

Speed ___________ fast _______ fast __________ slow

Efficiency ________ very _______ very ________ not efficient

Rescources Needed_ few _______ few __________ lots

Security _________ secure ____ secure _______ secure

Platform __________ all ________ all ______ win32 IIS mainly and Apache recently

Open Scource _____ yes _______ yes ___________ no

exceprion handling _ no _________ yes __________ yes

OOP support ____ not strong ____ full ___________ full

 

Another thing that you might consider is Database, and although I am not a specialist in that area, but PHP's uniqueness is also in that PHP is almost a part of a database server, if in other languages Database support is written in addon functions (dlls), PHP's is written in the engine itself, Database almost feels like PHP is a part of it, and thus the speed of their communication is a lot higher than that of ASP and MsSQL's and Oracle and Java's (i think that the advantage is in that the data that is received does not have to be translated, but as i said i'd have to research) MySQL is said to be twice as fast as MsSQL, and new SQLight which come

Link to comment
Share on other sites

aamer, welcome to the forums, and we finally got a pro ASP guy that i can argue with...

Ok, you say that you are a PHP programmer, what version of PHP do you use?

I've never actually seen someone go to the extent of making a compiled language seem like a bad thing.
Good compiled languages are not a bad thing, its the bad ones that i really dislike. With better and better scripting languages such as Python and the new Perl that should come out shortly, scripting is becoming more and more widely used, because it is in many cases faster to write a 4 line script then it is to write a full-blown 500 line program in C... Yes for argument sake, C program will run faster and be more efficient, but with hard drive communication where the program waits on the drive most of the time anyways, why bother?
For one thing, .NET 2.0 will support automatic compilation of ASP .NET files
oh yeah .NET 10.3 will... , umm we are talking about now, so please keep with the topic.
why would you want to parse through assloads of comments, files, includes, etc when you can have it compiled to bytecode? Perhaps you should step out of your little world and into the world of ENTERPRISE applications!

well, first of all bytecode is not very flexible, is it? secondly though, yeah you will not need to go out to the memory locations of the included files at the runtime and everything will be merged in one, but you still have to go through the same process when you are compiling and linking ASP code, so...

The php syntax is also ridiculously bad. I program PHP for a living and have been able to easily see the advantages of ASP .NET. In PHP you have for loops below echo statements. It's bad coding and PHP encourages/promotes bad coding practices. Separation of content and functionality is the key to ASP .NET and PHP does exactly the opposite.
What are you talking about? for loops below echo statements what? Coding practices are only as bad as the coder. If you want good syntax, switch to Python...
Plus ".NET is junk" is a ridiculously inept statement on your part. The REASON you have to have .NET installed on the server is because it's what's running the bytecode! To complain about installing .NET on a server is about as stupid as complaining about installing an operating system on anything. Like the OS, the .NET framework is responsible for maintaining the sanity and security of the system. The OS prevents processes from taking over kernel level activites just as .NET prevents programs from passing boundaries. .NET also provides a layer of abstraction, allowing you to make your code portable and secure across machines; not to mention that fact that it allows you to compile a myriad of languages into a single CLR (common language runtime).

No, installing .Net nowhere near equates to installing an OS reason being that .Net is something installed on top of the os to run specific (to microsoft might i add) bytecode. Its a bloat on top of a bloat taking up precious server space that can be used for something better. It is yet another abstraction level on top of the micrsoft os that Forces you to use microsoft as the operating system on your server, which is less than secure. Thats all aside from the proprietary side of ASP which i will not argue yet, because i gotta run... later

Link to comment
Share on other sites

I've always liked PERL myself but I am thinking about doing more with PHP for database connected web forms. The great thing about PERL is that it also makes a great scripting language for administrative tasks. It's a real upgrade to that crippled command set that Windows comes with.

Link to comment
Share on other sites

Uhm, alexander, hello! Let me quote you to counter yourself ... "umm we are talking about now, so please keep with the topic."

Tele, i'm using his own tactic, plus notice that i didnt go on and on about the new perl, u just mentioned it, not basing a whole paragraph on it. And yes i can be inconsistent, and that is due to the fact that many times i have no time to go back through the post before posting...

 

So Tele, can you please stop busing my chops for a sake of getting into another argument and post something new and interesting or complete posts with your knowledge, I'm not a "know it all", and i'm also a human who makes mistakes and has bad days so please if you need the excitement of big, colorful arguments, I'm sure that FreeT would not pass an opportunity...

 

C1ay, Perl is a great language for many things, its most awesome for string parsing, and its regular expression engine is just as insane as its syntax (meant in a good way). PHP actually inherrited the regex engine from perl, the developers decided not to screw with it since it is so great and put it in as is. PHP also supports POSIX style regular expressions, but i think that they use PERL engine and just translate the calls, might be wrong though...

Link to comment
Share on other sites

I have to say, I love these religious discussions. I was with Andersen Consulting for 15 years, and I really only understand very large systems. I am pretty weak when it comes to small ones. But this discussion does remind me of the days with a dozen smart folks in the room arguing about a list of elements that are necessary in large enterprise architectures.

 

Boy were those grueling.

 

But I am enjoying watching this debate. I have to admit that I generally support anything that is not Microsoft. MS took over the role of Great Satan from IBM in the late 80's and I love to hear them get attacked.

 

Sometimes, I like having a bias.

Link to comment
Share on other sites

Bio if you want to hear something really funny, check this out:

In times when a fast-spreading worm is decompiled fast enough to realize that at a certain time all computers infected will start a giant attack against Microsoft servers (be that MSN or anything else) Microsoft turns on their Linux boxes (probably Linux from scratch, but most likely pretty secure(yes there are some Unix smart people that work for MS 1 or 2 is my guess)) so their servers would be left alone B)

(dunno the source, read that somewhere a while back, but many people that i told that have confirmed hearing about that somewhere)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...