Author Topic: Dave's Galaxy  (Read 538834 times)

Dav3xor

  • Knight
  • **
  • Posts: 77
    • View Profile
Re: Dave's Galaxy
« Reply #1215: November 06, 2011, 10:35:42 PM »
You're already doing lots of AJAX to fetch all the data. The major change you'd need is that the AJAX reply is not ready HTML, but raw data, i.e. IDs, names, etc. in JSON format (which you also already use) and a small piece of javascript creates the HTML table out of that. Then you could expose that JSON interface as an API easily.

Exactly.

Plus, I need to revamp some of that Ajax-y stuff so it's more sane -- a lot of it is just pushing html out to the client -- so I'm looking at a REST API framework for Django (probably Tastypie from what I've seen), and I can quickly wire up an API with that.  Then when I revamp the neighbors/fleets/planets lists, they can pull from the API.  And anybody who wants to can use the API, win win win.  :)

Sneaky bastard, looking at what the game does in the background.  hehe
--
Dave of Dave's Galaxy