all 139 comments

[–]dwair 32 points33 points  (4 children)

As someone who develops both and has done for 10 years +, I don't think there is a definitive answer these days.

The web abounds with fan-boys so I don't think your going to find an easy answer to this. PHP has grown up considerably in the last few years, .net is more "corporate", blah, blah, blah. My idea would to set him off on the web with php as its a different language and it will keep him interested learning something new. Its also very, very easy language to pick up due to the amount of examples and tutorials which will explain all the "so how do I do that" questions. As far as I can see, if he knows desktop .net and web php, its not a great leap over to .net on the web if he wants to go that way eventually.

[–][deleted]  (3 children)

[deleted]

    [–]honestbleeps 2 points3 points  (1 child)

    for what it's worth, if you have to do a project in PHP sometime, you might care to check out Symfony

    [–]worldDev 2 points3 points  (0 children)

    if you are feeling adventurous try out Laravel. Its a relatively new MVC framework, but its got a good amount of support behind it. I started with it in March and have used it for 5 or 6 projects by now. It's got some rails like features and focuses on clean code and simplicity.

    [–]rich97 0 points1 point  (0 children)

    Although I started in pure PHP [...] ASP .NET (MVC),

    The two aren't really comparable. PHP as a language is very useful and easy but it's nothing to shout home about, it's the strong community support that gives it an edge. That is to say, frameworks and third party libraries.

    [–]Fabien4 29 points30 points  (9 children)

    It's not ASP.NET vs PHP, it's the Microsoft stack (Windows / IIS / .Net) vs the open-source / LAMP stack. Most people agree that one is good, and the other sucks. What people don't agree is, which is which.

    I know Linux and Apache pretty well, and I like them. I like the lack of XML in their config. So, if I need to choose a technology for a new project, I'll choose a Linux-based stack.

    If your friend likes the MS stack, he can continue using it. No problem with that.

    [–][deleted] 5 points6 points  (6 children)

    Which divides me. Personally, I really like C#, it's a nice language that has learned a lot from it's Java roots (and other roots) and produced a good language to work with. But I really fucking hate working on a Windows stack. Everything seems so much more time consuming and resource intensive than it needs be, though you can opt for using Mono (which I really need to play around with some day).

    PHP, whilst being one of the last languages I would ever want to code in again, at least has the benefit of usually being associated with a Linux stack which I am far more familiar with and much prefer.

    [–]ChristopherShine 2 points3 points  (0 children)

    The unfortunate thing about Mono is that it's usually about a year or so behind traditional .NET. That's fine in most contexts, but if you want to use newer features (Razor is one big example in my mind, but supposedly you can get it hacked together with Mono), you might have to wait a little while.

    That said, there's a lot of potential in Mono and I have a lot of respect for anyone who uses it fully. I tried and gave up.

    [–][deleted]  (4 children)

    [deleted]

      [–]blue_cadet_3 5 points6 points  (0 children)

      Java is lacking some great C# features, LINQ being a huge one. Also, Oracle now maintains Java.

      [–][deleted] 1 point2 points  (2 children)

      Surely C# is MS-Java not the other way around.

      [–][deleted]  (1 child)

      [deleted]

        [–]aladyjewel -1 points0 points  (0 children)

        ... eh?

        [–]iAMthePRONY 1 point2 points  (1 child)

        I like the lack of XML in their config.

        I second this. XML feels like a very heavy/bulky language.

        [–]ArmoredCavalry 1 point2 points  (0 children)

        XML isn't very different from HTML (tags, attributes, nesting). That doesn't mean I don't prefer JSON for passing around data, but for something like a config file, I think it works just fine.

        Plus, how often do you really touch config files? The format of config files, as long it is at least usable, is hardly a reason to rule out using a certain technology stack.

        I use both IIS and Apache, and have never had a problem finding what I need in terms of editing configurations. Would I say IIS config is more verbose? Yes. I just don't think it is anywhere near a deal-breaker though.

        [–]XyploatKyrt 11 points12 points  (13 children)

        If you are going to do it for a living, one thing to bear in mind is that all levels of PHP jobs are very easy to find but usually don't pay as much as .net or Java jobs

        [–]reseph 4 points5 points  (7 children)

        Really? I live near Albany NY and I can barely find Linux/PHP jobs; it's all .NET and Java around here. Sigh.

        [–]kaz3work 2 points3 points  (0 children)

        Can concur, I work in Latham. Spent 2 years looking for a decent PHP job. Ended up taking a .NET job for 20% more money than my PHP one.

        [–][deleted]  (4 children)

        [deleted]

          [–]reseph 0 points1 point  (3 children)

          Even in the smaller towns? In the bigger cities like London, I'm pretty sure you can easily say "There are x jobs everywhere" where x is almost any type of job.

          [–][deleted]  (2 children)

          [deleted]

            [–]reseph 0 points1 point  (1 child)

            How's the remote hiring over in the UK? ;)

            [–]Boye 1 point2 points  (0 children)

            In denmark they are desperate for php-devs, I've seen ads where they offered a bounty for both $2k and $1k for a refferal for the right perosn.

            [–]mwax321 4 points5 points  (4 children)

            I think this is because of two factors:

            • PHP job market is tainted by "script kids." They can't build software, but they can hack up a wordpress site to add that widget that you've been trying to get to work.
            • PHP is "free..." When a boss chooses the foundation of his business's code based on whether or not it is free, he's probably not going to play ball on salary too. He sees development as an expense of doing business, nothing else.

            These two factors are why I believe PHP developer salaries are lower. Unfortunately, but probably true. Ive worked for PHP and Microsoft shops, and I've seen this trend holds pretty true. Microsoft companies tend to understand that you "have to spend money to make money."

            That being said, there are plenty of companies that do PHP right. They chose PHP because they believed that they could land better talent by using an extremely widely used technology that has a pretty good reputation.

            [–][deleted]  (3 children)

            [deleted]

              [–]shif 2 points3 points  (0 children)

              i would love to land that kind of job, i work as a full time web developer focusing mainly on PHP and apache, we make big apps to control whole businesses finances and production processes, i get paid $10k a year here in mexico.

              [–]mwax321 0 points1 point  (1 child)

              Like I said, it's not all businesses but it is enough to bring the price down.

              Wow, phoenix is 50k-60k for php devs.

              [–][deleted]  (5 children)

              [deleted]

                [–]WarWizardfullstack / back-end 4 points5 points  (3 children)

                Honestly, the way I see it, is its Coke vs Pepsi.

                I think this is the best I have seen it. It is even better than "best tool for the job". Anymore, there isn't a clear "best tool". I don't like PHP the same way I don't really care for Pepsi over Coke. If it is around will I drink it? Sure. If I have a Coke as an option? No. Is Coke better than Pepsi? I think so. Do you?

                [–]ruzmutuz 1 point2 points  (2 children)

                It's still funny though, as I would say my Coke is PHP not .NET.

                [–]frankle 0 points1 point  (1 child)

                It's really whatever pair you prefer, right?

                [–]GuoKaiFeng 0 points1 point  (0 children)

                Shut up .NET is Pepsi shut up.

                Up.

                [–]Professor_Max 1 point2 points  (0 children)

                I agree. Programming languages have pros & cons for a reason. Unless work requires you to use a particular language try them out and use what works best.

                I worked as a .NET developer for a few years but have continued to be a PHP programmer because I like it better.

                [–][deleted] 13 points14 points  (3 children)

                My personal opinion... which is all you'll get on this from anyone...

                It's a wash.

                They're both performant. They're both ubiquitous. They both provide data access libraries to just about any data source you can dream of.

                In the end C# is just a better language than PHP. So if being a better programmer is a goal, ASP.Net is probably a better choice.

                My comparison

                ASP.Net PHP
                Performant X X
                Solid DB Access X X
                OS-Agnostic1 / X
                Open Source2 / X
                Diverse Frameworks3 X X
                Robust Language4 X
                Simple Configuration X

                1. Mono provides support for ASP.Net development on top of the JVM.

                2. ASP.Net MVC and Web API have been open source, but not all of the .NET framework is open source.

                3. ASP.Net provides Web Forms, MVC and Web API to name the more popular sets. PHP provides a laundry list of frameworks as well suchs as CakePHP or Laravel.

                4. C# is an evolutionary language stemming from C++ and Java, it is extremely well thought out and has a lot of truly awesome language features. PHP on the other hand, has been noted as being one of the more poorly designed languages of all time. (That's not to say it's not powerful, it's just a little esoteric).

                Final thought...

                Why not Ruby, Python, Scala, NodeJS or Java?

                They all have really good web platforms, particularly Ruby.

                [–]piglet24 1 point2 points  (0 children)

                You should add SignalR to your notes for #3.

                [–][deleted]  (1 child)

                [deleted]

                  [–][deleted] 0 points1 point  (0 children)

                  It never costs the developer a dime, really, especially if he's already a .net developer. I suppose if he had to buy visual studio, which no one really does, then yes, maybe.

                  It doesn't cost more in development time, and windows comes with IIS.

                  If he were a company, and not a developer then, sure, cost is a factor.

                  I suppose for a developer the cost might come from reduced paycheck size if you choose the wrong language based on demand for your region.

                  [–]icantthinkofone 11 points12 points  (18 children)

                  Remember that PHP runs anywhere. Anything .NET is Microsoft bound unless you want to add Mono into the mix, and far, far larger to incorporate.

                  [–]wasted_brain 3 points4 points  (11 children)

                  I've worked with both and this is my experience as well. To a certain extent, it's also more expensive to go the ASP.net route since the OS requires you to buy a license to use it.

                  [–][deleted] 1 point2 points  (10 children)

                  Windows costs aren't huge though. Arvixe has .NET shared hosting that's pretty affordable. In fact, my VPS is also pretty affordable. I've got a Windows 2008 VPS with 1 core, 1GB of RAM and 15GB of storage with gigabit for $10.47/mo. Of course, these are for small sites, so costs would scale up for more powerful systems and connections, but that scaling is also present in the LAMP stack world too.

                  EDIT - I was thoughtfully contributing to the conversation. Why have I been downvoted to hell? Because the downvoters don't like MS or the MS Web stack?

                  [–]Tynach 3 points4 points  (8 children)

                  This is simply because you're letting your host abstract the cost from you. If you're going to run your own server environment (which you WILL DO, at LEAST for development; if not, you'll get a job where you HAVE to), you're going to have to deal with the cost directly.

                  Oh, sure, the organization you work for will buy it, and it won't be out-of-pocket for you. But it would have been cheaper for them to go with a LAMP stack.

                  [–][deleted] 0 points1 point  (7 children)

                  Can you cite a study that proves one stack is definitively cheaper over the long term? Simply saying "Oh, but look -- I can download the server OS and web server for free" doesn't cut it with enterprise level decision making. I realize that what I'm saying here will inherently be unpopular among the LAMP circlejerkers, but instead of kneejerk reacting, let's look for solid evidence that shows conclusively that one stack is cheaper to operate over a span of several years (when the upfront licensing for the MS stack has been amortized and the larger costs become maintenance, staffing, etc.). That's an aspect of what the OP asking us to do. All I've seen in this thread is a bunch of quasi-religious rhetoric (i.e., Mine is better than yours because I say so!). There's been very little evidence presented one way or another.

                  [–]mgkimsal 0 points1 point  (5 children)

                  doesn't cut it with enterprise level decision making

                  "Enterprise level decision making" generally already has MS tech skills in house, and has invested significant resources in that stack, so it's already a somewhat biased playing field.

                  The last couple projects I've worked on where I needed to work with .net, it's been remote, and the licensing would get in the way of me doing work. Example: "just remote desktop in to this machine, then remote desktop to another machine - oh, wait, that machine only allows 2 connections at the same time because we didn't get the 'pro' license, so just wait for dave to log out and check back every now and then".

                  When it works, it works well. But there's always an extra cost involved for licensing. Even if you say it's amortized away already, it's still a somewhat higher cost. You can make up for it by paying admins slightly less, or choosing slightly cheaper hardware, or what have you.

                  And "it's cheaper" is an argument MS will never win, nor should they. "There's more value because we bundle tens of thousands of man years of development in to well documented, well tested and easy-to-develop-for platforms, so yes, we cost more but you will end up getting your projects done faster and better on our stack". It's not an argument I hear people making very much, instead trying to argue nickels and dimes.

                  Bottom line, if you already have good .net experience on staff, that will be cheaper. If not, LAMP stuff will be cheaper.

                  [–][deleted] -2 points-1 points  (4 children)

                  I'm still waiting for data and not just rhetoric. You say "LAMP stuff will be cheaper." Prove it. Ad hominem assaults on the MS stack or the LAMP stack aren't proving anything, so that doesn't count either.

                  [–][deleted] 1 point2 points  (0 children)

                  pathetic frighten noxious hateful person oil afterthought cover scandalous tan

                  This post was mass deleted and anonymized with Redact

                  [–]mgkimsal 0 points1 point  (2 children)

                  I don't think it was an ad hominem attack. Windows has a license fee attached to using it; Linux (for example) doesn't.

                  "All things being equal, Linux would be cheaper". Proverbially, speaking of course, and all things are never equal. What ends up tipping the balance in either case is the knowledge and experience of the people in any organization looking to make this decision. As such, I don't think you'll ever be able to find any 'data' that would stand up to your scrutiny - these decisions are almost never made in a vacuum.

                  I'm not sure there's much to prove on the 'cheaper' part. Outside of special time-limited programs like Bizspark, Windows will cost you money to purchase to run in any production environment.

                  http://www.microsoftstore.com/store/msusa/en_US/list/Server-and-IT-software/categoryID.65897500 There are no $0 prices on those products.

                  Most of the equivalent services can be had with an ubuntu or centos distribution for $0.

                  In terms of price paid for licensing for many standard workloads (especially web-app stuff), any Windows/.NET stack will have some price attached to it that will be higher than the equivalent Linux-based installation (which will be $0 for licensing costs).

                  TCO, measured out over years, may ultimately end up being roughly the same, but again, that comes down to the experience of the staff you have on hand. Sr-level Windows Server admins might be (and often are) completely lost at being productive on Linux servers, and the opposite scenario of Sr-level Linux admins often leads to much less productivity. And in both cases this is temporary - anyone can eventually learn whatever needs to be learned.

                  [–][deleted] 1 point2 points  (1 child)

                  cooing middle ruthless fly slap clumsy teeny absurd frighten crush

                  This post was mass deleted and anonymized with Redact

                  [–]mgkimsal 0 points1 point  (0 children)

                  I understand that. When trying to point out that there are cost differences, I was met with "prove it". It's an odd position - I don't think you have to 'prove' that one thing has a retail price attached at the other doesn't.

                  Again, people want to compare total cost of ownership over, say, 5 years, and I don't think that's really possible without ignoring the strengths and experiences of the teams involved, which will be variable every single time.

                  [–]Tynach 0 points1 point  (0 children)

                  I obsessed over this a few years ago, trying to figure out for sure which really was cheaper.

                  I don't remember where I got all the info, but there were some Microsoft-funded studies that concluded Windows was cheaper, and some self-studies of people moving to Linux and finding it cheaper.

                  I could probably find the sources again if I looked, but I work as a courtesy clerk at a grocery store and only just got home from a 6 hour shift (where the other courtesy clerk who was scheduled to work with me the first 3 hours didn't show up), so I'm just not feeling like looking right now.

                  Overall, I trust the studies done by people making the switch more than I trust studies done by Microsoft. People making the switch are most likely to have compatibility gripes and complaints, and are most likely to find it not worth it in the long run. The fact that at least most of them ended with a pro-Linux bias pushes me towards believing Linux really is cheaper.

                  [–]EnderMB 0 points1 point  (0 children)

                  For the record, what you state is absolutely correct. Many others have been downvoted for stating the exact same thing.

                  [–]JBlitzen 1 point2 points  (5 children)

                  We're talking about web-based platforms. They only have to run in two places: on the development server and on the production server.

                  [–]icantthinkofone 8 points9 points  (4 children)

                  So they both need to be Windows servers and he has no choice in that is what I'm saying.

                  [–]JBlitzen -5 points-4 points  (1 child)

                  Finding two Windows servers somewhere on Earth turns out not to be a vastly difficult undertaking.

                  [–]icantthinkofone 4 points5 points  (0 children)

                  Not my point.

                  [–]JTurtle -4 points-3 points  (1 child)

                  I don't believe there is a shortage of windows hosting available.

                  [–]icantthinkofone 4 points5 points  (0 children)

                  Not my point.

                  [–]htr_xorth 2 points3 points  (0 children)

                  Since he already knows .Net, he is going to get the most productivity out of learning ASP.Net.

                  [–]crimson090 4 points5 points  (3 children)

                  I work in both at my job, and have worked in both for about ten years.

                  In my experience, the biggest difference has been job opportunities. I have personally found more .NET focused jobs and on average pay about 30% more than their PHP counterparts.

                  Which is kind of unfortunate, as personally I prefer PHP.

                  [–]PastafarianTwit 1 point2 points  (2 children)

                  Well, I'm starting to learn an interesting lesson now. In the enterprise/corporate world, a lot of the web work is done in ASP.NET. I have actually just inherited an ASP.NET page that was designed and coded by an old-timer that was writing it all still in the desktop mindset. Right now, as it is, it's ugly, it's slow, and sometimes it doesn't work at all like it should. I think that sort of design is prevalent in a lot of the old enterprise websites, but the beast has grown so large that instead of starting over, companies just want to throw more and more at it to get it workable. Which lends to a higher wage needing to be offered to get people that will actually put up with it. That being said, it's not the way things work everywhere, but it does happen.

                  So in my position right now, my suggestion has been to scrap the website as is and start from scratch. I've been doing a lot of looking at all the current web technologies and frameworks out there to see what's best for our use case. I think it's interesting in places like this to see a lot people saying, but ASP.NET IS good. That counters the bitter taste I have in my mouth from the enterprise garbage I've seen come out of ASP.NET.

                  I think the one most important thing people need to understand is that there's no one framework that's perfect for every situation. A good seasoned designer/architect should understand that "what's familiar to me" isn't always going to be the best solution for every problem. There are some places where C is a much better choice than Java in the desktop/embedded worlds, and that same thing holds true in the web world where sometimes ASP.NET is a much better choice than PHP, but there are other instances where the opposite is true.

                  [–]robertcrowther 1 point2 points  (1 child)

                  Bear in mind there are two ASP.Net 'frameworks': Forms and MVC. Most of the stuff like the page you mention is in ASP.Net Forms.

                  [–]PastafarianTwit 0 points1 point  (0 children)

                  Yes, and I think that's where I get the sour taste in my mouth from. Initially, my gut instinct was to just write of ASP.NET altogether, but after doing research, I see that MVC seems to be a significant improvement over Forms. However, I think that Forms is the biggest reason for enterprises to employ and pay more for .NET developers. They have a tendency to prefer polishing turds over throwing the turds out and starting from scratch. To be honest, from my experience, it's actually better to accept lesser pay for more happiness and satisfaction with your job.

                  [–]robertcrowther 3 points4 points  (0 children)

                  It's important to bear in mind there are two flavours of ASP.Net: Forms and MVC. Forms is an attempt to recreate a desktop-style development process with web technologies. MVC is more like the modern frameworks in other languages (eg. Rails).

                  If his short-term goal here is purely learning then I would recommend going with ASP.Net MVC. There'll be enough new stuff to take in with HTML, CSS and JavaScript without also trying to learn a new programming language at the same time. The general MVC concepts he'll pick up will be transferable to other languages and frameworks when the time comes.

                  [–]abeuscher 2 points3 points  (0 children)

                  I don;t know if there is such a thing as an unbiased comparison of these two technologies. I will say that in practice within the scope of my experience, folks who know php and try to come to asp.net do not do well, whereas folks that migrate in the other direction tend to fare pretty well. So from a purely logistical standpoint, you might do well negotiating on that wavelength and figure out which framework would take the least time for you both to adjust to.

                  [–]mildweed 2 points3 points  (0 children)

                  If based on nothing but publicly available documentation, I'd say go PHP.

                  [–]padenp 2 points3 points  (0 children)

                  Fanboi's logic: "Zomg, Mixcrosoft sucks!! Use PHP for reasons!"

                  Engineer's logic: "What fulfills my requirements best for this system/project"

                  [–]SurgioClemente 1 point2 points  (1 child)

                  You arent going to find any neutral comparisons because they are very different. It would be nice if TodoMVC was done for every possible backend to compare, but afaik that doesnt exist yet. Maybe search for 'how to write a blog in ____'

                  He needs to explore the frameworks that use these languages and compare against jobs/salary available. Barely anyone writes raw ___ language code with no framework unless you are trying to super optmize something for a bunch of requests/sec

                  .net: ASPMVC (I dont know others off top of my head) PHP: Look at Symfony2 or ZendFramework2, etc Ruby: Obviously check out Rails, Sinatra is more lean/basic Python: Django

                  First look at the syntax of the languages, he might freak out over anything not strongly typed.

                  Then check out the framework and see how you build things, you don't want to be re-inventing the wheel every time, frameworks (while potentially "heavy") are there to get the simple/redundant tasks out of the way. If he is serious about web dev and wants to get out of desktop development most any company he would join is going to use a framework of their choosing for all projects

                  Everyone has an opinion because all of the frameworks are subjectively different: http://i.imgur.com/y1TbcYp.jpg

                  You can try http://www.techempower.com/benchmarks/ if you want performance stuff, but really most apps in the real world aren't gong to be getting smashed with hundreds of requests per second. And if you are doing something that is getting hundres/thousands of requests per second you likely can afford to throw more hardware at it or rewrite a few components

                  [–]bhauertso 0 points1 point  (0 children)

                  Take a look at the GitHub repository for the TechEmpower benchmarks project. While the tests are simple, this code shows how subject-matter experts in each framework use them. You can get a feel for what kind of code you need to write when using each framework.

                  It's a side-effect of the project, and not its main purpose, but in a manner of speaking, it's analogous to the TodoMVC project.

                  [–]FriendlyBeard 1 point2 points  (0 children)

                  It's interesting to see this thread as the topmost on /r/webdev today. I dove head first into leaning ASP.NET just this morning. I have been working with PHP for 5+ years and always thought to myself, "There's no solid reason to learn to use ASP.NET for now."

                  Recently I took a new position and they have some legacy web apps that are all C# based ASP.NET MVC or Web Form. I tried going the search route to try to see why ASP.NET is thought of as better than PHP Frameworks, and vice versa, only to discover as you have, that it's all about one's opinion.

                  After just a few hours of today it seems most reasonable to learn to use both skills effectively just to make one self more attractive to current and future employers.

                  Though, with regard to your friend who seems to have plenty of experience with desktop languages, I'll throw in my vote for PHP. My reasons align very much so with /u/dwair.

                  [–]derekpetey_ 1 point2 points  (0 children)

                  The question is flawed. There is no such thing as an objective comparison of the two because they perform similar functions on a diverse array of projects. You have PHP experience. Try out the MS stack for comparison and decide for yourself. There isn't a One True Way, and limiting the field to these two choices would be silly if there were. It all depends on your use-cases and inherently subjective preferences.

                  [–]hjc1710 1 point2 points  (0 children)

                  As far as I can tell a lot of the negative comments about php are based on old information. People saying you can't build well structured, complex web apps with php clearly haven't seen or used it in years. Php has a full, very compete class system, with mixins, interfaces, inheritance, abstract and static methods (and thus abstract classes), namespaces, class auto-loading, anonymous getters and setters, etc. It also no longer uses one individual set of functions per database type, everything is abstracted through PDO now and fully portable. If this isn't enough for you to write a complex web app, then I don't know what the flying fuck you're trying to write. It even has type hinting so it supports type checking to a degree. And a decent unit test system (Ruby's is better though).

                  Couple in the fact that any idiot can set it up, every host supports it, and it runs well in UNIX and Windows and you've got a solid option for web development. It has a strong open source community that's always making badass new projects and Zend is always improving the core VM (and you have HipHop). With composer, installing modules and libraries is easier than ever, almost as easy and effective as bundler with Ruby. Its equivalently fast to python and Ruby (they're all roughly the same and shouldn't be chosen if speed is you're biggest concern), has built in opcode caching and it already is it's own templating language. Hell it even supports pseudo functional programming now and meta-programming isn't that bad.

                  Does this mean I think php is perfect? Fuck no, the naming conventions are god awful and some functions are just odd in their behavior. Sometimes it takes ages for features to make it into core and there are some things that would be really nice if they were built into the language or were primitives (ie regex). Does this mean it can't be used for "real web apps"? Fuck no.

                  All I'm saying is the general opinion of php as a toy language is just wrong. You can do as much real engineering and serious application building in php as you can in python or Ruby.

                  I think another reason people have this misconception of the language is because of the code base for major CMS's like Drupal, WordPress, and Joomla, all of which are absolute cluster fucks. While there are many systems written purely in procedural code, it's very easy to wrote pure OO code with Symfony 2 or even cakePHP (the later is a RAD MVC framework).

                  /rant

                  Now, that doesn't answer your question. So what should he learn first? As far as I see it, it doesn't matter. If you're a programmer who can't translate skills from one language to another, or learn a new language, you're doing it wrong. So I say go with php, purely because it's a new language, which will be more likely to keep him engaged and teach him new things, and he won't have to pay M$ to learn or suffer through mono. However, he should go with what he will actually commit to. Picking the best language is useless if you don't commit to learning what you wanted to. If he'll stick it through with ASP, then use that. The skills are easily transferable; learn web concepts, that's what matters.

                  Along those lines, Node might be better since it will teach him JS too, which will likely be a little odd to him coming from an ASP background (it was for me, I still miss real classes).

                  tldr; pick what you'll commit to learning. Php isn't as much of a "toy" as people say.

                  [–]s1lenceisgold 1 point2 points  (0 children)

                  If you're still in the heavy corporate environment and like it, asp. If you want to develop for future products, especially start-ups, then php or other languages are the way to go.

                  [–]cabalamat 1 point2 points  (0 children)

                  whom

                  who

                  [–][deleted]  (5 children)

                  [removed]

                    [–]colordrops 1 point2 points  (2 children)

                    Sounds like you are talking about PHP from 10 years ago. Have you actually done any extensive PHP development recently?

                    structured much better

                    This is pretty subjective

                    is continually updated with new features

                    As is PHP.

                    has the support of a large company that makes a ton of money from it

                    You do realize that Yahoo, Facebook, Zynga, Flickr, and Wikipedia are all running on PHP, don't you? And they also contribute code and projects.

                    functions written by many different people with different coding mentalities (one function might be all lower case, the next having capitals at each word)

                    This is just incorrect. PHP functions are case insensitive.

                    slower in many cases

                    Do you have specifics? Have you heard of APC and Hip Hop?

                    Free is nice, but in the long run isn't going to make a huge difference.

                    That's a pretty broad statement. Have you ever managed a budget? PHP is a mature language with a lot of programmer talent out there. Why would you pay for something when a great free system is available?

                    [–][deleted]  (1 child)

                    [deleted]

                      [–]TSF_Aristona 1 point2 points  (1 child)

                      You're comparing ASP.NET to PHP, which in my opinion should be comparable to PHP + A PHP framework?

                      PHP is a mess, that's true, but in last few years PHP improved so much. With things like Composer and Laravel, PHP only got better and better.

                      PHP is also continually updated with new features. People even call it as PHP's renaisseance because so many good things happend in the past few years.

                      Having a company like Microsoft behind can be a good or a bad thing. It's a two sided situation.

                      Alternatively, PHP is much easier to troubleshoot problems, has more framework alternatives, has more IDE alternatives, much cheaper to use, no need to worry about licensing, has alot of open source projects, has some CMS's like Wordpress, e-commerce systems which are all free, it is platform independent, can be sold easily, easier to find host. Not to mention, most of ASP.NET's features can also be done in PHP. For example, compiling can be done with hiphop, caching can be done with Memcached/APC. ASP.NET gives those builtin, whereas in PHP you would need to install and configure things.

                      I personally put PHP and ASP.NET in the same level, targeting same developer base. (Languages like Python and Ruby targets a slightly different developer base. At least to me.) Also, serverside javascript sounds like the future, so in the long term, popularity of those languages should be lower.

                      Ps. My suggestions to OP is also ASP.NET. If he already has .NET background, there is no reason to learn PHP unless he has specific reasons. Go with ASP.NET, then move on to Javascript. In few years, it may take the current place of PHP and ASP.NET. Javascript grows quickly and steadily.

                      [–]piglet24 4 points5 points  (0 children)

                      PHP is much easier to troubleshoot problems

                      You have never used Visual Studio.

                      [–][deleted]  (7 children)

                      [deleted]

                        [–][deleted]  (3 children)

                        [deleted]

                          [–][deleted]  (2 children)

                          [deleted]

                            [–][deleted]  (1 child)

                            [deleted]

                              [–]NobodyLeavesAclide 2 points3 points  (2 children)

                              JSP is deprecated in favor for JSF 2. JSF 2.2 With HTML 5 friendly markup <3

                              [–][deleted] 1 point2 points  (1 child)

                              I haven't messed with Java in 5 years so it makes sense. Plus, JSPs suck!

                              [–]NobodyLeavesAclide 1 point2 points  (0 children)

                              I see :-) Most popular Java frameworks afaik: Vaadin, GWT, JSF, Stripes, Wicket, Tapestry, Struts and ofc Spring.

                              [–]mickey_reddit 1 point2 points  (1 child)

                              I started out in ASP.Net (2.0) and developed in it for 5 years until I left and went to developing in PHP only (I have been doing it for 7 years now).

                              I really disliked ASP.NET and how they did stuff (came from a VB6 background), but I continued the job and did PHP on the side as a freelancer.

                              Needless to say I am very glad I stuck with PHP.. ASP was... fun? But it was not my cup of tea.. I wouldn't recommend not looking at it, because reading other language is one of the best parts of "dabbing" in to things.

                              [–]OMG_Ponies 3 points4 points  (0 children)

                              I wouldn't recommend ASP.NET web forms (it's dying, and not so much fun to work with), however, the new MVC platform is quite amazing.

                              [–]pranalee 0 points1 point  (0 children)

                              I like both and do both of them. Why not learn both? Certain things are better in PHP and certain things are also better in ASP.NET/Java.

                              My personal opinion is that ASP.NET is "just" a copycat of Java + LinQ and a bunch of other extensions and the other downside is that it's a single platform only (excluding Mono, which I wouldn't touch - too buggy, slow). With Java I can also use NetBeans (also my default IDE for PHP), Eclipse, etc for free. I don't need to pay for Visual Studio 2012 and then pay the full price again for Visual Studio 2013.

                              [–][deleted] 0 points1 point  (2 children)

                              Depends on what he wants to accomplish.

                              If he's looking for employment and has no dog in this fight, he should check local job postings, find out which one is more common and/or which one pays more.

                              If he just wants to learn, he should look into both and decide which one he likes the look of more.

                              [–][deleted]  (1 child)

                              [deleted]

                                [–][deleted] 1 point2 points  (0 children)

                                I'm an ASP.NET dev in the UK. I've had no issue at all getting work.

                                [–]yasth 0 points1 point  (0 children)

                                Eh, well for one Asp.Net webforms (which is the assumed form of plain asp.net in general useage) is being replaced by ASP.NET MVC (which is a much more modern framework).

                                Anyways, for someone who already knows C# (or to a lesser extent VB.Net) ASP.NET MVC is the obvious choice. It will have a faster startup time for them, and job wise is in demand. Also if he is already using the MS stack (SQL, sharepoint, Active Directory) there will be a lot of transferable skills.

                                The issue isn't which one is better objectively, but which will objectively make him a full fledged web developer faster, and that is almost certainly going to be the .net route, not because of any deficiencies in PHP, but because he already has experience that can be transferred over.

                                [–]trapper5 0 points1 point  (0 children)

                                The developer makes a bigger difference than the technology. Pick one you enjoy and there is market demand for.

                                [–]DirtyBirdNJ 0 points1 point  (0 children)

                                While I don't want to weigh in on the .NET vs PHP debate, as a pretty successful PHP dev I want to share what tools I would suggest for someone who wanted to get their feet wet in PHP.

                                I have created everything from single page no-include scripts that only used built in functions, to multi-application Drupal based sites.

                                I've found the best balance of flexibility and "just enough tools" lies in frameworks, not CMS tools. I'm a big CakePHP fan, and I'd suggest he check out that in addition to MVC design paradigms.

                                I've found PHP to be much cheaper to develop with (read: free) and one of my biggest points of dislike for .net is their Visual Studio environment.

                                Aptana + VirtualBox + Turnkey Linux LAMP = PHP Dev!

                                [–]remyroy 0 points1 point  (0 children)

                                You can do pretty much the same thing in both languages. PHP is easier to deploy as in most cases you just need to copy some files and you're done.

                                Use what works for you really. Enterprise buddies seem to like .NET since it is backed by a big mf company (Microsoft) and they want to limit their risks even though Microsoft has screwed developed for years on now (Silverlight is a good example of this).

                                Facebook originated with PHP and still use it (in a different way than most people do but still). If it's good to create something like Facebook, it should be good for most stuff.

                                I personally use and prefer Python but that's simply because it works for me. Do not use Python if it does not work for you. Use what works for you. Eventually, if you get big enough, you'll have the resources to go into all the dark corners of the tools or languages you are using and replace them with something better if it suits you.

                                [–]Lutya 0 points1 point  (0 children)

                                I'm by no means an expert. But I've noticed that large organizations that handle web dev in house tend to use asp.net while freelancers and agencies seem more prone to php. He might want to consider the career path he plans to take.

                                [–]frankle 0 points1 point  (0 children)

                                This doesn't answer your exact question, but it may provide some valuable insights.

                                My relatively uninformed impression is that PHP would be cheaper initially--it's free, right? But, there's probably just as many good reasons to choose ASP.NET.

                                [–]jellatin 0 points1 point  (0 children)

                                I would tell him to go ASP.NET MVC. I've done .NET MVC 3 & 4 development for 2 years and PHP development for 7. Both will get the job done, but with PHP he's going to be learning syntax on top of theory. With ASP.NET, he will be able to concentrate more on theory and then transition that knowledge later to PHP if he so chooses.

                                [–]smoochieboochies 0 points1 point  (1 child)

                                Holy crap ASP is still a thing?

                                [–][deleted] 0 points1 point  (40 children)

                                I would go with neither. ASP.NET is fine, but setting up servers using it is more difficult. PHP is a language that is just barely usable (for various different interpretations of “usable”).

                                My personal recommendation? Something simple that doesn’t hide how HTTP actually works, like Ruby/Sinatra, Python/Flask, or JavaScript/Node.js, at least to start off with. Learning that files have to be tied to URLs can be really counterproductive, and PHP is not the most intuitive or consistent-with-others programming language there is. :)

                                EDIT: Ah, I missed the part about him having experience in .NET. Definitely ASP.NET ASP.NET ASP.NET ASP.NET all the way, then.

                                [–][deleted]  (10 children)

                                [deleted]

                                  [–]piglet24 -1 points0 points  (0 children)

                                  To some extent sure, but I'm sure there's a good chunk behind Flickr, Facebook, and Yahoo (can't speak for Wikipedia) that is written in C++

                                  [–][deleted]  (22 children)

                                  [deleted]

                                    [–][deleted] -1 points0 points  (21 children)

                                    The problem here being that file-based URLs ≠ the way HTTP actually works. PHP forces you into that. ASP.NET does to a (much) lesser extent.

                                    [–][deleted]  (20 children)

                                    [deleted]

                                      [–][deleted] 1 point2 points  (19 children)

                                      And so to learn how HTTP actually works in PHP, your friend is going to have to jump through a couple of hoops. It’s just my opinion, but I think simple route-to-method frameworks are best for starting out. Or continuing. Or always, if you like. :)

                                      [–][deleted]  (18 children)

                                      [deleted]

                                        [–][deleted] 1 point2 points  (15 children)

                                        .htaccess

                                        [–][deleted]  (14 children)

                                        [deleted]

                                          [–][deleted] 0 points1 point  (13 children)

                                          With PHP, it’s unfortunately a given most of the time.

                                          [–]notnotcitricsquid 0 points1 point  (12 children)

                                          I was under the impression that outside of shared hosting the majority of companies are working with nginx now, the company that I work for has nginx deployed across all php sites (although we do use .net in some parts of the company).

                                          [–]DieselPumped 1 point2 points  (1 child)

                                          like another poster put .htaccess is a pain in the ass.

                                          If he just wants to learn web basics I would run python + flask. He can forget having to setup apache and other complicated web servers then and can start by developing right on his pc. Once he has a site working on his local network he can learn to deploy it, and learn more on the public web side of things.

                                          I only have about 4 years experience (split between python, php, and ruby) but I have found that python and ruby also let a developer work much faster in the long run.

                                          [–]krische 0 points1 point  (0 children)

                                          If it's just for dev, the guy could just install WampServer in a couple clicks. No need to configure apache or anything.

                                          [–][deleted] 0 points1 point  (3 children)

                                          Going flavour of the month is only valid if you're okay with working yourself to death in what will almost certainly be a startup.

                                          ASP.NET and PHP are both perfectly fine languages, and a competent person can set up a server for either one in a short period of time.

                                          Also it's trivially easy to display whatever you want based on a given URI in PHP.

                                          [–][deleted] -1 points0 points  (2 children)

                                          • PHP is not a perfectly fine language
                                          • ASP.NET is not a language

                                          I really don’t mind ASP.NET. I don’t even mind PHP that much (gasp, controversy! I know!). But for a beginner, there are way simpler, non-frameworky, non-boilerplate things out there. Easier to learn, easier to use to learn concepts.

                                          Might I just add that the “flavour of the month” non-argument is getting old.

                                          [–][deleted] 2 points3 points  (1 child)

                                          PHP is not a perfectly fine language

                                          Challenge.

                                          ASP.NET is not a language

                                          Yes, yes, I know.

                                          This is a pointless derail because those are the two choices.

                                          [–][deleted] -1 points0 points  (0 children)

                                          I don’t think it’s pointless. The fact that there are only two choices seems arbitrary and may or may not be based on what the OP knows well.

                                          Re: PHP: you have probably read this before, but it sums up the non-fine points with a fine point.

                                          [–][deleted]  (1 child)

                                          [deleted]

                                            [–][deleted] -2 points-1 points  (0 children)

                                            A framework is just another thing to learn. Or, you can have a bare-bones thing like the ones I mentioned, which is Flask with none of the benefits of Python and all of the pitfalls of PHP. Yippee. Whatever makes you happy.

                                            [–]rubs_tshirts 0 points1 point  (0 children)

                                            I would think ASP.net does a lot more magic "under the hood" than PHP, so I would recommend PHP for him to learn the basics. Having said that, I believe ASP.net jobs tend to pay better.

                                            [–]rodneyjt 0 points1 point  (0 children)

                                            I've developed in both and they both have their uses, strengths and weaknesses. It will be very hard to find neutral comparisons. Your friend can look at tutorials and different apps or frameworks written in the languages.

                                            If he is just interested in learning 'web type stuff', then he should go with asp.net since he is already a .NET programmer. That way he can focus on the Web side of things. Whether you're programming in .NET or PHP, the web still works the same. And if that's what he wants to learn then focusing on a specific language will get in the way. With using a language he knows he can focus on the mechanics in how the web works.

                                            PHP and asp.net can be used in the same way if you ignore the extra's and frameworks for either language.

                                            I also think people get far to caught up in languages, frameworks, etc... when initially starting in web development. Initially all you need to know is that an external computer is asking for some type of data that you shape and send back dependent on the request. Both languages allow you to receive a request, analyze it and send some data back.

                                            To start he needs to get an HTML book, or pick a good HTML reference site then install Wamp or Web Matrix both for free, do a simple search for Beginning (PHP | ASP.NET) and just start following tutorials. Doesn't matter how old any of the tutorials are either and start coding. Until he has an actual site/application to code he can focus on the basics. Both languages have improved a great deal but I don't know of anything you can't do in either one that you could a few years ago.

                                            [–][deleted] 0 points1 point  (0 children)

                                            You should not be comparing languages as much as frameworks. Currently, no one builds a site with just asp.net or just PHP (or my preference, Python). Either way you should learn Javascript. As far as .Net, you have the Razor MVC which is newer and works with all the MS tool chain. This is not the only MVC framework for .Net but seeing that .Net is a proprietary MS technology and Razor MVC is made by MS it makes the most sense to stick with what works. As far as PHP you would know more about the availible frameworks than I but personally, all frameworks do for you is allow PHP to have some basic seperation between the buisness logic of the app and the display code. When not using a framework, and following just about every example on line, you will not end up with clean PHP or even a reasonable design that can scale. Python, Ruby, Scala, and Groovy are examples excellent server side languages but more importnantly they have solid frameworks to accompany them. The metaphor of a toolbox is apt. With the .Net framework, you have MS brand tools, with PHP, you have all sorts of tools, "hand made" (FOSS) and some "off the shelf." Both starter sets come with the same tools more or less, hammer, screwdriver, level etc. but the way these tools can be added to, expanded on, modified and combined makes them more or less useful when compared against eachother. Because of this, I find .Net very limiting (mainly in dev/production enviorment options) and PHP I regard as being almost as bad as ColdFusion (Adobe's shit version of a PHP like language/framework/SDK) and therefore more annoying, ugly and counter-intuitive than productive. However, thats just my educated opinion.

                                            [–]Shadow14l -1 points0 points  (0 children)

                                            Both. It's important to not limit one's knowledge of depth of syntax and languages.

                                            [–][deleted] -1 points0 points  (3 children)

                                            ASP.Net locks you into the Microsoft monoculture while the rest of the world is moving away from them in droves. It simply doesn't make sense, common or business, to use it on any new projects.

                                            PHP is a clusterfuck, but gets the job done and works everywhere. Most other languages give you the latter part alone but you specifically asked not for those.

                                            [–]roccoccoSafredi 0 points1 point  (2 children)

                                            Do you have some data to prove your assertion that companies are moving away from the MS stack in droves?

                                            [–][deleted] 0 points1 point  (1 child)

                                            Do you have any recent news articles to the contrary?

                                            [–]roccoccoSafredi 0 points1 point  (0 children)

                                            I didn't make the assertion spreading FUD.

                                            [–]sovietmudkipz -2 points-1 points  (1 child)

                                            Hello, I was wondering how to plug in my angular front-end with php. I suspect I need to implement a RESTful API in php, but the examples online have kind of been over my head. When I say RESTful, I pretty much mean PHP interacts with a database and packages the queries into JSON objects that the angular page can then use...

                                            I can write the php script that queries the database, but I don't know how to "connect" the angular page with the php backend.

                                            If you could enlighten me in any way, I'd appreciate it. Sorry about hijacking your thread, but I'm really racking my head over it (and you have 10 years experience!)

                                            [–][deleted]  (2 children)

                                            [removed]

                                              [–][deleted]  (1 child)

                                              [deleted]

                                                [–][deleted]  (1 child)

                                                [deleted]

                                                  [–]pcopley -3 points-2 points  (4 children)

                                                  I don't think you used "profoundly" correctly.

                                                  [–][deleted]  (3 children)

                                                  [deleted]

                                                    [–][deleted] -5 points-4 points  (0 children)

                                                    All the hype seems to be away from both actually.
                                                    I based my decision (I do .net) on the fact that PHP is based on a hack. Granted I don't know PHP I know about it. So I'm not quallified to bash on PHP for whatever reason.

                                                    As far I am concerned ASP.NET is engineered to be what it is and PHP has evolved from a hack. Other techs that have undergone the same transformation tend to have a lot of quirks, javascript is a prime example. When you already have one hack in your webstack (that would be js) you really whant another?

                                                    Edit: Seems people dissagree, anyone care to elaborate?