0

I'm working on a project and I just need a holistic overview on how to go about it.

I'm going to use HTML/CSS canvas to make the game.

However, the game involves visualization of large amounts of data that is best served in a database. What I do not know how to do is:

  1. Link my HTML/CSS game to a SQL database
  2. Parse a text file to populate the database.

I don't have specific issues I just don't even know where to start? Some people have said AJAX? Others have said parse.com?

user229044
  • 232,980
  • 40
  • 330
  • 338

3 Answers3

0

You have two options:

  • write a server-side application to serve data from a DB
  • use client-side HTML5 storage (such as local storage, WebSQL, IndexedDB, etc)

If you use the server implementation you will need AJAX to communicate with the server.

Albert Xing
  • 5,620
  • 3
  • 21
  • 40
0

To do this you will have toove beyond JavaScript and learn server side programming. The good news is there are tons of awesome server side languages that make building websites easy.

If you come from a javascript background, ruby would probably be an easy transition. I'd suggest Sinatra.

If you are using SQL server, c# and asp.net are great choices that are very well designed, thou c# is very different from JavaScript as a language.

Like python? Web2py and Django are good.

Then there is PHP and java...

You would probably write an API in one of these server side languages, access it using Ajax to retrieve Jason and process it.

And don't bother with parse.com. write your own parser in the language of your choice. Its usually really easy, and instructive.

Nick Bailey
  • 3,078
  • 2
  • 11
  • 13
0

I think you already know a language you can use. How about javascript? Of course a real serverside language like Java or PHP would be better - maybe as already told: ruby but why not try it with node.js:

Node.js could be the first thing you may look at. (http://nodejs.org/)

It's really nice & well documented - there is also a big question about node.js with mysql: MySQL with Node.js which also works fine.

Community
  • 1
  • 1
DominikAngerer
  • 6,354
  • 5
  • 33
  • 60