C# and .Net or PHP or for a niche social network?

Discussion in 'PHP' started by hipspy, Feb 6, 2012.

  1. #1
    I am about to start the journey to build a niche social network. It is a bit of learning experiment. I would like the site to be able to scale because the niche has a lot of potential. I am thinking about 25,000 to 100,000 logged in users concurrently, if the website ever became popular. If I am mainly concerned with getting the best performance and scalability for logged in / authenticated users, would it be better to go with C# and .Net or PHP?
     
    hipspy, Feb 6, 2012 IP
  2. awood969

    awood969 Member

    Messages:
    186
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    40
    #2
    Well for a start the question you should be asking is ASP.Net or PHP, C# has no place in the browser. Microsoft has confirmed this by expanding C# and .NET into ASP, Silverlight and Azure.

    The Pro's and Con's of ASP and PHP are widely debated, and most of the arguements are now many years old. I think in the modern day it doesn't matter. Use what you feel most comfortable with.

    A lot of PHP's security concerns are now no longer an issue and a lot of the cost and scaling worries of ASP have gone as well.

    Both languages will probably end up being cached down to binary anyway if your thinking about a site that big.

    Anybody who says that either language isn't capable is a fool. Yahoo! and Facebook are most noteable for using PHP and other large oganisations (Most noteably financial institutions) will use ASP. Both languages have proven they can handle themselves under great demand.

    The question really should be more a networking one, and for that the answer is simple. Cache everything where there is benefit to do so and scale horizontally not vertically (That means having more ok(ish) servers rather then having a few super powerful ones).

    Thanks
    Andrew
     
    awood969, Feb 9, 2012 IP
    bogi likes this.
  3. hipspy

    hipspy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Andrew ( awood969 ),

    ASP.NET is a framework while PHP is a scripted programming language. It would be unfair to compare a programming language vs. a framework. If I wanted to compare frameworks, I would say ASP.NET vs. Yii or Zend. I think you are confusing ASP (Active Server Pages) and ASP.NET. ASP (Active Server Pages) is a scripted language like PHP, while ASP.NET is a framework. I am comparing the merits of using a compiled programming language (C# pronounced C-sharp) vs. a scripted or interpreted language (PHP). To really make it more apples to apples, I would say C# using ASP.NET vs PHP using Yii, or Codeigniter. I think it is ASP (Active Server Pages) that is outdated, not C#). You will find excerpts below from Wikipedia that define and break down the differences for ASP vs. ASP.NET.

    Via Wikipedia ( en.wikipedia.org/wiki/ASP.NET )

    ASP.NET is a Web application framework developed and marketed by Microsoft to allow programmers to build dynamic Web sites, Web applications and Web services.

    ASP.NET compared with ASP classic.

    ASP.NET simplifies developers' transition from Windows application development to Web development by offering the ability to build pages composed of controls similar to a Windows user interface. ASP.NET encourages the programmer to develop applications using an event-driven GUI model, rather than in conventional Web-scripting environments like ASP and PHP.

    Other differences compared to ASP classic are:

    Compiled code means applications run faster with more design-time errors trapped at the development stage.

    ASP.NET uses the multi-language abilities of the .NET Common Language Runtime, allowing Web pages to be coded in VB.NET, C#, J#, Delphi.NET, Chrome, etc.

    Other references:

    ASP stands for Active Server Pages. ASP.NET is the next generation of ASP. After the introduction of ASP.NET, old ASP is called 'Classic ASP'.

    Classic ASP uses vb script for server side coding. Vb Script is not supported any more in ASP.NET. Instead, ASP.NET supports more languages including C#, VB.NET, J# etc. VB.NET is very similar to vb script, so it should be easy for old Visual Basic or ASP programmers to switch to VB.NET and ASP.NET

    VB Script is a simple scripting language, where as VB.NET or C# are modern, very powerfull, object oriented programming languages. Just for that reason, you will be able to write much more robust and reliable programs in ASP.NET compared to ASP.

    In classic ASP, there was no server controls. You have to write all html tags manually. ASP.NET offers a very rich set of controls called Server Controls and Html Controls. It is very easy to drag and drop any controls to a web form. The VS.NET will automatically write the required HTML tags automatically for you.

    ASP is interpreted, ASP.NET is compiled

    Since ASP uses vb script, there is no compilation. All ASP pages are interpreted when th page is executed.

    ASP.NET uses modern .NET languages like C#, VB.NET etc. They can be compiled to efficient Microsoft Intermediate Language (MSIL). When you compile an ASP.NET application, the server side code is compiled to assemblies. These assemblies are loaded at run time which makes the ASP.NET pages perform better than classic ASP.
     
    Last edited: Feb 9, 2012
    hipspy, Feb 9, 2012 IP
  4. nemanja.todic

    nemanja.todic Well-Known Member

    Messages:
    69
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    130
    #4
    I saw too many guys failed to complete such a large project.

    Do you have any experience building Web applications of that size?

    Don't focus on technology. If you would like your project to succeed, you will have to overrun much bigger issues that have nothing to do with technology - like marketing and business plan( at one point you'll need a lot of money, so why would someone invest? How he can earn his money back?).

    My suggestion is - pick technology you know better. Dont focus yourself neither on performances nor technology, but on producing result. Any result! Release first version of your social network, start working on marketing. If people like it and your number of visitors increases, you'll optimize your application gradually.
     
    nemanja.todic, Feb 9, 2012 IP
  5. hipspy

    hipspy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    nemanja.todic,

    I am on a technology forum, and asked a technology specific question. Business plans, marketing plans, investing, etc, are far beyond the scope of what I am asking about. I am not on a startup forum asking about how to launch a startup.

    Can anyone please give some insights about the relative merits of using ASP.NET with C# vs. PHP?
     
    Last edited: Feb 9, 2012
    hipspy, Feb 9, 2012 IP
  6. nemanja.todic

    nemanja.todic Well-Known Member

    Messages:
    69
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    130
    #6
    Your attitude is wrong... If you want your project to succeed, you're need to think about much more than just a technology.

    For start, you asked "Which one is best". Both are good, but which is best for you is hard to answer. What technology you know better? Are you going to work alone? How much time you're planing to spend? How much money?

    But, let me try to give concrete answer. :) Generally, you will be using ASP.NET for Web applications with complex business model. For example, a bank software or application for calculating taxes.
    If you're going for a website, for many reasons PHP with some quality framework( like Zend framwork) is better solution. There are a lot of open source projects you can modify to your need. This programming language is simpler than ASP.NET/C# and optimized for developing Web sites and simpler Web applications.
    I know that many will disagree but for websites in general, PHP solution will work much faster than one based on ASP.NET.
    So, to conclude - if your website will have complex business logic than go with ASP.NET. Otherwise, stick to PHP. Which every solution you choose don't think about optimization from start. Start in small way, just get something done and then do optimization as needed. Always have in mind that it's much more easier to buy another server than to waste programmers time.
     
    nemanja.todic, Feb 10, 2012 IP
  7. hipspy

    hipspy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    nemanja.todic,

    Why can't people just answer the question you asked?

    You have no idea what I am thinking about. What on earth makes you think that I am only thinking about technology? You know the old saying about assumptions? As I said before, I asked a technical question on a technical forum. This is not the place to discuss marketing, business plans and the other things you suggest, and further more, I have not solicited your advice in any of those areas. Maybe I am already an expert in those areas. Who knows, but you certainly don't, and related to an isolated question about C# vs PHP, those topics are not relevant to the question I asked. Again I ask, why can't people just answer the question you asked?

    I did not ask you or anyone else on here for advice about anything else other than a specific technology question. One question on here has nothing to do with everything I am thinking about, and in all honestly the only thing I asked about was C# or PHP. Why the need to provide your opinions on things that your opinion is not being asked for, and is not required? Why are you making assumptions about what other people are thinking about?

    The only reason I responded to your previous post was in the hope that people would read my response, and only respond with answers that are relevant to the question being asked. As stated before, I am not looking for or asking for general business 101 or start up 101 advice. I am asking a question about certain technologies, and I would like to maintain the focus on discussing those technologies, not everything else under the sun.
     
    Last edited: Feb 10, 2012
    hipspy, Feb 10, 2012 IP
  8. nemanja.todic

    nemanja.todic Well-Known Member

    Messages:
    69
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    130
    #8
    Reason is simple - you can't get correct answer if you just ignore all other factors. Anyway, I've also tried to explain to you general differences between PHP and .NET in my last post. Hope you find them useful.

    Because you got upset when I said that you should choose technology based on other things and not because some technology is cool or cheaper than other. :)

    If you were an expert then you will know the answer by yourself and you wouldn't ask a "PHP vs C#" or "Windows vs Linux" question. So, there you go, I certainly know that you're not an expert and that you have much more to learn. And there is nothing wrong with that. That also doesn't mean that anyone thinks that your knowledge is poor, of course.
    But please be open, listen to others. If everyone bring business and marketing into this discussion, there must be some very important connection, right?
     
    nemanja.todic, Feb 10, 2012 IP
  9. hipspy

    hipspy Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    nemanja.todic,

    Me asking one question about technology has nothing to do with other areas of expertise such as business and marketing. Your logic is very weak. As I have stated numerous times, I am not looking for business, server architecture, or marketing advice. I have those areas covered.

    Thanks for the response. I am not finding our interactions very useful or valuable. Please give someone else a chance to respond.
     
    Last edited: Feb 10, 2012
    hipspy, Feb 10, 2012 IP