dtz8044 2015-03-12 10:02
浏览 23

我应该在ZF2中为多窗格的Web应用程序使用什么URL方案?

I have a web app (cirica 2006) that I'm trying to refactor using Zend Framework 2 and a MVC architecture. The basic layout is pretty simple, but right off the bat it is not apparent to me how it should be converted to views. Ignoring for the moment all the little details, the app functions with two main panes.

The main frame holds the bulk of the content and using a route I can pass the necessary parameters to the module that that controls it. Naturally this defines the primary URL of my app:

+-------------------------------------------------------------------+
+ URL: http://example.com/module/path/parameters                 X  +
+------------------------------------+------------------------------+
|MAIN APP                            |EXTRAS                        |
|                                    |                              |
| /module/path/parameters            | /                            |
|                                    |                              |
|                                    |                              |
|                                    |  ^ How does this pane know   |
|                                    |    what module and path to   |
|                                    |    display?                  |
+------------------------------------+------------------------------+

The question I have is how to control the secondary pane of the app from the URL. The content in this pane is usually related to the primary in some way, but not in such a way that can be derived automatically. The user might load various things in this view for comparison with what the main app is doing. I would like site users to be able to deep-link to whatever content is loaded in BOTH panes. This means the URL must somehow reflect what is going on with two different modules, each of which have a variable amount of parameters that might be passed along.

What format should I use for my URL and where should the route be processed such that the correct parts get passed to the correct components?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 python的qt5界面
    • ¥15 无线电能传输系统MATLAB仿真问题
    • ¥50 如何用脚本实现输入法的热键设置
    • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
    • ¥30 深度学习,前后端连接
    • ¥15 孟德尔随机化结果不一致
    • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
    • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
    • ¥15 谁有desed数据集呀
    • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100