DZone
Web Dev Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Web Dev Zone > Battlefield 3's Innovative Social Network

Battlefield 3's Innovative Social Network

John Esposito user avatar by
John Esposito
·
Nov. 29, 11 · Web Dev Zone · Interview
Like (0)
Save
Tweet
3.30K Views

Join the DZone community and get the full member experience.

Join For Free

Gaming is bigger than ever, and the economic downturn apparently hasn't touched it: Modern Warfare 3 earned $775 million in five days, obliterating every book, game, and movie ever sold. (PC World's headline is great: 'Modern Warfare 3 Has Best 5-Day Sales in History of Known Universe'.)

From the developer's perspective, graphics and AI get plenty of attention -- though the rise of online play and serious single-player plotting have channeled some attention away from these pure coding achievements.

But nobody doubts that the people who program games are some of the best programmers around. So what happens if they redirect some of their coding skill to web applications?

The impressive result, says Armin Ronacher, is Battlelog, the browser-based, cutting-edge-web-technological social network for Battlefield 3 gamers.

Armin doesn't have behind-the-scenes access to the software, but he deconstructed the system pretty thoroughly. The core of his praise? Battlelog really gets how to relate client-side and server-side programs, in just the way modern web technologies are supposed to do (but don't always succeed at doing).

Here's an example:

If you send an HTTP request to the website it appears to work as if it was a regular website. You get a bunch of HTML rendered and nothing interesting happens. However if you click on any link you do not get HTML transmitted. Instead what is transmitted is JSON, the HTML5 history API is used to modify the URL dynamically and all the HTML is rendered on the client. Since it appears to be able to do both we can compare the sizes of the data transmitted easily.

The HTML for the index page is 18KB in size. If we trigger the request to the same URL with just the JSON it's 4KB. Not only is it less to transmit, it also means that the server is essentially just generating JSON instead of rendering whole templates which also means a performance improvement for the client.


The rest of Armin's post goes into much more detail. Check it out, and be inspired -- even if you're not a game developer -- by some really innovative web coding.

Network

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Checklist for API Verification
  • How to Submit a Post to DZone
  • 12 Kick-Ass Software Prototyping and Mockup Tools
  • DZone's Article Submission Guidelines

Comments

Web Dev Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo