JSF 隐式导航与显式导航 [英] JSF implicit vs. explicit navigation

查看:29
本文介绍了JSF 隐式导航与显式导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我遇到 this SO 问题/答案,摘录如下:

I was considering using explicit page navigation rules in my web app when I came accross this SO question/answer, with the following excerpted from it:

...由于新的隐式导航"功能,导航规则自 JSF 2.0 起已过时.

...navigation rules are obsolete since JSF 2.0 thanks to the new "implicit navigation" feature.

但是,我已经阅读了大部分 CoreServlets JSF 2.0 教程,它有一个专门用于显式页面导航的部分,并且对其进行了积极的讨论.要么这违背了上述建议,要么我误解了什么.

However, I've gone through most of the CoreServlets JSF 2.0 tutorial, and it has a section devoted to explicit page navigation, and it talks favorably about it. Either this goes against the above recommedation, or am I misinterpreting something.

我不想以过时的方式创建新的网络应用程序.任何人都可以发光吗?

I don't want to create a new web app in an obsolete manner. Can anyone shed any light?

推荐答案

这有点主观,但归结为以下几点:

This is somewhat subjective, but ala, it boils down to the following:

  1. XML 中的导航规则是维护地狱.

  1. Navigation rules in XML are a maintenance hell.

使用导航规则表明有问题的 Web 应用程序受到一个 URL 后面"的影响.导致用户体验不佳的问题(页面不可收藏).

Using navigation rules suggests that the web application in question suffers from the "one URL behind" problem which causes bad user experience (pages are not bookmarkable).

使用导航规则表明,有问题的 Web 应用程序正在使用 POST 进行页面到页面导航,这不仅会导致糟糕的用户体验(页面不可收藏),还会导致糟糕的 SEO(机器人不索引)POST,因此公共搜索引擎无法访问 POST 导航页面).

Using navigation rules suggests that the web application in question is using POST for page-to-page navigation which causes not only bad user experience (pages are not bookmarkable), but also bad SEO (bots don't index POST, hence POST-navigated pages are unreachable for public search engines).

另见:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆