none
.net or PHP?

    Question

  • I know this is a microsoft forum and most people will argue for .net but i have been using PHP and it seems more user friendly

    Why should i go over to .net

    Wednesday, February 03, 2010 2:45 PM

Answers

  • I've used both .NET and PHP for a very long time now and I'll take .NET projects over PHP any day.  There are many arguments and positions on the subject, but for me it comes down to ease of work.

    The following things make .NET a better development environment (in my opinion anyway):

    - Visual Studio is far superior to any IDE that I have found for php (and I've tried many on them)

    - Since .NET is a compiled, there is a whole host of typo, casting, bad formatting, etc, bugs that are resolved while typing your code or at least once it's compiled.  This takes care of the first line debugging issues for you.

    - Debugging in .NET is far superior from being able to set break points, step thru code, etc.

    In the past, it seemed most of my php projects came from my smaller clients who couldn't afford the costs involved with running Window servers, etc.  However, these days hosting solutions have made the much less of an issue.

    I'd be more than happy to discuss the matter further if you have any questions.  I'm sure others on the forums will have some opinions as well.

    Hope this helps.

    Tony

     

    Wednesday, February 03, 2010 3:53 PM
  • I basically agree with Tony Champion and Teichgraf, anyway have some few considerations to make:


    1. As php is an interpreted script it's easier to make "changes on the fly". Changes on a .net project in most cases need a working Visual Studio environment available.


    2. When comparing php to .net you are not simply comparing programming languages or development environments, you are comparing technologies, design paradigms and programming philosophies.


    3. Because of the above statement, if you are passing from php to .net you need a change in your programming mindset. You can't simply start writing asp.net code with the php mentality. You have to learn a new framework: asp.net is more like the Java-J2ee environment, it implements something similar to the servlet/JSP technology within a sort of MVC pattern (something similar to Jakarta Struts, just to name an alternative) and many other complex features.


    4. Dot Net is optimized to work with SqlServer as a RDBMS, IIS as a web server and Windows (Server) as OS. If these three conditions are respected you are able to produce fast running and also fast produced web applications. But I won't say that an equivalent php web application on a Unix environment with Apache and MySql can't be faster: Having the php running on a HP-Unix Superdome would produce me more than a dubt, even if the .net application runs on the fastest multi-core Itanium available.


    5. Again, about developing style: it happened to me that I've been able to develop a full asp.net application without even writing a single line of code. Having the DB set with some basic Tsql stored procedures, the higher application layers have been created simply by selecting items from drop-down lists, pushing radio buttons, filling name fields and checking check boxes, completely old-visual-basic style. When you let Visual Studio do the "dirty job" applications usually work great, provided that you even don't look at the code Visual Studio produced. If you need to customize the code things may become very, very different.

     Andy

    Friday, February 05, 2010 4:52 PM

All replies

  • I've used both .NET and PHP for a very long time now and I'll take .NET projects over PHP any day.  There are many arguments and positions on the subject, but for me it comes down to ease of work.

    The following things make .NET a better development environment (in my opinion anyway):

    - Visual Studio is far superior to any IDE that I have found for php (and I've tried many on them)

    - Since .NET is a compiled, there is a whole host of typo, casting, bad formatting, etc, bugs that are resolved while typing your code or at least once it's compiled.  This takes care of the first line debugging issues for you.

    - Debugging in .NET is far superior from being able to set break points, step thru code, etc.

    In the past, it seemed most of my php projects came from my smaller clients who couldn't afford the costs involved with running Window servers, etc.  However, these days hosting solutions have made the much less of an issue.

    I'd be more than happy to discuss the matter further if you have any questions.  I'm sure others on the forums will have some opinions as well.

    Hope this helps.

    Tony

     

    Wednesday, February 03, 2010 3:53 PM
  • Don't forget performance. .Net is much faster than PHP scripts.
    Wednesday, February 03, 2010 3:56 PM
  • really i have always been a php guy

    well i was told to be one.

    isnt .net faster because it runs on own server.btu cost more

     

    Thursday, February 04, 2010 5:17 PM
  •  Thanks Tony:

     I was trying to decide between .net  or php and since I am a student was bit confused which one to use. Does VB work with php without any problems?

    Merry

    Thursday, February 04, 2010 11:15 PM
  • I basically agree with Tony Champion and Teichgraf, anyway have some few considerations to make:


    1. As php is an interpreted script it's easier to make "changes on the fly". Changes on a .net project in most cases need a working Visual Studio environment available.


    2. When comparing php to .net you are not simply comparing programming languages or development environments, you are comparing technologies, design paradigms and programming philosophies.


    3. Because of the above statement, if you are passing from php to .net you need a change in your programming mindset. You can't simply start writing asp.net code with the php mentality. You have to learn a new framework: asp.net is more like the Java-J2ee environment, it implements something similar to the servlet/JSP technology within a sort of MVC pattern (something similar to Jakarta Struts, just to name an alternative) and many other complex features.


    4. Dot Net is optimized to work with SqlServer as a RDBMS, IIS as a web server and Windows (Server) as OS. If these three conditions are respected you are able to produce fast running and also fast produced web applications. But I won't say that an equivalent php web application on a Unix environment with Apache and MySql can't be faster: Having the php running on a HP-Unix Superdome would produce me more than a dubt, even if the .net application runs on the fastest multi-core Itanium available.


    5. Again, about developing style: it happened to me that I've been able to develop a full asp.net application without even writing a single line of code. Having the DB set with some basic Tsql stored procedures, the higher application layers have been created simply by selecting items from drop-down lists, pushing radio buttons, filling name fields and checking check boxes, completely old-visual-basic style. When you let Visual Studio do the "dirty job" applications usually work great, provided that you even don't look at the code Visual Studio produced. If you need to customize the code things may become very, very different.

     Andy

    Friday, February 05, 2010 4:52 PM
  • Full Marks 10

    User Friendly

    PHP = 8  /  .NET = 6

    Speed

    PHP = 7  /  .NET = 9

    Security

    PHP = 7  /  .NET = 8

    • Proposed as answer by Hritesh Bagchi Friday, December 27, 2013 8:59 AM
    Friday, December 27, 2013 8:58 AM