Some comments on Oracle's comparison of PHP and ASP.NET

Oracle recently published an outrageous article in a rather strange attempt to convince people that PHP is the best platform to write web applications. Not ASP.NET, which is not surprising coming from Oracle, but not Java either, which is a little more puzzling.
 
In this blog entry, I'm explaining what I thought when I read this paper. The disclaimer on the left applies, of course: these are my own opinions, and I'm not talking on behalf of my employer.
 
This article is completely unreal. Arguing that PHP is preferrable to ASP.NET is a very difficult exercise. I can imagine the marketing people at Oracle ordering this article and determining its conclusions even before it was written... It is even touching to see that the author can't hide all of the ASP.NET qualities nor all the problems of PHP.
Let's read the article together and comment it along the way.
 
First, the subtitle, "One developer's view of the pros and cons of the two most popular means of building web applications" should probably be more along the lines of "One PHP developer who has no clue what ASP.NET is reviews what he thinks are the pros and cons of the two most popular means of building web applications". I've built applications for years with both systems before I was hired by Microsoft, so I can probably spot most of the many voluntary or unvoluntary errors and inaccuracies in the text.
 
In the first paragraph, the author tries to convince us that PHP and ASP.NET fall into the same category of web platforms that "[embed] code into HTML pages with special tags that signal to a preprocessor that they contain code, and that it should do something with it". This is true of PHP, but not of ASP.NET, where the code can, but should not be in the HTML markup. Instead, a well-written page would have a declarative or templated part (the aspx file) and some codebehind (or not) that orchestrates the controls and communicates with other layers of the application if there are any.
So whereas PHP follows the flow of the page and inserts dynamic text in some places, ASP.NET separates the code from the declarative markup and has a much richer page lifecycle. Most important, in ASP.NET, the execution flow is distinct from the markup's flow.
This difference is absolutely fundamental and differentiates a platform that encourages spaghetti code from one that encourages good design and separation of concerns.
The author also tries with this simple sentence to have us believe that the "special tags" of PHP and ASP.NET are equivalent. Nothing could be more wrong: while PHP only has tags to signal the limits of the server code from the rest of the markup, ASP.NET's tags are really abstract representations for full-blown controls that embed complex behavior (such as treeviews, grids, etc.). While one forces you to output raw HTML, the other enables you to use familiar widgets like those that you would expect from a desktop application framework. Using PHP to create web pages is a little like creating desktop applications with a tool that would force you to draw every control using dots and lines (just a little, I'm pushing the analogy: PHP is not THAT bad). Abstractions are good.
 
The second paragraph is very touching because the author explains us why he is so biased. No comment.
 
So what is ASP.NET to Oracle (except for a menace)?
 
"ASP.NET works with scripted languages such as VBScript, JScript, Perlscript, and Python, as well as compiled languages such as VB, C#, C, Cobol, Smalltalk, and Lisp". Wrong. ASP.NET works only with compiled languages such as VB.NET and C#. There are .NET compiled versions of "scripting languages" like Perl, JScript or Python, though, and that's probably what caused this confusion.
 
The next paragraph is more or less accurate, but let's note for later that the author is aware of the fact that the .NET class library contains classes that do "image manipulation". Later, he'll tell us that "with ASP, however, you're investing from the very beginning, and you're spending for add-on technologies—libraries for doing graphics manipulations, for instance".
 
"in ASP.NET, integration with databases can be accomplished through ODBC". Technically, he's not lying, here, but he fails to mention that ODBC is just one of several ways to access a database, the one that should be used only if all other options are impossible. There are direct providers for Sql Server and Oracle, and third parties offer native providers for all major databases (including an Oracle provider for Oracle databases, in addition to the MS provider). Most importantly, these APIs derive from a common base, which makes it almost equivalent from a developer's point of view to develop against Sql Server or Oracle, or any other database. Whidbey also makes it a lot easier to make your code database-agnostic (like, I have to admit, Mono did before us). More on this later.
 
"ASP.NET's strength lies clearly in its clean design and implementation. It is an object-oriented programmer's dream, with language flexibility, and with sophisticated object-oriented features supported. In that sense, it is truly interoperable with your programmers' existing skills. Another strength of ASP.NET is the development environment." Say no more. ASP.NET rules! Oracle says so!
 
But don't worry, the next sillyness is in view: "But what you gain in robustness, you pay for in efficiency. ASP.NET is expensive with respect to memory usage and execution time, which is due in large part to a longer code path."
Oh? Really? What backs these gratuitous affirmations? Execution time? Can we have some pointers to check that? Because as far as I know, a web platform that is natively compiled and that has built-in page and fragment caching is very likely to be faster than a scripted, non-cached platform. Of course, you can compile PHP using a free tool, but it's an afterthought. And you have to pay for the page caching solution, whereas it come for free with ASP.NET.
I can see where the memory thing comes from. It is true that if you open the task manager on a server that's running an ASP.NET web site, you could be a little frightened by the amount of memory ASP.NET uses, if you know nothing about servers. Guess what! Memory that's not used is useless. The rational thing to do on a server is to use the memory you have (to cache stuff, for example). The quantity of memory that's used by ASP.NET can be configured in machine.config if you feel you can tweak it better than the default setting (which you usually can't, that's why  it's the default setting).
The performance of ASP.NET is certainly sufficient for "small traffic" sites such as Microsoft.com, MSN, match.com, etc...
 
The "What is PHP" section is focused on database access, but fails to mention Sql Server as a possible database for PHP (this is an Oracle paper, after all).
It tries to convince you that database abstraction is bad (just to tie you to Oracle, but you got that part yourself) because you so badly need these marvelous Oracle features: LOB, BLOB, CLOB and BFILE.
This coming from the same people who will explain later that OS independance is an absolute necessity...

So let's summarize:
Oracle dependance: Goood!
Microsoft dependance: Baaaad!

Seriously, database independance is an important feature for many modern applications.
Due to the uncoordinated development by different teams, the database access libraries in PHP have been notoriously inconsistent to the point where the code you'd write to access a MySql database is different from the code you'd write to access a PostgreSQL database. Not in the SQL queries, which is more or less normal, but in the actual PHP code! So other people have developed so-called database abstraction layers (dba, odbc, etc.)... which do not work with all databases, and are of course largely inconsistent with one another as well as with any specialized provider.
 
In the "strengths and weaknesses", we only see weaknesses, except for platform independance (but not database independance), open-source development (if you happen to consider that as a strength), and "a smaller code path," whatever that means.
He misses a few other important weaknesses, like the fact that its library is terribly messy, being a function library instead of a hierarchical class library like that of .NET or Java, and having horrible names (can you guess what readline_completion_function does? It "Registers a completion function". Yes, I know, that's not very much clearer, but this is the kind of documentation you get with PHP: no sample, no clear explanation).
The author then goes on to showing us how great the new PHP5 is (whereas to say the truth, it barely gets where Python was years ago). The code example is absolutely hilarious. Anyone writing this kind of code in a job interview with me would be politely but immediately shown the door. I have to show you:
 
class blue {
 
  function openFile ($inFile) {
    if (file_exists ($inFile)) {
      # code to open the file here
    } else {
      throw new Exception
 ("Cannot open file: $inFile");
    }
  }
}
 
$blueObj = new blue ();
 
try {
  $blueObj->openFile ('/home/shull/file.txt');
 
} catch (Exception $myException) {
  echo $myException->getMessage ();
 
  # rest of exception handling code here
}
 
Do you really think you should throw an exception to test a perfectly normal application error condition? Shouldn't you throw and catch something more specific than Exception? Shouldn't openFile be static? This code sucks. Just write this instead:
 
$fileName = '/home/shull/file.txt';
if (file_exists($fileName) {
  #work with the file
} else {
  echo "File: $fileName does not exist";
}
 
If this is how you explain the benefits of OOP and structured exception handling to PHP users, we'll just get unamageable and ununderstandable object-oriented spaghetti code instead of plain unmanageable spaghetti code.
 
I'm skipping the "security comparison" FUD for now, I'll get back to it later. Let's go directly to the "database coding examples" section.
 
"With ASP.NET, however, it's a little more complicated, because you have the option of any of a number of languages to choose from." How that makes it more complicated and how it has anything to do with database programming elude me completely.
Let's look at the code sample. The PHP code does absolutely nothing except create and destroy a database connection (please note the "very elegant" error handling code, though). The destructor prints a useless message for no identifiable reason.
 
class oracle_object {
  protected $theDB;
  protected $user;
  protected $pass;
  protected $db;
 
  function __construct($u, $p, $d) {
    $this->user = $u;
    $this->pass = $p;
    $this->db = $d;
  }
 
  function db_open () {
    $theDB  =  @OCILogon($this->user,  $this->pass,  $this->db);
    db_check_errors($php_errormsg);
  }
 
  function db_close() {
    @OCILogoff($theDB);
    db_check_errors($php_errormsg);
  }
 
  function __destruct () {
    print ("so long...");
  }
 
}
 
Many things can be said about this code: the fields are not encapsulated, and it is generally not a good idea to open a connection if you're not going to use it right away (because of connection pooling), so if you write a database access helper class, opening and closing the connection should be done just around the request to the database itself. At least in .NET where the connection pool is automatically managed.
And now, the VB.NET code that is supposed to be equivalent to the one above:
 
Imports System
Imports System.Data
Imports System.Data.OracleClient
Imports Microsoft.VisualBasic
 
Class Sample
 
  Public Shared Sub Main()
 
    Dim oraConn As OracleConnection = New OracleConnection("Data Source=MyOracleServer;Integrated Security=yes;")
 
    Dim oraCMD As OracleCommand = New OracleCommand("SELECT CUSTOMER_ID, NAME FROM DEMO.CUSTOMER", oraConn)
 
    oraConn.Open()
 
    Dim myReader As OracleDataReader = oraCMD.ExecuteReader()
 
    Do While (myReader.Read())
      Console.WriteLine(vbTab & "{0}" & vbTab & "{1}", myReader.GetInt32(0), myReader.GetString(1))
    Loop
 
    myReader.Close()
    oraConn.Close()
  End Sub
End Class
 
Why are they skipped lines in there? To make the code seem longer? And who wouldn't notice that this code does a lot more than the PHP code?? It opens a connection, queries the database and outputs the results before it closes the connection. So what does this prove? Absolutely nothing.
 
It should be pointed out that displaying database data in a table in ASP.NET Whidbey is as simple as that:
<asp:SqlDataSource runat="server" ID="myDataSource" DataSourceMode="DataReader"
  ConnectionString="<%$ ConnectionStrings:MyOracleConnectionString%>"
  SelectCommand="SELECT CUSTOMER_ID, NAME FROM DEMO.CUSTOMER" />
<asp:GridView runat="server" ID="MyGridView" DataSourceID="myDataSource"/>
 
Of course, this is the quick and dirty solution, and you can substitute an ObjectDataSource to the SqlDataSource if you have properly defined your own DAL, business and service layers.
 
Now, let's "make a choice"... The author pretends to think that "[PHP's] only weakness is its lack of a pure and perfect OOP implementation". Err, see above. He then says "Though language constructs do help, ultimately, good coding is a matter of practice, execution, good habits, and discipline". Sure, but what if you are incapable of that? I'm not pointing to anybody... Oh well, yes I am.

We now can read a very informative (not!) table "summarizing" the weak and strong points of each platform. The criteria that have been chosen are completely arbitrary, as well as the "values" in the table (what do $$, weak or strong mean? Is it something that I can measure? How much is $$?). We also note that ASP.NET security is "strong" whereas one of the main points against it according to the author is precisely the security. Consistency anywhere?
 
Price. ASP.NET is free, and the TCO of Windows Web Server Edition can be favorably compared to that of a LAMP approach (see http://www.microsoft.com/mscorp/facts).
 
Speed. I really don't know. I have yet to read a performance study that compares PHP and ASP.NET performance. If anyone knows one, I'd be happy to talk about it. The article does not point to such a study. PHP has a reputation for speed, as does ASP.NET.
"Speed is not the only consideration. Memory usage is also important." See above? Why is that important? We won't find out from the article.
 
Security. This is my favorite part. After all the usual FUD about IIS security, the author gives us a link to a site that proves him wrong. This is very nice of him. Let's follow the link to www.securityfocus.com and do less than 5 minutes research. First, let's do a search on IIS 6. The first article that comes out has this to say about IIS:
"[IIS] provides a reliable and secure infrastructure to host web applications."
Then, let's look for vulnerabilities: choose Microsoft / IIS / 6.0. Results:
1 (One!) x-site scripting vulnerability in a web administration tool that's not even installed by default
And three for ASP.NET
 
OK, let's do the same for Apache 2. Results:
25 (Twenty-five!) vulnerabilities, including DOS and Buffer Overflows
Wow, that's a lot! Let's look for PHP 4 now... Results:
19 (Nineteen!) vulnerabilities, including integer overflows, arbitrary file disclosures, cross-site scripting, etc.
 
Is this guy so stupid that he really thinks noone will click his link and verify what he claims? Or does he think his readers are stupid? In either case, I wouldn't give him a web site to develop...
 
Cross-platform applicability. Sure, if that's really paramount to you, choose J2EE ;) at least for the moment...
 
Open-source opportunity. Sure, if that's important to you. If consistency and accountability are more important, then I guess that's a different story.
 
And of course, one thing you won't hear about in Oracle's article is developer productivity. ASP.NET is the platform that will make your web developers the most productive, because it manipulates higher level abstractions, it handles all the plumbing for you and it encourages reusable code. But Oracle doesn't want you to know about that.

41 Comments

  • I know many former PHP programmers (myself included)...



    &quot;former&quot;... Nuff said. :)

  • It's off topic, but, I've got to ask: Bertrand, how did you get real links to show up in your comments section? Every time I've tried to do that, the HTML gets quoted...

  • Personally, I prefer PHP as I'm not restricted to any platform. I've got Apache, PHP and MySQL running on MS and OSX and Linux and for the hobbyist developers without a corporate budget or enough cash around, going for a LAMP setup is a lot more realistic.



    Another thing I like about PHP is the extensions that can be got for it. From different databases to graphical libraries to PDF generation to SWF generation, there's a lot that can be done and even though PHP mightn't be as english-like in its syntax, once it's practised, it's no problem to read and write.



    That's my two cents anyway.

  • The file open example is still wrong in your corrected version - it ignores the possibility that the file exists but is not readable by the user the script is running as. A better solution would be to try to open the file and either handle the resulting exception or rethrow it.

  • For Shike Maffer:

    &quot;There is nothing in PHP that you couldn't do in traditional ASP. &quot;



    That's B.S. In old-school ASP, to rotate an image, you had to buy a third-party COM library like LEADTools. PHP handles this natively with the image* functions. Likewise, for creating PDFs, PHP has built-in support but ASP does not. Add all those COM libraries on your TCO!

  • So if following the link off VA Systems owned propaganda mouthpiece Slashdot wasn't enough of a clue, I just watched the page load on the Oracle article:



    1)Click on link

    2)Oracle banner appears at top of page



    And there I sit thinking to myself, &quot;Yup, another piece of Oracle FUD. This should be funny.&quot;



    Thanks Bertrant, for putting into words what every *level-headed adult* programmer was thinking upon reading the article(or the banner at the top of the article).

  • Jason: Thanks for the message. Yes, competition is good, and the PHP market shares are a strong motivation for us. I'll have a look at WACT, which I don't know.

  • The author is wrong with his outdated knowledge of PHP.



    PHP is still the better tool. It's more flexiable and has more functions.



    The author is wrong to assume that PHP ALSO is best used seperated from the HTML, it has a include_once (as well as an include) function, which is usually used to bring in the PHP library code.



    PHP is also more portable and follows a C++ style (less typing) format, not some beginners style of basic that ASP follows. every time I use ASP I have to drop my intelligence to MS level.



    I too have used both ASP and PHP, on windows and Linux. Overall PHP is better by far!



  • Haha :) Bertrand you're crazy to have taken down this ridicule article from Oracle and you're now fighting hordes of troll. Luckilly there're still a few interesting comments in there from people who have a little respect for people trying to do their job.

  • MS seems to have a problem with this &quot;hey, we're hip, we're listening; we have blogs!&quot; thing. The individual developers seem to have pretty thin skin ;)



    If you have a blog, a real blog, then discussion is going to ensue. In public. Much of it rough and tumble. That's kind of the point of tech blogs.



  • Greg: not at all, the troll comments are very public, and I did not delete a single message. You just have to follow the link if you really want to read all that nonsense.

    I just think that the immense majority of readers has other things to do than read troll posts. The trolling on this article was drowning the few relevant comments, and making the page unnecessarily heavy. I just took the irrelevant comments out of the page, but did NOT delete them. So it's still public, and you can very well post your comments there.

  • I like to mention these(Though I am not sure if people read these at the bottom of the list)
    1 - ASP.net 2.0 comes with the GREATE PROVIDER MODEL
    2 - You can deploy your dlls without registering them , this is a very great leap!
    3 - You can use the same library for Console app, Windows App and Web App
    4 - Masterpage, Themes and skins (More comment needed?)
    5 - the View State stuff! All of you forgot it.
    6 - The very great language (mr C#)
    7 - The portal framework
    8 - You can use Enterprise Library

    Anything else? Yes, I see the day that PHP dies, sorry for saying that. But I see that day. Like java appletes. Who uses them now? Flash is out there, and it kills java applets, and If you want to use something but ASP.NET why do not you try Cold Fusion or JSP? And about the price, it is not really different on a shared hosting is it?

  • Ahh, how many people use MAC? a few. How many people use Linux? a little more. So why hackers attach MS? Have you ever know the rich guy hasn't so many friends?

  • Masoud: what is supposed to be on this page? It comes out empty for me.

  • It is supposed to be one of the zend's website's pages, talking about relationships between zend and oracle, but it doesn't work for me, like many pages in zend.com I had this experience with so many php sites, Why?

  • And something else, where can I ask some questions about Atlas? I am new to Atlas.

  • Masoud: you'd have to ask them why their pages don't work ;)
    About Atlas, I encourage you to visit http://atlas.asp.net. The site has lots of information and forums where you can get assistance.

  • Thanks, I have seen it, Its cool though it was much better if they had this documents in pdf format!

  • I love asp.net and one thing that is not talked about here is the httphandler and http modules provided to us by ASP.NET. How can you not take that into account while talking about this

  • Well... after finally making it to the bottom, I wanted to thank Bertrand for trying to stay as rational as possible here. I think that ASP.NET provides for a more structured development environment to build more complicated and robust applications (of which I have built many), but this is simply my opinion. PHP I can't really speak on as I am not a PHP programmer.

    I am in the process of helping a client decide on what platform and development language to use moving forward (currently using PHP and linux) and reading both sides (after weeding through some nonsense) has helped me gain a better understanding of both languages (pros and cons).

    In the end your client's requirements really are the primary deciding factor. If the client has a small budget, no preference on OS and webserver and PHP trained personnel are more available and afordable, I would say PHP. If you were building a multi-tier web application with complex processes, and many database driven components. Leverage the .Net Framework classes and reduce coding time by as much as 65% ($$$ savings for your client = happy client) and time to market is faster. It is a win-win situation, and you as the developer are the hero and get a ton of referals and work as a result (actually occurred)!

  • I personally think that its pointless bickering over "what's better" because the answer is simple: It doesn't matter whats better, it matters what YOUR CLIENT WANTS. If they want asp, you use it. If they want PHP, you use it.

    Each scripting languages has advantages and disadvantages. If you don't like a language - good for you, you're putting yourself out of business.

    I go for more open-mindedness - I will use what is needed or requested - you have more opportunity that way.

  • Thomas: Sure, except that you can't master all technologies around. And what if *you* are the client?

  • Right. I stopped reading as soon as the troll said "LOL".

  • ATLAS is idiotic too. Invented by Microsoft, of course.
    XMLHttpRequest(); and "Microsoft.XMLHTTP" take 4 lines of code to use.
    Who wants a freaking framework that takes and generates 100 lines of code for that?
    Write your ajax with ATLAS and see if it works on apache. Better yet, try to "Use" Atlas web services from your site on Apache. But guess what? You can hit any web page on any server invented by anyone anywhere if you DON'T use ATLAS.

  • Can you please go away? Atlas *does* run on apache and on PHP.

  • Address the point about using a framework that requires 100 lines of code to do what you can do in javascript with 4 lines of code. ok.

  • No, you explain how you can do in 4 lines of code everything that Atlas can do.
    Anyway, if you don't like it, just don't use it. Lots like it and use it. Simple as that.

  • I have programmed in PHP and currently program in ASP.NET. The way I see it is that if you are using SQL Server as your database then ASP is the way to go and if you are using MySQL or Oracle then PHP is a better solution. I have found that using ASP.NET was designed with SQL Server in mind and often I will run into problems using Oracle with ASP.NET. ASP has lots of pre-made objects that are quick to implement as long as you want exactly what is on the one example on Microsoft's website. With PHP you are writing all the objects yourself from scratch and can take more time to write, but you are in total control of the outcome. PHP does not change radically every year so your code has a longer lifecycle. My pereference is PHP, but it is not up to me so I program in ASP.NET.

  • Well, not really, Oracle should work just fine. There are also providers for MySQL. You can also be in totoal control of the rendering in ASP.NET if that's what you want (the PHP model can more or less be compared to the Render phase of ASP.NET).
    I also think that your final statement is unfair as ASP.NET has not changed radically since its inception and has always been backwards compatible (it's even compatible with classic ASP). On the other hand, PHP5 has never been widely adopted because it's considered too big of a change from PHP4, leading its creators to continue to evolve both versions, and even worse, component and application vendors to maintain versions for both engines.

  • I have over 10 years of web programming experience and have built nearly 100 web sites on multiple platforms. I started with shell CGI scripts, then went to Perl, then to ASP, then to PHP, then back to Perl, then to Java, and now to C#/ASP.NET.

    I learned "the hard way" and I'm glad I did. I handled my own HTML, form validation, user state saving, template systems, code separation, etc, etc. I also had to manage some of these projects as they grew from something small to something really big. I have also inherited many projects.

    ASP.NET was hard for me to learn because I was used to doing everything manually. Concepts like events, application life cycles, or server-side form objects were foreign to me.

    However, I now have 3 years of solid ASP.NET experience under my belt and have launched and maintained some huge projects. Once upon a time I loved PHP. I honestly cannot imagine going back though. It looks terribly hacky by comparison. I cannot imagine anyone using PHP for a "new" large scale web application. Period.

    For small web sites or for learning the ropes PHP has something to offer. PHP is great for writing little "web scripts". When you are ready to develop web applications however, there are better solutions, methods and concepts available.

    I truly enjoyed the article and also appreciate the debate on the subject.

  • Mike: I understand your frustration. Here's what I would advise. If you're not the one who's going to develop and maintain the scripts, try to choose people over technology. Find people you trust and let them use whatever they prefer. On the other hand if you're the one doing the work, you should make your own opinion by installing the technologies you're considering and try them out on simple things. The quality of the documentation and support should be one of your top criteria.

  • man, you really do not belive yourself, pls stop wasting your time...

  • I have to say that this blog has quite a history.

    I have a few questions:
    Now in 2007, where can I find performace statistics for PHP in comparisson to ASP.NET?

    Do you have any new information on the pros and cons of ASP.NET and PHP 5?

    Thanks

  • I am a Mechanical Engineer. I required to develop a small intranet site for departmental procurement monitoring system. I used MySQL, PHP5 on XP SP2. It did not take me weeks, as "A Real Beginner" says, but just a few days time, in addition to my routine work, to get the site up and running. I am happy, my boss is happy.
    I used PHP because I have found MS applications to be like fast food - good to look at & taste, but lacking value.
    I know Roy will tell me to go away. Roy, I don't like your attitude, and am not returning to this site... don't bother asking me to go away.
    But, before I leave, I must say that everything has its pluses and minuses.... you should be discussing that, rather than ranting against PHP. We see large websites running successfully on PHP. Learn to accomodate others' views.

  • Good for you, Parag, but the name's Bertrand, not Roy.

  • This battle is really entertaining to read. But not as informative...

    Bertrand Le Roy: It would bee much easier to beleive what you are saying if you had a less aggressive and insulting attitude. (Like just saying to "Parag" that he's got your name wrong...)

    Anyone who's looking for information on ASP.NET or PHP or both (like me) will, after reading this, conclude that the Hull article is probably very biased and that the Bertrand Le Roy one probably is too. Nothing more than that, unfortunately...

  • I have been using many different programming languages and PHP was the one I was consistent with for several years. Since I learned CSharp, I fell in love with it. I am very excited to learn many new things in ASP.NET platform.

    ASP.NET introduces excellent project development lifecycle and everything is well-managed and more disciplined than PHP. ASP.NET also provides a better mechanism to handle database applications with connection pooling.

    ASP.NET has a powerful backend of IIS, Sharepoint, and Team Foundation Server. With these, your team will be concentrate more on business logic.

    PHP really needs many many vital improvements in order to get compared to ASP.NET.

  • Couldn't read every word but I'm currently learning PHP as my first programming language. I got the impression from a few comments that its a good way to introduce yourself to scripting. I've finished a web design course and figure I'd be better suited to developing. Any pointers on entering the industry?

  • Nulty, unfortunately it is extremely hard to enter the industry as someone who only knows PHP. For some time now, PHP programmers have been a dime a dozen. The only work you will find for "PHP only" these days are low-paying two-week hack jobs on Craig's List.

    You'd be better off learning ASP.NET and VB.NET (or C#) with Visual Studio and then entering the industry that way. Instead of $12 an hour with PHP, you'd be making at least $25 an hour with the .NET Framework (or Java for that matter).

    PHP is going to ingrain a lot of bad habits as a programmer... I'd recommend starting with VB.NET and ASP.NET instead. The route is more rewarding to learn as a beginner, and easier to monetize as a real career than PHP.

  • Hmm, funny. I have always found ample PHP work. it just depends on where you live. Houston, TX (aka ASP.NET Land), good luck! 300 miles north in Dallas, TX? Hell, there's more PHP out here than .NET.

    If you're prepared to move you can always find 6-figure php jobs if you're a good coder and the mid-60s is easy to find if you're not.

  • Bertrand, your post is one of the best I have read regarding php vs asp.net.
    We (me and my team) moved to PHP (we were using classic ASP) 2 years back because of clients insisting on using it.
    After reading your post, we want to try out ASP.NET.
    Thanks.

Comments have been disabled for this content.