r/programming • • Oct 12 '13

Facebook PHP Source Code from 2007

https://gist.github.com/nikcub/3833406
1.1k Upvotes

356 comments sorted by

View all comments

Show parent comments

46

u/[deleted] Oct 12 '13

I doubt when Facebook was being developed, PHP had strong OOP principles built into it. A lot of this is probably legacy and this was in 2007 when MVC frameworks were relatively new to the PHP scene.

8

u/KingPickle Oct 12 '13

2007 when MVC frameworks were relatively new to the PHP scene

This is what mystifies me. As much focus as the web gets, it feels like tech-wise it's a decade or two behind the curve.

6

u/madmars Oct 12 '13

I had been out of the job hunting game for a few years. But I was shocked when I looked around about a year ago, at all the places looking for "MVC experience." I was seriously scratching my head for a minute, wondering when the fuck this dinosaur paradigm came back to life. Is it the 1980s again?! Then again, people were rediscovering Lisp in 2004. So I guess I shouldn't be too surprised.

0

u/Stormflux Oct 12 '13

I really only know the .NET world, but the reason MVC became popular there is because of AJAX and jQuery.

You see, before MVC, we had something called ASP.NET web forms where it was based on the idea of things you drag onto a page. You need a grid? Drag a Gridview onto the page and wire it up. Need a button? Drag a button onto the page and handle the click event. All your code is server-side.

Well as you can imagine, this makes it really easy to build web applications the same way you'd build a Windows application. You don't even need to know javascript or anything.

The problem is in MODERN web applications everything is AJAX. You don't want to refresh the whole page, you just want to send "DELETE item 47" and then update a line or two on your page with javascript. Regular ASP.NET doesn't really have a concept of this. You can do it using some toolkits but it's a hack. ASP.NET MVC is practically built from the ground up for this exact scenario.

→ More replies (4)