Flex 中的客户端控制
在我的 Flex 应用程序中,我应该在哪里存储会话数据?
我的业务代码以 SOA 方式公开,客户端代码和后端之间的通信发生在非常精确的时刻,但我必须在 Flex 客户端中保留变量,以便用户可以在发生故障时恢复。我希望这个事件流程是可行的。
user1 登录并进行一些操作
由于意外事件(未按时注销、客户端代码异常、浏览器关闭、通信中断等)而失败
p>user2 登录,进行一些操作并成功提交
自客户端应用程序为 user1 加载了共享对象以来,
这是否可行与 shraredObjects?,处理这个问题的常见做法是什么?,我也不能强迫用户调整她/他的浏览器以接受共享对象。
提前致谢
P.S:我不想在客户端和业务代码之间使用细粒度的通信来控制客户端的当前状态,业务代码是 SOA 风格,而且 BlazeDS 中使用的 backing-bean 负载很重。
In my flex app, where should i store session data?
My business code is exposed in a SOA way and the communication between client code and the backend takes place at very precise moments yet i have to keep variables in the flex client so the user may resume in case of failure. I'd like this flow of events to be feasible.
user1 logins and makes some actions
failure due to the unexpected events (logout not in due time, exception in client code, closed browser, communications breakdown, etc)
user2 logins, makes some actions and commits successfully
user1 logins again and resumes where he left in point 2 since the client app loaded the sharedObject for user1
Is this feasible with shraredObjects?, what's common practice to deal with this?, also i cannot impose the user to tweak her/his browser to accept sharedObjects.
Thanks in advance
P.S: I don't want to use fine-grained communication between client and business code to control the current state of the client, business code is SOA style, and also the backing-bean used in BlazeDS is heavily loaded.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一旦 SharedObject 是关联数组,您就可以在存储数据时将当前用户名添加到键中:
或者甚至为每个用户创建单独的共享对象文件:
但我最好将当前状态存储在服务器上。这可以在注销或计时器事件时完成,以防止繁重的通信。
As soon as
SharedObject
is associative array, you can add current user name to key when you store data:Or even create individual sharedObject file for each user:
But I'd better store current state on server. This can be done on logout or on timer event to prevent heavy communication.