Can I find somewhere a migration guide to update the library on the frontend from version 1.2.0 to 1.7.17?
I try just to update lib to new version but there are so many changes... I spent the whole day making changes, but I'm still not done.
Migration guide from api-js 1.2.0 to 1.7.17
Re: Migration guide from api-js 1.2.0 to 1.7.17
Hi,
no we don't have such guide. The two API are indeed pretty different as the original JSON-based API was a simplified version of the API we have for other languages such as C#, Java, Objective-C etc.
I think the best approach is to rewrite the application starting from the original code and rebuilding it using the new API, via the reference docs and examples.
http://docs2x.smartfoxserver.com/api-docs/jsdoc/client/
https://www.smartfoxserver.com/download#p=examples
If there's any question regarding the API let us know
no we don't have such guide. The two API are indeed pretty different as the original JSON-based API was a simplified version of the API we have for other languages such as C#, Java, Objective-C etc.
I think the best approach is to rewrite the application starting from the original code and rebuilding it using the new API, via the reference docs and examples.
http://docs2x.smartfoxserver.com/api-docs/jsdoc/client/
https://www.smartfoxserver.com/download#p=examples
If there's any question regarding the API let us know
Re: Migration guide from api-js 1.2.0 to 1.7.17
Unfortunately, the application I'm developing is not so easy to rewrite...
Thank you for your reply.
Thank you for your reply.
Re: Migration guide from api-js 1.2.0 to 1.7.17
I don't think this should affect the logic of your application that much. The legacy Javascript API and the new JS API differ mainly in how data is transported between client and server, using different objects to carry such data.
In the old API it was done through native JS data structures, in the new API it is done via the SFSObject/SFSArray classes. Other than that the API work pretty much in the same way. You still add custom event listeners for server events and send requests in the same way.
Cheers
In the old API it was done through native JS data structures, in the new API it is done via the SFSObject/SFSArray classes. Other than that the API work pretty much in the same way. You still add custom event listeners for server events and send requests in the same way.
Cheers
Return to “SFS2X HTML5 / JavaScript API”
Who is online
Users browsing this forum: No registered users and 33 guests