PHP verses Classic ASP and ASP.Net
  • The thing I like about ASP is that it can support almost any language. I can recall Perl and Python and other languages being added to Classic ASP, so you didn't just have to use VBScript or Javascript. Now that there is ASP.Net any language supported under Dotnet (with the exception of C++, for some strange reason Microsoft broke it for ASP.Net) can be used. Novel Mono has an open source version of ASP.Net that uses XSP to use ASP.Net on Linux, Mac OSX, etc.
  • I'm not very clued up with ASP but your sentence has left me wondering, why would you need ASP if it supports other languages like Perl? I mean, why not just write the page in Perl and then you don't have this ASP thing surrounding it, engulfing it entirely with needless baloney (I love big corporate products).

    As for it not including C++, I doubt it was a hapless accident. A company Microsoft's size doesn't "just have accidents" and let their product slip (I assume it still doesn't support C++?). Well, my theory is that it supports C#, quite a direct contestant to C++. Something they'd rather developers used instead of C#. Which in turn probably only produces code to run on Windows ;)

    On the other hand, is there anything that ASP.net offers to the web development spectrum? There are reasons NOT to use ASP (limited OS support etc) but does it bring anything extra? For example Ruby on Rails sent the beginner to intermediate PHP users reeling. Now we have all sorts of frameworks for PHP which does something similar to the entire Ruby concept and is optional (I say write your own framework you lazy bum!)
  • Well ASP renders HTML a lot better than CGI scripts because you can embed HTML tags inside of it just like you can with PHP. I could use the same argument with PHP and say since it is C/C++ like in syntax why not simply write C++ CGI scripts instead? Which of course is nonsense because of the level of control that PHP and ASP give the developer.

    ASP.Net is better because it compiles ASP.Net scripts to bytecode to run faster, plus it can use the Dotnet framework to make developing web applications a lot easier. Not only that but it has web forms with embedded scripts that can run at the server level instead of just at the client level. If you use client side Javascript, for example, it depends on if your web browser can support the Ajax or whatever standard of Javascript code, while ASP.Net is more compatible with older web browsers as it can run validation scripts on the server side, etc.

    I have used PHP since version 3, and version 4 broke my code, and then version 5 changed things as well. ASP.Net can still run Classic ASP scripts, but they don't have the ASP.Net advantages. I don't have the time to keep changing my PHP scripts to the new version of PHP, but ASP seems not to have that problem.
  • You disregard C++ as nonsense because PHP and ASP give the developer more control. This seems, bizarre at best? Surely with C++ you'd have a lot more control in developing larger applications on the whole (we're not talking about some upload a file script here but an entire website). As you'd have better access to connection specific data from Apache providing more options. As for functionality? Well PHP has a lot more functions compared, however these are easily rewritten in C++ and which, most will not be needed (completely different language, different mindset).

    The real reason people don't use C++ to write web applications is because of security. If one line of code goes horribly wrong and crashes the system, corrupts memory inside the process, etc then the entire web server is at risk from hitting the dirt. You could also give it it's own process to run in, but crashing is still a major concern.

    You say ASP.Net is better because it compiles code. PHP also compiles code in a similar way to Java (bytecode, I'm not certain what ASP does though). PHP can cache the code it compiles so for each page it doesn't have to parse the script again so that argument for ASP is thrown out of the window.

    "plus it can use the Dotnet framework to make developing web applications a lot easier", example? Back it up? As far as I know the dotnet framework is mfc! Bloated.

    You talk about embedded scripts that can run on both client and server level and how it is more compatible with older web browsers because it can run the Javascript for the client. This is a pretty major flaw. All validation has to be checked on the server side, whether or not the client *says* it passed validation.


    PHP 4 and 5 broke your code? You can run PHP 4 and 5 side-by-side so I assume PHP 3 could run along them too. Using each one would be a matter of changing the extension to .php3, for example. Now PHP 5 doesn't come with the bloat of older versions added onto it anyway!
  • ASP.Net code is compiled into CIL/CLR bytecode. It is very much like assembly language for a virtual CPU and it is easily translated into native code if needed.

    C++ is dangerous because pointers and memory assignments can crash the server, and hackers/crackers can exploit pointers to gain access to memory locations that store passwords and other sensitive data.

    ASP.Net is easier to debug, and in that way it gives the programmer better control than C++. Visual Interdev and Visual Web Developer and the Visual Studio tools can step through each line of ASP.Net code and change it on the fly and reverse steps to debug flaws and errors more quickly than C++ compiling the code, finding an error, loading it into an editor, fixing the code, compiling the code again, finding an error, fixing the code again, compiling the code again, etc. Unless you use a commercial version of C++ like Visual C++ or Borland C++ Builder that can debug C++ code better.

    You’ll never know the pains I had to go through to debug C++ and PHP programs and how much easier it was to debug ASP and ASP.Net code. It all depends on the tools you use.

    I ran a Linux web server with PHP5 and Apache2, using the PHPBB2 forums with all of the latest security patches, and spammers used exploits to get past validation of user accounts and a cracker got in and hacked the web server using PHP exploits. When I run ASP and ASP.Net code with the SNITZ or other forum software I never had to worry about spammers or crackers. I monitor the web server through security programs and watching the logs.

    MFC and Dotnet are not the same thing, and you are showing your ignorance. Dotnet is a separate framework that has to be installed, and it exists for non-Windows operating systems with Novell Mono and DotGNU compilers. Being bloated is debatable and I think you are confusing your own opinions for the actual facts.

    You can read up on Dotnet here:
    MS-DotNet resources

    You can read more about Mono here:
    Novell Mono

    You can read more about DotGNU here:
    DotGNU

    As you can see, the Dotnet framework is not even limited to Windows, and it is not the same as MFC because if it was it couldn’t be run on Linux, Mac OSX, *BSD Unix by Mono and DotGNU. Dotnet is not limited to Microsoft, and Microsoft gave control of Dotnet languages like C# to the EMC open source organization for use everywhere.

    As you can see by the DotGNU website they built PHPGroupware on the Dotnet framework for PHP, so that PHP developers can use it as well.

  • Wow. Boy-oh-boy did I just jump straight into a pro-ASP.Net ready-to-flame thread. Or whatever they're called.

    I'm going to come straight out with this, your arguments all seem to be along the lines of "I've had bad experiences with a particular aspect therefore all of PHP is bad and ASP > *" or even maybe hinting on "omfg PHP is [bleh] and ASP rocks because it's Microsoft." etc.

    Calling me ignorant because I don't have a full understanding of what Dotnet encompasses was a bit extreme. I know that MFC is a set of classes encompassing the win32 api which (imo) bloats the application. I would have been ignorant if I had said Dotnet was bloated because Microsoft produced MFC classes which were bloated, however I didn't. On the other hand "ASP.Net is compiled into CLR bytecode. It is very much like assembly language and it is easily translated into native code if needed." demonstrates your lack of understanding. Unless you weren't planning on actually running your application, you'll probably find that you'll _always_ have to translate the bytecode into native code to run it. Wikipedia describes how this works: http://en.wikipedia.org/wiki/Bytecode

    You talk about your forum being hacked numerous times with PHP 5. I'm sorry, these are not problems with the PHP language itself but the application being ran on them. Never worrying about hackers would be a foolish thing to do just because you are now running ASP.net. A false sense of security is probably even worse.


    C++ is not suitable for web development and is why the majority of web applications will not use it. Hackers can't "just exploit pointers" to gain instant access to system resources such as passwords. As for your debugging problems, perhaps you need to learn to write better code? 95% of my PHP problems have been displayed to me writing for the error level E_NOTICES being displayed. As for step-through interpreters, there are various debuggers available (such as gdb) which can give you everything Microsoft gives you, including the source code line your program begins corrupting on.

    Also, the way you are debugging C++ applications suggests to me you will haplessly write code until an error appears and then struggle to find the source (which probably quite often stems backwards from previous not-found problems). This is a bad technique indeed and would most probably lead to hackers "just exploting pointers" to get passwords. Functions and classes should be fully tested, meaning every conceivable input is tested (we're not talking about 'a' then 'ab', etc but extreme, special and erroneous cases).


    It's either this post or 3am that's giving me a headache. :face-sad:
  • “I’m going to come straight out with this, your arguments all seem to be along the lines of “I’ve had bad experiences with a particular aspect therefore all of PHP is bad and ASP > *” or even maybe hinting on “omfg PHP is [bleh] and ASP rocks because it’s Microsoft.” etc.”

    That is not what I said at all, in fact I even cited a source with PHPGroupware that allows you to use Dotnet in PHP. I never even mentioned Microsoft or claimed ASP was better because Microsoft made it. Novell Mono uses open sourced ASP.Net for example, and it contains no Microsoft code, and it runs with XSP on Apache with mod_mono.

    Reading that Wikipedia article it gives examples of bytecode and this is one of them “Managed code such as Microsoft .NET Common Intermediate Language, executed by the .NET Common Language Runtime (CLR)” So you claim that Dotcode does not support bytecode now, which either means that you are wrong or that Wikipedia is wrong about Dotnet bytecode. The CLR bytecode that is run is in the CIL format which is like assembly language code for a virtual CPU.

    I guess I cannot blame you for the rest if it is 3am and you are not thinking clearly and have a headache.

    Visual C++ allows C++ code to be debugged in the same way that Visual Interdev etc debug ASP code. I think Borland C++ Builder does as well. I just don’t think it can be applied to CGI scripts that are already compiled, I could be wrong. But my method of programming does not involve compiling the code each time to find an error, it is all about analysis and design, good programming habits (closing off objects when done with them, stripping out symbols that hackers can use to exploit the system, limiting entered data into the max length allowed to prevent buffer overflows, etc.)

    When I ran ASP and ASP.Net or PHP I kept a close monitor of the system. I have security programs running, keep track of the logs etc.

    PHPBB2 code is buggy and sometimes has security flaws, if you can recommend a better PHP forum for me, please let me know and I can look into it. I only switched back to ASP and ASP.Net because I wanted to try something different, there were too many PHP exploits and too many attempts at exploits. Now I don’t write the PHPBB2 code myself, it is open sourced.

  • You didn't seem to show an understanding of what ASP does, so I pointed you in the direction of the Wikipiedia article - just rather aggressively :face-plain:

    People finding exploits are good and people attempting to find them are even better. No software is 100% perfect (just some are better than others...) and chances are, as long as you're keeping up on top of vulnerabilities, you won't be the first targeted.

    Sounds like you have some really vicious "community" members though :o If PHPBB2 is a problem, then have you tried writing your own? The actual forum is quite easy to write, it's just a matter of making up the features it will be missing - but then at least you'll be more focussed on what's "important" (is that a cop-out or what? ha!).

    As for some sort of allegiance to a language, I'm more of a fair weather friend; I'll happily move bandwagons if it suits my needs a lot better. I'm just very dubious of tagging along with a company with a bad track record for various things like keeping the market open. Then there is the Linux support: copies, imitations, by definition cannot be better than the original and are very rarely 'just as good'.
  • Is ASP really so popular? If you glance web languages by usage PHP seems to be always number 1 by far. :face-monkey:

    There are many emerging frameworks for web development (e.g. Ruby on Rails and I found the perl http://www.usegantry.org/ pretty interesting) hence more possibilities.... oh for a forum I would recommend http://getvanilla.com
  • I don't think popularity should play that big a role into why you choose a language. A language should meet your needs. PHP is a good first language for people because it's syntax is simple, easily compared to other languages, variables don't have to be declared and it's a write the source then visit the web page. No more fluff. Plus there's also the widely available on most web servers thing as well.

    Once you've learnt the language, it's a whole new kettle of fish. If you're writing something that is going to be used regularly by people, such as a forum. It has to scale well, be easy to maintain and then there are licensing costs too. Ruby on Rails' shining glory is that it has a framework. While I'm not saying it's a bad thing, these frameworks can be implemented differently/better/worse in other languages like ASP and PHP. Do you think there's a reason why Yahoo use PHP and not Ruby?

    ... although I have a knack for wanting to reinvent the wheel :face-devil-grin:
  • Hi there :)
    To answer your question: the great majority of PHP guru's (e.g. Rasumus http://blog.360.yahoo.com/rlerdorf ) are employed full time at Yahoo. This perhaps is a sort of insurance that they can rely on the language and its future :)

    Secondly Ruby on Rails arrived much later to the scene. For a big company is very complex to switch from A to Z ( and yes there are still many using cgi/perl) and this might be a reason :face-monkey:

    I agree that the language should meet your needs. That said you also need to be realistic on how easy is to use that language and get your client/friends/yourself happy with it.

    We recently developed something on Ruby on Rails and realized that the experts recommend to use it with fasthttp vs apache. This might create some problems. Beside, the majority of hosting support PHP and not RoR.

    This does have an impact :face-smile:

    Thanks !
    David
  • Well I was paid to develop in ASP, I learned PHP on my own. I have been doing both PHP and ASP since 1997.

    Sadly I’ve been out of work since 2002 due to a disability, I am trying to get healthy enough to go back to work one day. It is hard to keep up with changing technologies as well as try to keep my health up so I can stay out of the hospital.

    Actually yeah I did want to write my own forum, I saw features that one forum has that another does not, but it has features that the first one doesn’t have. I wanted a forum that can be used as part of a web portal, that also can show posts in story or blog view, as well as a threaded view, with RSS and RDF feeds, along with the option of turning posts, etc into PDF files (though I suppose ODF is getting ready to replace PDF) that can be downloaded and stored like a book. For example if there is a good programming thread on writing PHP code to send SMTP email messages, don’t you want to take the parent post and replies and print off a PDF that you can download and then read later on the topic as a reference for your eLibrary you are collecting on PHP? Then share it with a friend? Of course it would be under a GPL or Creative Commons license like the forum text would be, and comments are the property of those who wrote them. But wouldn’t it be a cool idea to do that?

    I was told that Google and Yahoo do a lot of Python development. When I look at the Yahoo web sites, I really don’t see PHP extensions. Unless Yahoo hides the PHP file extensions or something. I suppose they could use them on parts of the Yahoo web sites that I don’t use, like the games area or something. But the Mail, Groups, 360, My Yahoo, etc don’t seem to me to be PHP.

    ASP.Net is not limited to Microsoft, Novell makes a nice open source version of it with the Novell Mono project.

    Novell Mono FAQ

    Novell Mono Downloads

    “To run ASP.NET applications you need xsp and if you want to optionally integrate with Apache, get mod_mono. “

    XSP and mod_mono can even make Apache on Linux run ASP.Net, for free, without using any Microsoft code.

  • >> Do you think there's a reason why Yahoo use PHP and not Ruby?
    Do you think there's a reason why Google uses Python and not Php?

    I really don't think Google/Yahoo are suitable examples for majority of web based businesses. That being said, I agree .. right now it is realistic (still!) to put together your application in Php4 or Php5.

    - Sri
  • >> When I look at the Yahoo web sites, I really don’t see PHP extensions.

    That is by design. Check out the type of job openings for developers at Yahoo. That gives a much clearer indicator.
  • They really are not that concerned with the scripting languages. PHP is embedded in the distro, RUBY is garbage on multiple shared networks, JSP is good, although i havent touched it since college.ASP IS well, microsoft... UGHHHHHHHHHH. C# is the only decent language m$ has given, and that itself was just a renaming from the sweep they took with j++ from java. being a java developer and a php developer for a fairly large company, i can tell you that the scripting portions just serve a basic fundamental purpose with ongoing enhancements. you cant map data the way you can in a compiled fashion as with a struct or an entity bean .....

    HOWEVER, this goes against all of the extremely cool things which I do with PHP that I am unable to do with java. For instance, i think next week I have a project set up to incorporate using JSON services to pass data via various service calls to a javascript file, and then have that javascript file create data objects to re-render the table.... I think I might also get approval to incorporate YUI's DataTable, but i think that still is in beta. On a business perspecitve, the model is fantastic. I think its great how much their is available with these designs..

    In the end though, the higher level serves to complete a goal.. Yahoo doesnt make their money from how cool their widgets are. That would definitely be their data management. Google, well, anyone that believes google is that concerned with their viewing output is just retarded.

    So, in the end, i think they all are really good at what they do.. but, i dont really "feel" anything when talking about a comparison against them.. athough, in my rankings...

    1.) PHP 2.) JS 3.) JSP 4.) Ruby 5 - 9) Those same and then 10.) ASP.

    ************* Ammendment.

    I just want to point out smething though. Since PHP5, I have really been utilizing the framework in a much nicer way. I am very impressed by their efforts and the way this language is actually becoming a concrete OOP language.
  • Just for the record yahoo hides the PHP code but is there :) Again I wouldn't take python as an example just because google uses it. For instance, slashdot is using perl. Every programmer which was around few years back (e.g. 1998-2000) would have done his first script in perl. Why? Perl was "the" thing back then. Then came PHP...and now there are even more opportunities.

    I love PHP but I am also fascinated by new ideas like Ruby on Rails ( e.g. http://www.campfirenow.com/ this chat is simple amazing and so is pretty much done by the RoR authors http://www.37signals.com/). I've been using RoR professionally and been very pleased with the development speed.

    Granted, you can have fast + good programmers in PHP, Perl, ASP, you name it. What is however interesting on RoR is that the structure is pretty much the same so it is less likely do end up with a lot of spaghetti code/files that only the author would be happy to modify.

    Just my experience so far. PHP is still however (and by far) my number one. :face-angel:

    gurugeek
  • Php by far is the most practical and obvious solution for small-mid sized businesses. And since Php (4) already enjoy quite a monopoly and massive market share, it will be around for quite some time to come.

    (flame me) .. A bit like WIndows.. ;)
  • Ruby on Rails can produce initial code for you faster, but you have to spend the time to tweak it and follow good programming practices to avoid some of the flaws that Rails puts into the code. It is only good to produce prototypes really quick, and not good enough for a production program.

    Python can handle complex math like the square root of negative 1, etc. Most languages cannot handle that and throw an exception. If you need complex math either you write your own classes to handle it, or you use Python which has it already built in. Python can also use C libraries and objects, and Jython can also use Java libraries and languages.

    Why would Perl still be used when PHP is that much better than Perl plus easier to program? Like Perl, Python uses regular expressions and it is easier to program than Perl.

    Easiest to program of all is Visual BASIC in ASP and ASP.Net.

  • Geekformatt


    orion blastar and /or lemon
    I am curious as to what type of program is used for etrade or scottrade or wallstreet themselves. Is it one program are a multitude of programs?
  • Good question, banks I deal with either use ASP or JSP I can tell by the file extension of the web programs they use.

    Etrade, Scottrade, and Wallstreet I cannot tell what they use or if they hide the extensions of the web programs they use like Yahoo does.

  • thanks for the answer Orion Blastar
    if someone were to attempt to write such a program would it be a great task or could alot of the programming come from exsisting programs?
  • Everything at this level (etrade etc) is certainly custom made and
  • thanks gurugeek
    I was looking at something alot less in size with regards to issues but the trades might be quite large.
    from what Ive been reading there seems to be low pay in this industry as well, 40000.00 a year starting out doesnt seem like much after all the time spent learning and continuing to learn in order to keep up. Seems you would be better off coming up with something that all ones learning could be used with rather than just working for some company and dealing with unexpected layoffs.
  • with further thanks to gurugeeks answer to my previous question.
    I was reading some of the comments of Orion Blaster and lemon where they stated it was 3 o clock or so in the morning and they were trading ideas and one referred to the other as "ignorant" and offense was taken.
    Being outside of the conversation I thought, heres a couple of guys who love what they are doing yet they challenge each other , missdricted energy and tallent. Ignorance is nothing more than not being aware of something. Stupid is something to take offense too. To me greed, envy and the like are stupid and get in the way of progress. Too often people, myself included ,loose sight of a goal due to self ,not unlike this moment as to why Im really on this site, however its not totally self, its also need so I searching here.
    I do enjoy this site with yall' s comments.
  • It's been a while since I've read this as I've just moved house (back into uni accommodation) with no Internet.

    Well, I think I did take offence at something Orion said as it felt like he was just advocating ASP and I think I settled into a praise-be-to-PHP so I'm just as naughty :p and speaking of forums, I've just built my own set of forums in PHP custom built to my needs.


    You're all talking about Yahoo and major banks like their problems are your problems. Are you so sure they are?
  • My preferred trading platform is this one http://www.tradejet.ch ... No I don't like ASP but this is really well done. In terms of salaries etc. a good programmer in a good company would her much more than that :face-monkey:

    If you are looking to build something professional you need to rely on well paid people. Oh well, too complicate anyway :) I can't imagine dealing with these huge companies. It would be no fun ! :face-monkey:
  • The students have to buy essays or the term paper about this good post. A kind of good topic! Thank you for that!
  • I am learning as well, and PHP seemed to be the obvious first choice for me, since so many sleek applications and websites are developed in it, not to mention it’s free. I plan, however, to educate myself in ASP.NET since I already had to ti walk away from 2 jobs for not knowing the first thing about it. As a developer who wants to enter the workforce I can’t allow myself to get so picky.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook

Share Me

  • Please share this topic with your friends. Click any of the icons below:
  • stumbleupon
  • Twitter
  • facebook
  • myspace
  • technorati
  • reddit
  • fark
  • email