dtpt75860 2014-07-16 11:07
浏览 53

如何设计能够记住当前GUI信息的数据库,而不是将信息存储在URL中?

Ok, here is a real challenge.

I am building a Ajax-based web app that has a very rich data in each page.

Ok, let see this scenarios.

User can retrieve variety of product within a period. For example, when user enters the url mydomain.com?getProduct;startDate=2012-11-10;endDate=2014-12-11, the system will retrive all product within that range & show all products on the page. Each product will has an ID and will be stored inside a checkbox as depicted in the following:

 
   Date       - Name - ID
[] 2012-11-10 - car  -10
[] 2012-11-11 - bike -11
.....
[] 2014-12-11 - bin  -110

Now the user will select some checkboxes Randomly & some other info will be displayed accordingly. And the user wishes that he can show a SnapShot of his current Working Gui to his bos.

SO, the current solution that I am doing is to store the productID in the url. For example, the user checked 2 productIDs 10 & 11 then the url should become mydomain.com?getProduct;startDate=2012-11-10;endDate=2014-12-11;selectedIds=10_11. The user then sends this url to his bos, the bos opens the url & saw the exact same Gui as the user had before like the following:

 
    Date       - Name - ID
[x] 2012-11-10 - car  -10
[x] 2012-11-11 - bike -11
.....
[]  2014-12-11 - bin  -110

The problem is the thr url could become very very long & Google don't want to crawl on a very long url. Also, very long url is pretty inconvenient when sent to email.

So, what is the best solution to this requirement? Should I have another table to store info instead of storing info on the url. But if that is the case then my DB will be very big cos user will produce lots of urls / day.

I am using MYSQL, but this is a general DB question so it doesn't matter which DB platform u r using.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀
    • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
    • ¥15 关于#hadoop#的问题
    • ¥15 (标签-Python|关键词-socket)
    • ¥15 keil里为什么main.c定义的函数在it.c调用不了
    • ¥50 切换TabTip键盘的输入法
    • ¥15 可否在不同线程中调用封装数据库操作的类
    • ¥15 微带串馈天线阵列每个阵元宽度计算