Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. .net or php

.net or php

Scheduled Pinned Locked Moved Web Development
csharpphpquestion
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ABBASI_RA
    wrote on last edited by
    #1

    hi i want to know which one is better for web programming? .NET or PHP ? thanks

    R A J 3 Replies Last reply
    0
    • A ABBASI_RA

      hi i want to know which one is better for web programming? .NET or PHP ? thanks

      R Offline
      R Offline
      raouls
      wrote on last edited by
      #2

      personally, i prefer php. pro's: it's faster, has more control over the layout, appearance and general look of the page. it also connects to a multitude of databases, and has a huge function set. con's: it isn't object orientated, it's nothing like windows programming (if that's what you're used to), you generally have to do a lot more to get things going. in terms of asp.net, pro's: it's very much like windows forms programming, you don't have to know much about html or javascript or anything else to make your site work con's: it's slow, it has very little control over the layout and appreance of the page, it can initially only connect to ms sql server, it only runs on iis, it's cumbersome, it makes heavy use of javascript - meaning that it doesn't work in all browsers i prefer php due to the fact that i have greater control over the pages and i don't have to worry about licensing costs when connecting to a number of the databases. i can also set up a server anywhere, on windows or linux, which means that no matter what environment i'm in, i can still develop my php sites/pages. the choice depends on you. there are pro's and con's to both. imho, php's pro's outweight it's con's, and i personally think that some of it's con's are actually pro's, and that's what sells php for me. universal rule of thumb applies tho: ymmv - your mileage may vary -- Raoul Snyman Saturn Laboratories e-mail: raoul.snyman@saturnlaboratories.co.za web: http://www.saturnlaboratories.co.za/ blog: http://blog.saturnlaboratories.co.za/ linux user: #333298

      D 1 Reply Last reply
      0
      • R raouls

        personally, i prefer php. pro's: it's faster, has more control over the layout, appearance and general look of the page. it also connects to a multitude of databases, and has a huge function set. con's: it isn't object orientated, it's nothing like windows programming (if that's what you're used to), you generally have to do a lot more to get things going. in terms of asp.net, pro's: it's very much like windows forms programming, you don't have to know much about html or javascript or anything else to make your site work con's: it's slow, it has very little control over the layout and appreance of the page, it can initially only connect to ms sql server, it only runs on iis, it's cumbersome, it makes heavy use of javascript - meaning that it doesn't work in all browsers i prefer php due to the fact that i have greater control over the pages and i don't have to worry about licensing costs when connecting to a number of the databases. i can also set up a server anywhere, on windows or linux, which means that no matter what environment i'm in, i can still develop my php sites/pages. the choice depends on you. there are pro's and con's to both. imho, php's pro's outweight it's con's, and i personally think that some of it's con's are actually pro's, and that's what sells php for me. universal rule of thumb applies tho: ymmv - your mileage may vary -- Raoul Snyman Saturn Laboratories e-mail: raoul.snyman@saturnlaboratories.co.za web: http://www.saturnlaboratories.co.za/ blog: http://blog.saturnlaboratories.co.za/ linux user: #333298

        D Offline
        D Offline
        DavidNohejl
        wrote on last edited by
        #3

        raouls wrote: it's slow, it has very little control over the layout and appreance of the page, it can initially only connect to ms sql server, it only runs on iis, it's cumbersome, it makes heavy use of javascript - meaning that it doesn't work in all browsers Soapbox! :mad: Not everything you wrote is true. E.g ASP.NET isn't slower than PHP. Btw, is PHP finaly compiled language? For layout/browser support - you CAN have FULL control over what you send to browser.... list goes on, I'd really prefer other place for this discussion. For your defence, well, it wasn't easy question. David Never forget: "Stay kul and happy" (I.A.)
        David's thoughts / dnhsoftware.org / MyHTMLTidy

        R 1 Reply Last reply
        0
        • D DavidNohejl

          raouls wrote: it's slow, it has very little control over the layout and appreance of the page, it can initially only connect to ms sql server, it only runs on iis, it's cumbersome, it makes heavy use of javascript - meaning that it doesn't work in all browsers Soapbox! :mad: Not everything you wrote is true. E.g ASP.NET isn't slower than PHP. Btw, is PHP finaly compiled language? For layout/browser support - you CAN have FULL control over what you send to browser.... list goes on, I'd really prefer other place for this discussion. For your defence, well, it wasn't easy question. David Never forget: "Stay kul and happy" (I.A.)
          David's thoughts / dnhsoftware.org / MyHTMLTidy

          R Offline
          R Offline
          raouls
          wrote on last edited by
          #4

          i thought i'd just bring the last part of my post to your attention: raouls wrote: universal rule of thumb applies tho: ymmv - your mileage may vary get as angry as you want, but it's still not going to change what i have experienced. -- Raoul Snyman Saturn Laboratories e-mail: raoul.snyman@saturnlaboratories.co.za web: http://www.saturnlaboratories.co.za/ blog: http://blog.saturnlaboratories.co.za/ linux user: #333298

          D 1 Reply Last reply
          0
          • R raouls

            i thought i'd just bring the last part of my post to your attention: raouls wrote: universal rule of thumb applies tho: ymmv - your mileage may vary get as angry as you want, but it's still not going to change what i have experienced. -- Raoul Snyman Saturn Laboratories e-mail: raoul.snyman@saturnlaboratories.co.za web: http://www.saturnlaboratories.co.za/ blog: http://blog.saturnlaboratories.co.za/ linux user: #333298

            D Offline
            D Offline
            DavidNohejl
            wrote on last edited by
            #5

            raouls wrote: i thought i'd just bring the last part of my post to your attention: raouls wrote: universal rule of thumb applies tho: ymmv - your mileage may vary I did read that. raouls wrote: get as angry as you want Oh please. You did not see my smile when I was writing? :rolleyes: raouls wrote: but it's still not going to change what i have experienced. Been there, done that; refused to do anything in PHP again. FYI I moved from PHP to ASP.NET, not that I've been using ASP.NET and tried PHP once. Use your PHP. No problem. Just don't talk black about ASP.NET... unless you say truth :) Like if you said ASP.NET has slow first respose, because it JITs whole thing... For really small apps ASP.NET can be slower, because it's quite overkill. But it's like MySQL vs. MSSQL... First may be slower for small tasks, but second run out of gass for bigger tasks. That's waht you meant IMHO. For what I could get angry is your statement that you don't have full control over page output. That shows you don't know ASP.NET, or that you are sane enough not to render controls by yourself. For example, my homepage runs on ASP.NET, and it's *almost* valid XHTML1.1 Why almost? Well, because of stupid designer (but that's not ASP.NET fault!) and my own laziness. No constraints from ASP.NET side. Of course, it means some more work and you are not able to use most of web controls (which is one more advantage of ASP.NET). But how does it differ from PHP? Still, you get huge advantage (.NET framework, codebehing) on back-end. I know PHP templates, but still too bad when compared to codebehind. The bottom line is, ASP.NET is more like platform, you can use many languages (I know people who are working on PHP.NET, btw) etc. So arguments like it uses lot of JavaScript is... hmm... not full truth. David Never forget: "Stay kul and happy" (I.A.)
            David's thoughts / dnhsoftware.org / MyHTMLTidy

            1 Reply Last reply
            0
            • A ABBASI_RA

              hi i want to know which one is better for web programming? .NET or PHP ? thanks

              A Offline
              A Offline
              alex barylski
              wrote on last edited by
              #6

              ASP is BASIC syntax... PHP is C syntax... Do the math ;) It's frustrating being a genius and living the life of a moron!!!

              D 1 Reply Last reply
              0
              • A alex barylski

                ASP is BASIC syntax... PHP is C syntax... Do the math ;) It's frustrating being a genius and living the life of a moron!!!

                D Offline
                D Offline
                DavidNohejl
                wrote on last edited by
                #7

                WTF? he's talking about .NET... you can have C# syntax... or MC++ if you really want or even PHP[^]! ;P That's it. p.s no, I am not paid by Microsoft to bash PHP :) I just make my living with ASP.NET... you do the math ;) David Never forget: "Stay kul and happy" (I.A.)
                David's thoughts / dnhsoftware.org / MyHTMLTidy

                1 Reply Last reply
                0
                • A ABBASI_RA

                  hi i want to know which one is better for web programming? .NET or PHP ? thanks

                  J Offline
                  J Offline
                  JKroschel
                  wrote on last edited by
                  #8

                  Regarding the debate of which one is faster, you have to realize that people are comparing their own personal experiences. This is not a controlled situation. You could have a very simple program written in a horribly slow language versus a complex program written in a fast language and the simple program will out perform the complex one just because it has less to do. You could also have a complex program running on a fast server out performing a simple program on a slow server...There are just too many variables. One thing to keep in mind is .net will create a virual compiled version of your application on hand. It is compiled at the first run-time and is kept until the .net file is updated. This means that you have a compiled program going up against a .php file which has to be interpreted each time it is run. This is the step which will always make .net faster than php WHEN EVERYTHING ELSE IS EQUAL. Speed aside, you are asking which is better for web programming. In my 21 years of programming, I've learned there is no better language. There is just better use of the one you choose. Pick one and be good at it and you will always be better than people who half-ass their way through "the newest thing" - if you know what I mean.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups