DZone
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
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
11 Monitoring and Observability Tools for 2023
Learn more
  1. DZone
  2. Data Engineering
  3. IoT
  4. Battlefield 3's Innovative Social Network

Battlefield 3's Innovative Social Network

John Esposito user avatar by
John Esposito
·
Nov. 29, 11 · Interview
Like (0)
Save
Tweet
Share
3.47K 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

  • 5 Ways to Secure a Virtual Machine in Cloud Computing
  • What’s New in the Latest Version of Angular V15?
  • gRPC on the Client Side
  • Fargate vs. Lambda: The Battle of the Future

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • 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: