有没有像 SEO 友好的基于 Java 的 RIA 之类的东西?

发布于 2024-11-04 12:01:49 字数 825 浏览 5 评论 0原文

我最近一直在研究 Java 服务器端 Web 框架,以用作新的 B2C 网站项目的渲染平台。根据我的研究,我将可用的解决方案大致分为两个阵营:

  1. 诸如 JSF 和 Tapestry 之类的解决方案,它们本质上归结为 HTML 和 servlet 编程;以及
  2. 诸如 Wicket、Vaadin 和 Echo 之类的解决方案,它们省去了 HTML 模板并提供了类似于 SWT 胖客户端的编程模型,基于窗口、视图组件和事件的层次结构,并根据该层次结构输出客户端 HTML。

第二组——RIA 框架的一个分支——在服务器端控制、开发人员生产力(例如简单性、不需要处理 servlet 重入问题等)、视图小部件、out-of 方面提供了许多理想的功能。 - 开箱即用的跨浏览器兼容性和炫酷的视觉效果。

对于 B2C 来说,不太理想的是 RIA 框架提供单页界面。归根结底,他们自然不允许浏览器历史记录和书签(这是可以做到的,但它很混乱且有限,例如仅限于 URL 片段),也许最重要的是,他们对 SEO 漠不关心,这是一个对于一个以消费者为中心的网站来说,这有点令人震惊。

这取决于将 servlet 和 HTML 控制委托给框架。问题是,有没有办法两者兼得,还是这太乌托邦了?一个服务器端 RIA 类型的框架,具有恕我直言带来的所有好处,但具有灵活和友好的 URLS 用于书签以及 SEO 意识?

当然,这样的解决方案可能不是单一框架,而是分层的。顺便说一句,框架 itsnat 似乎提供了上述大部分内容,但由于它的实现方式,我会对服务器开销(CPU 和内存)有很多担忧 - 尽管我确实认为RIA 框架不可避免地会比 servlet/模板编程方法更加依赖服务器。

有人知道前进的替代方法吗?

I have recently been investigating java server-side web frameworks to serve as a rendering platform for a new B2C web site project. Based on my research I would broadly divide the available solutions into two camps:

  1. those such as JSF and Tapestry, which essentially boil down programming HTML and servlets, and
  2. those such as Wicket, Vaadin and Echo, which dispense with the HTML templating and offer a programming model akin to SWT thick clients, based on a hierarchy of windows, view components, and events, outputting the client-side HTML based on this hierarchy.

The second group - which is one branch of RIA frameworks - offer a lot of desirable features in terms of server-side control, developer productivity (e.g. simplicity, not needing to deal with servlet reentrancy issues etc.), view widgets, out-of-the-box cross-browser compatibility and cool visual effects.

What's not so desirable for a B2C is that the RIA frameworks deliver Single Page Interfaces. At the end of the day, they don't naturally allow browser history and bookmarking (it can be done, but it's messy and limited, e.g. to URL fragments only) and, perhaps most significantly, they are indifferent to SEO, which is a bit of a showstopper for a consumer-focused website.

This would be down to delegating the servlet and HTML control to the framework. The question is, is there a way to have both, or is that just too utopian? A server-side RIA-type framework with all the benefits that that brings IMHO, but with flexible and friendly URLS for bookmarking along with SEO awareness?

Such a solution might not be a single framework, of course, but be layered. As an aside, the framework itsnat seems to offer much of the above, but due to the way that it's implemented I would have a lot of concerns about server overhead (CPU and memory) - although I do think that it is kind of inevitable that RIA frameworks will be more server-heavy than the servlet/templating programming approaches.

Anybody know about alternative ways forward?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

放我走吧 2024-11-11 12:01:49

JSF 和 Tapestry 可以开箱即用地管理类似 Restful 的 URL。 Wicket 可以扩展来支持它们。

对于检票口,请检查

Tapestry 支持 URLRewriter。如果您想要更改 URL 并保持与旧 URL 的向后兼容性,这非常有用。

JSF and Tapestry can manage restful like URLs out of the box. Wicket can be extendeded to support them.

For wicket check this.

Tapestry supports an URLRewriter. This is useful in case you want to change your URLs and keep backwards compatibility with the old urls.

反话 2024-11-11 12:01:49

看看这个复杂的基于ItsNat的示例,单页界面可以对SEO友好并且内存消耗可以非常低,阅读“断开子节点与客户端的连接”以了解如何节省服务器中的内存。

Take a look to this complex ItsNat based example, Single Page Interface can be SEO friendly and memory consumption can very low, read "disconnect child nodes from client" to know how you can save memory in server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文