Maintain String values in a single file for Client/Server

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Snowmane
Posts: 18
Joined: 18 Jul 2009, 16:36
Location: Colorado Springs, CO, USA

Maintain String values in a single file for Client/Server

Postby Snowmane » 17 Aug 2009, 20:16

Has anyone come up with a method to maintain string values for an AS3 client and for server-side java plugins in a single file?

Right now I have one AS3 file for my AS3 client which defines string constants for the _cmd parameter of Extension Responses, and another file I maintain with the same strings for use in my server side plugins.

It makes me nervous to set them up this way because if the string gets modified in one file and not the other, the handlers will not be able to properly identify and handle the message. Obviously this is not a problem if I ensure that both files are always updated, but it is one more place where human error could creep into the equation. If there were a way to use the same file on both the client and server, then there would be no chance of the files getting out of sync.

Anyone have any suggestions?
sstark
Posts: 77
Joined: 21 Nov 2008, 16:06

Postby sstark » 18 Aug 2009, 17:32

Even if you were to do that, the server would still need a reset to see the changes.

You may wish to save the strings in a database, for easy management. Possibly a flat-file db, like xml?

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 31 guests