I have big dreams of writing the next Facebook (unrealistic I know) and I'm in the planning stages as we speak and I'm umming and ahing about using a php framework for this and how many development hours it would actually save me. If any? Also is it unrealistic for one person to hand code an entire social network solo? Whats the largest application anyone has written on their own? I should also point out that I have a day job, so late nights and evenings it is. And pregnant partners to deal with :)
Somehow, I think writing a webapp is not the main concern.
Much more important is thinking about how to make the damn thing gain traction.
Other than that, your question doesn't probably make a lot of sense. Writing something as complex and big as Facebook is not something you can do all by yourself, and I am pretty sure that nobody has the resources to start out that big anyway, even without a day job and offspring and stuff.
I'm umming and ahing about using a php framework for this and how many development hours it would actually save me. If any?
My instinct on this is no - simply because you said the "next Facebook" and the nature of a social network is many, many users. If you were putting together a team to do this, and you hired a CTO worth anything at all, and you asked what PHP framework (if any) should be used, he'd tell you to back up and consider what language should even be used. The language must be:
- Popular. If you become the next Facebook, you're going to need a lot of developers. Facebook reportedly has nearly 500.
- Scalable. Nearly any language can be scalable - if you have the know-how to mess with the internals. That article is all about how Facebook writes PHP extensions in C++, has rewritten parts of the Zend Engine, and eventually wrote a compiler which transforms PHP into C++ code and then compiles it.
If you are going to need scale like this, it's unlikely that any framework is going to help you unless it's already an open-source social network platform (maybe), or you plan on just dumping it and rewriting everything as soon as you've got a few hundred thousand users.
Also is it unrealistic for one person to hand code an entire social network solo?
But, what exactly does "an entire social network mean"? What features is it going to have? The original Facebook was obviously easy enough to write by a single person. But what it has now has been developed by teams of hundreds of developers for years:
- News feed. pulling in data from all features of the application for hundreds of connections per user, scoring it for importance, and displaying it in real-time. Realize that the uniqueness per user of the scoring relevance and sheer number of concurrent users makes caching of any kind an insanely difficult problem.
- Photos. Not just your average photo sharing site. How/when are thumbnails generated, stored, and served? What about full size images? These must come from a CDN of some kind otherwise you'll quickly be overloading the bandwidth of your average data center plan. How do they get there? What about user interface? Multiple uploads, invalid images, live editing (rotating, etc.)? What about tagging?
- Permissions. This one is a beast. Just the architectural concepts alone, let alone coding it in a way that doesn't bring down your servers the first time you need a complicated check (All wall posts and photos and comments that I can see from a friend of a friend). On Facebook, not only can every category of data have custom permissions, but almost every post can too! In the end, the UI must also know ahead of time what the permissions will be so you don't present the user with invalid links.
- Likes. If you thought the graph you created with friend connections was insane, now extend it to the ability for every one of your users to "like" anything on the internet. Create a full-fledged API for this, and allow content-owners to come into Facebook after the fact and access the page created by this data.
- And so on... Too many more features to name.
Whats the largest application anyone has written on their own?
Impossible to know, but I guarantee if they did any good at it, they weren't on their own for long. If you are successful, then you're going to need more hands to continue building.
I should also point out that I have a day job, so late nights and evenings it is. And pregnant partners to deal with :)
Good luck :)
Writing a functional social network that people would actually want to use would require many many thousands of hours. Probably 10,000 At minimum.
Having 5 programmers work full time for 1 year would consume 10,000 man hours. Facebook for example most likely required many more times that for its first two years of operation.
So practically whatsisname's man hour number is right, if maybe even a little low. Facebook, according to Wikipedia:
Facebook has over 1,700 employees, and offices in 12 countries.
A lot of man hours has gone into the Facebook as you see it.
Having said that, two things:
Looks like the original launching site took about a month to write. However, something that takes a month for a programming genius who had been programming for 12 years (wikipedia, again). Someone with less experience or talent would take considerably longer
The state of the art has advanced since 2002, a lot. We have things like SocialEngine (PHP), Pinax (Python), and CommunityEngine (Ruby). Thousands of hours have already gone into the development of these frameworks, so you will save yourself a significant amount of time by using things people have already written. Because, unless something's really special about your "users should be able to send messages to users" functionality, you save yourself all that time you would spend writing the messaging functionality... and that's just a small bit of the site.
It'll still be a lot of work. Using a framework will speed this up a lot - even just writing to a database can be annoyingly frustrating without a framework... but even beyond normal web frameworks and the frameworks I listed will be the secret sauce that makes everyone care about your site. Maybe it's design, maybe it's some wizbang feature, maybe you just do things differently... but that differentiating factor will still take time.
To get a recent example of a social network creation effort, you should have a look at the Diaspora social network project, which is an open source, decentralized, privacy friendly social network.
Regarding the man-hour aspect, I think they have started around May, last year and have just reached the Alpha stage, with 4 core developers and 200,000 US $ of donation. You can even have a look at their work on Github and see the number of active contributors.
Only counting 4 core developers they have probably already invested at least 7,000 man-hours and they are far from completion so I think whatisname's estimation of 10,000 man-hours sounds reasonable to get something basic, by today standard, working.
And they are also trying to be The Next Facebook.
If I were going to write the next social network, I would begin by considering not using server side code at all. I would do it in HTML5 and only invite people who are clever enough to use browsers that can interpret it fully.
If you write the script to the sequel to the Social Network, please include the part where I sued you for taking this idea that I gave you on programmers.SE and you gave me an undisclosed amount of money in excess of 65 million dollars.
Oops, forgot to answer the question.
That'll take you about a week and there are no security concerns at all.
Writing a chat site and declaring it social network isn't difficult nor much coding effort. Hundreds of programmers are doing that right now, and all will fail to gain traction no matter how many features are coded in or how stylish it looks.
There is no user base to gain unless you can build a robust technical and usability interface to Facebook. That's a coding effort few are capable of, and some fail on proxy implementation willingness (Diaspora) to create a factual social network.
Btw, there might be easier target groups than Facebook users. (Though I'm probably not entitled to comment, since I have it cached in /etc/hosts as 127.0.0.5 ever since those tracking buttons appeared.)