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

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

问题描述

当我遇到

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.

我不想过时地创建新的Web应用程序.任何人都可以照亮吗?

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天全站免登陆