One habit I have when visiting websites is to look at their codebase, both for curiosity and for new/interesting code snippets. Today, I was going through Facebook’s code while playing Mafia Wars and, aside from the sheer volume of code, a few things that sort of surprised me:
- Liberal use of
onClick=""for basically all links that weren’t form buttons. This is DHTML 4.0 event functionality. - Hundreds of lines of internal stylesheet classes, prefix-named according to a specific user id or session. For Mafia Wars, they preload all the possible classes used for any of the (currently) 3 locations you can explore. It’s never easy to have nice, clean, always external css, especially with a site this massive.
- About two dozen calls to external javascript and css files, all from the same server. They must have serious bandwidth
Granted, these aren’t by any means a knock against their coders. I’ve been fascinated by the sheer amount of data that goes between user and server for the Zynga games. It’s a feat in itself to command that much dataflow and event triggers and have a (mostly) stable environment for the user.
Plus, considering how long the site’s been around, there’s a lot of legacy code that’s most likely too difficult to extract to make the site work more efficiently. They would benefit greatly from using a JavaScript framework like jQuery, Prototype or MooTools, but trying to retrofit this into their current framework would be a bear, and quite frankly, is it worth it?
exmoor pet care…
Buy_generic drugs…
birth control pill and lowered libido…
Buy_drugs without prescription…
hot dog hospital diet substitutions…
Buy_generic drugs…
asthmatic inhaller mask for children…
Buy_it now…
ic tramadol hcl 50 mg…
Buy_generic meds…
abdominal pain lutenizing hormone…
Buy_generic drugs…
adderall then tylenol pm…
Buy_generic drugs…
viagra prostate removal…
Buy_generic drugs…
zocor and ms…
Buy_it now…
what is metoprolol succinate used for…
Buy_it now…
hives rash from coming off prednisone…
Buy_generic drugs…
percy weston cancer cause cure book…
Buy_generic drugs…
low fat diets history…
Buy_drugs without prescription…
genital erection…
Buy_now it…
effexor xr 75…
Buy_generic pills…
follistim increase estradiol levels…
Buy_generic drugs…
red wine and lipitor…
Buy_no prescription…
scott hall american cancer society…
Buy_generic pills…
what age does menopause start…
Buy_it now…
depression affects memory…
Buy_now it…
abdominal hernia photos…
Buy_generic pills…
spironolactone reduces height…
Buy_no prescription…
protonix vs aciphex…
Buy_generic drugs…
effects of alcohol on amoxicillin…
Buy_generic meds…
my rehab nursing clinical reflection…
Buy_drugs without prescription…
boulder valley asthma and allergy clinic…
Buy_no prescription…
number of obese children in america…
Buy_generic meds…
mike divorce cancer tiffany…
Buy_generic pills…
does herpes rash come and go…
Buy_now it…
symptons of depression…
Buy_generic meds…
intravenous fluid heart rate…
Buy_drugs without prescription…
natural cures for atopic dermatitis eczema…
Buy_without prescription…
lung cancer survival rates…
Buy_generic meds…
buy@real.strong.armour” rel=”nofollow”>.…
Buydrugs without prescription…
..…
Buyit now…
abilify@does.it.work” rel=”nofollow”>……
Buygeneric meds…
aloe@ferox.gel.buy” rel=”nofollow”>.…
Buynow it…
aciphex@cancer.buy” rel=”nofollow”>..…
Buygeneric drugs…
calcium@coral.buy” rel=”nofollow”>.…
Buydrugs without prescription…
Buy@Discount.Aldactone” rel=”nofollow”>.…
Buydrugs without prescription xab…
Order@Aggrenox.Online” rel=”nofollow”>……
Buyit now sge…
< a href="http://trig.com/advair7490/biography/?ml=Purchase-Generic-Advair-25mcg/50mcg-25mcg/125mcg-25mcg/250mcg-50mcg/500mcg-50mcg/100mcg-50mcg/250mcg Purchase@Generic.Advair.25mcg50mcg.25mcg125mcg.25mcg250mcg.50mcg500mcg.50mcg100mcg.50mcg250m…
Buygeneric drugs nih…
Buy@Generic.Advair.25mcg50mcg.25mcg125mcg.25mcg250mcg.50mcg500mcg.50mcg100mcg.50mcg250mcg” rel=”nofollow”>..< …
Buyno prescription lka…
Buy@Generic.Advair.25mcg50mcg.25mcg125mcg.25mcg250mcg.50mcg500mcg.50mcg100mcg.50mcg250mcg” rel=”nofollow”>..< …
Buydrugs without prescription hak…
Purchase@Advair.Without.Prescription” rel=”nofollow”>..…
Buyno prescription jwi…
Purchase@Advair.Online” rel=”nofollow”>..…
Buyno prescription jui…
Buy@Cheap.Advair” rel=”nofollow”>.…
Buygeneric drugs hwi…
Buy@Generic.Actonel.Without.Prescription” rel=”nofollow”>.…
Buygeneric drugs ouw…
Buy@Generic.Aciphex.Without.Prescription” rel=”nofollow”>……
Buyit now knc…
Cheap@Aciphex.Online” rel=”nofollow”>..…
Buyno prescription gdt…