Thread: Pa api
View Single Post
Unread 30 Jan 2010, 15:38   #6
Spinner
Founder of Planetarion
 
Join Date: Mar 2000
Location: Oslo, Norway
Posts: 543
Spinner has a brilliant futureSpinner has a brilliant futureSpinner has a brilliant futureSpinner has a brilliant futureSpinner has a brilliant futureSpinner has a brilliant futureSpinner has a brilliant futureSpinner has a brilliant futureSpinner has a brilliant futureSpinner has a brilliant futureSpinner has a brilliant future
Re: Pa api

Quote:
Originally Posted by ellonweb View Post
After speaking to Cin, it turns out this is almost impossible given the current state of the code.

For those of you technically inclined, this is because the code is not separated MVC style as one might expect, and therefore the only things different skins can change are the images and CSV: changes to the textual output are not possible, making JSON/XML output impossible (as part of a skin, anyway).

To anyone thinking about making a new game in future (HI SPINNER): keep this in mind during your development process?
Without going into specifics I can say that managerleague has a similar system. Most of the traffic is ajax, and the output is JavaScript.
Authenticatipn is not a problem AS that is handeled by the script receiving the ajax-call (which comes from your browser and thus has access to cookies for the auth)
You might want something without cookies for auth and that could be a problem with security though.
Also, with Pa, an api can be made fairly easily if things in the code looks a bit like it did when I left. You could simply copy the contents of the functoon called something like ProcessForms from each "page" and stick them all into a new file called api.pl or something. Then sort out potential name-conflicts for the actions, and replace the output with either statuscodes or JavaScript.
Shouldnt be too hard or timeconsuming I think?

AS for a new game, I can not confirm anything.
__________________
- Spinner
Original creator of Planetarion, ManagerLeague and AD2460.
Spinner is offline   Reply With Quote