Storing data client data
I am making a l开发者_运维百科ittle light weight 2 way chat client, however I am unsure how to store the data my options are:
- JSON
- XML
- Text File
- Database
I will be using PHP and Ajax, which would be scalable and small in size?
Since you are trying to develop a Chat client, performance here is key.
i would suggest the following (my personal favorite):
Server Side
- Store Data in Database for a nice balance between performance and flexibility
- PHP page that interacts as an interface between the Database and the client via JSON since it's lightweight and therefore fast
Client Side
- AJAX based GUI that can parse and send JSON data.
- (Optional) use a JavaScript framework to help you with #1, like jQuery/ExtJS/etc'
If you would like to choose this set up I would also suggest you at least familiarize yourself with the other options so you can decide for your own.
Good Luck!
精彩评论