Well, if you are going trough with it, then i`ll help out wherever i can
If speed is going to be an issue, caching should be enabled too. But, if you are going to write a framework, i think it`s best to setup an installation for the framework. One where you specify all required settings, for both SQL database ( where there should be a couple of connectors available ) as well as port/username/pass etc.
Secondly, the javascript can be returned as JSON, however, i think the fastest way to utilize javascript is not pure JSON and js, but using a library like jQuery. It handles JSON very well, and due to it`s accesability easily maintainable and scalable. Like i said, it handles JSON very well, but it can handle all kinds of requests, like POST, GET JSON, JSONP and plain text ( be it html or xml or whatever).
Which is my next thing: if we are going to use JS for, let`s say, a map, i think plain text is fastest. Iterating trough JSON objects takes more time/CPU then one dump of HTML. PHP is faster in parsing plain then transforming it to JSON first and then let js solve the JSON object.
So if a map should be generated, plain would be the fastest way to go.
Now, for the rest, like you said, SQL is a common language, so i agree that should not be that hard to implement, If a proper connector and connection have been made, a good SQL query for inserting proper tables etc should be sufficient.
Now, for the next thing: what tables should be set? Because creating a authorize part is not that hard, but what comes next is. Perhaps, during the install give the option to select what kind of game they want to build? Or maybe a list of items pre defined by the framework? Options should include:
Map / Grid if true, what size? ( default )
Armor / Weapon sets
Player sets, if so what kind of options should be available?
Is an inventory required? if so, how many data types will it handle?
etc etc etc.
But, yeah this could work.
Now, for the routing part, how do you want to implement that? I believe a routing schema should be made, either by database control or trough YAML/XML files.
Also, kinda reminds me, if you allowe Armor sets to be set, then the framework should create CRUD classes for those, which all inherit from the main Application class i suppose, or the Model object. It should be preset, so are acccesible trough the entire application.
Security is going to be a tough issue to. All $_POST/GET/JSON requests should ALWAYS be filtered, which can be CPU intensive, especially if you allow certain characters. So all datatypes must be predefined, creating a heck of a good input filter (s) for datatypes. This is the ideal situation, however, if datatypes are not predefined, then all input has to be filtered trough everything.
Anyway, i can rattle all night about this, im going to stop right here. lol.
Kind regards