BlocklandGlass / GlassWebsite

The old Glass website.
https://blocklandglass.com
4 stars 5 forks source link

Site JSON versus API JSON #14

Closed dpendic closed 7 years ago

dpendic commented 8 years ago

While they do have some overlap, they have some design difference.

A limitation of torque is 4k string limit. Sending an entire list of comments, for example, is a breeze for a browser but can cause Torque to immediately throw a runtime error.

The API needs to be streamlined compared to the site JSON, so to minimize the string size.

I also believe we should keep them separated for compatibility. If we roll out a change on the site, the change is rolled out immediately, and we don't have to worry about compatibility. This isn't so with the in-game client. People are always stagnant to update, and pushing out updates to the entire client base is a lot more difficult than just pushing a site change.

hoff121324 commented 8 years ago

I really don't think that is a viable solution. The in game client should absolutely pull the same data as the pages being served. The 4k string limit can definitely be worked around unless the json library is complete garbage, and we are surely going to require people to update to v2 anyway. I would much rather handle version differences on the client side rather than the server side. If we can't solve the 4k string limit, then I would still rather try to cut back on the data being sent for the online site than manage two different data structures. We can start off by cutting off descriptions and stuff for when they are not needed, and having private/json files more closely tailored to what the actual pages need.