I know this question has been asked before in different ways, but I have specific considerations for my project.

The idea is a project that would need to be highly scalable, the hope of course would be for it to have millions of users at some point (of course I know long term there will be many changes to increase performance, etc).

Also, I would like to open up the code base using and API and allow 3rd party plugins. With PHP it seems to be easier to get a developer community going, being that it is open source. Would like to have a plugin system and developer community kind of like Wordpress

C# is going to have better performance because it's compiled, etc, and I like the language because it is more structured, etc, with the .NET framework. Of course going with C# has other costs... windows servers are more expensive, SQL Server licensing etc... but it should take less servers to run .NET code, so that may not make a difference on that end.

I can program in .NET and PHP, so it's not an issue of which one I know better. Also, I know their are good programmers for either language, so that won't be an issue. I will also follow OOP & MVC for either language I choose.

Also, I know Dharmesh mentioned he wish he didn't choose C# here

Update: It is a web app (SaaS), It can be used by either businesses or consumers (will appeal more to consumers), revenue will be generated by monthly subscriptions

Thanks in advance.

link|improve this question
I recommend using CGI PERL – Frank Dec 11 '10 at 14:20
-2 vote down? What's that for? – CodeBlend Apr 12 at 11:49
feedback

7 Answers

up vote 15 down vote accepted

Stop. This kind of thing just turns into a religious war. Why? Because there are millions of pros and cons on both sides, and you can argue and worry about the pros and cons for the rest of your life, and it won't make on iota of difference to the success of your business.

Flip a coin, pick one, and get on with building your business. You'll probably regret it for some reasons, but if you had taken the other path, you'd regret it for other reasons. There are huge, scalable, successful web businesses built in every platform. There are useless, failed web business built in every platform. The bottom line? It really doesn't matter and a minute worrying about what to do is a minute you're not making useful things for people who will give you money for them.

link|improve this answer
Why cant you just use both? If you go the C# route you are going to be hosting on windows and IIS. The argument about SQL server licsencing is truely bogus, you can use MySQL with either language. Plus SQL server is inexpensive considering Bizspark and per processor licsencing. I agree its dumb to have these discussion, they both create the same result. Pick one and go. Then pick your ass. – Frank Dec 11 '10 at 14:05
appreciate the input, sometimes you hear so many arguments about which one to pick, that it made me do some second guessing, so I'm glad to hear that it's not an important question, and I can get on with my business. Thanks a lot. – Darye Dec 12 '10 at 5:42
Thanks Joel - I too was caught in the headlights trying to decide which way to go. You're absolutely right - by and large, the best thing seems to be to just get on with it. – Steve Wilkinson Dec 14 '10 at 7:53
Joel... I wonder if you've changed your it really doesn't matter stance in light of Trello? "...we’re creating a product that we’ll be working on for the next ten years. Technology that’s merely “state of the art” today is going to be old and creaky in five years." – user5772 Feb 19 at 12:20
feedback

A few mixed thoughts:

  • Scalability has less to do with language choice, and more to do with much broader architecture issues. For example, caching query results from databases in the application layer can help a lot. You can often scale up much more easily and cheaply when starting up than out. Building as stateless as possible to get the maximum load-balancing flexibility matters more than C# vs. PHP.
  • You are engaging in premature optimization. Dreaming of FB-like traffic is fine, but building for it at the outset is wrong.
  • You don't need an open language/framework to create an open API over your app.
  • Windows/SQL Server licensing does have a cost relative to the free software in a LAMP stack, but when you operate a site that will grow to "millions of users", the licensing fees become less of a concerns as staffing and connectivity costs dwarf the dollar amounts that go to MS.
link|improve this answer
feedback

If Facebook can run on PHP -- it's scalable.

link|improve this answer
+1 BUT remember that Facebook is converting a lot of their code to C now via HipHop. – Adrian Schneider Dec 10 '10 at 17:20
1  
But not everybody is thinking of 500 mln users when they say scalable. :) – usabilitest Dec 10 '10 at 17:27
I agree... I was saying that C# has better performance by default because it's compiled. – Darye Dec 10 '10 at 18:19
2  
chances are if your app has 100 million users you can afford a rewrite. – Frank Dec 11 '10 at 14:20
Surely they will have developed a framework to work with on top of PHP? Either way you would need to create an interface for common tasks and a way to split out the workload regardless of language – CodeBlend Apr 12 at 11:54
feedback

Perhaps you could update your question with information on:

  • The intended distribution mechanism (SaaS, downloaded & installed by end user, or both).
  • How you will generate revenue.
  • The ""ambiance"" of your planned product -- hip fun means of personal expression, or boring B2B product?

As I see it, PHP wins massively for B2C web applications that are hosted by end users themselves. The obvious reason being that cheap PHP hosting can be found anywhere. And if your application isn't user-hosted, then I don't see how you plan to execute plugins?

So for me it boils down to:

  • B2C webapp that is end user hosted --> PHP.
  • SaaS webapp which you host --> you have complete freedom of choice.
  • Hybrid SaaS and user hosted model --> depends on target audience. (B2C, probably PHP + MySQL. B2B, probably .NET with 3-4 SQL backends offered.)
link|improve this answer
it will only be hosted on our servers, plug-ins will be curated (like apps), and something that 3rd-party developers could offer to customers who have a subscription. – Darye Dec 10 '10 at 18:03
Mnn. OK, then I guess the answer is whichever language you're most proficient in. I would question whether you can realistically attract 3rd party developers to your platform. Effectively you have 100% control of the plugin ecosystem. In the past, other vendors have misused that control to usurp business from their plugin developers. People remember this, and are hesitant to develop for a platform that is 100% under the control of a single company... – Jesper Mortensen Dec 10 '10 at 18:14
True, but facebook has 3rd party apps... we're not facebook, but hey, you gotta hope right? Plus, 3rd party apps won't happen for a while and we know that, we would need a good amount of traffic and customers before any developers would really care, but we just want to plan ahead of course. – Darye Dec 10 '10 at 18:36
@Darye: Facebooks has apps, not plugins. Plugins run in the same memory space as the main app. Facebook apps communicate with Facebooks API over HTTP -- so there is no dependency on the environment (programming language runtime) there. If you want to expose an HTTP API, then your entire question is off base, both PHP and C# can be used to create an HTTP API. – Jesper Mortensen Dec 10 '10 at 19:01
I know the difference between apps/plugins and how they work...I guess the reason that things are cloudy is because we haven't decided yet whether to go with a plugin structure or just with apps, Apps would definitely allow any developer with any language to work with us. I could go into more detail, but hey I think you've provided some good input so, appreciate it. – Darye Dec 10 '10 at 21:01
feedback

Review the PHP frameworks out there (Cake, etc.) and see if there is a fit for your business case. If you are thinking of expanding to an ecosystem of 3rd party add-on's / plugins / templates / extensions, then PHP is a good choice. Remember to take a look at the licensing model & define it up front so others can contribute without licensing issues. (to see an example of how this can become a problem, look at at this thread regarding joomlas decision.)

If you are a .net maven and are tech, you can always go with the mono framework to avoid licensing.

link|improve this answer
I'll definitely look into some of the things you mentioned. Thanks – Darye Dec 12 '10 at 5:42
Jim - taking on board Joel's comments, I still like the idea of hedging the Microsoft bet via Mono - do you know whether any serious sites out there are having success with it? – Steve Wilkinson Dec 14 '10 at 8:00
Take a look at mono-project.com/Companies_Using_Mono - that should give you an idea of where mono is used. But I agree with Joel - platforms are a religious debate, my mono suggestion was to find a FOSS .net alternative to eliminate the licensing issue. – jimg Dec 15 '10 at 22:17
feedback

I would suggest build a MVP in PHP then get feedback from your customers about what your building, then iterate alot.

Once you know what your building expand your tech stack so that the PHP layer becomes a wrapper that talks to the C# application on your server, this gives you the benefit off the performance once you need it + allowing you a RESTful API interface for developers to plug into

link|improve this answer
feedback

This is off topic, but C# compiles to bytecode... and PHP also has a bytecode compiler (APC).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.