简体   繁体   English

如何从Tapestry 4迁移到5?

[英]How to migrate from Tapestry 4 to 5?

I have an legacy application written with Taspestry 4. 我有一个用Taspestry 4编写的遗留应用程序。

How can I upgrade it from Tapestry 4 to Tapestry 5.3.8? 如何将它从Tapestry 4升级到Tapestry 5.3.8?

Unfortunately I have never had experience before with Tapestry. 不幸的是,我以前从未有过Tapestry的经验。

I can't find any migration guide. 我找不到任何迁移指南。 All what I can find on Internet is 我在互联网上找到的所有东西都是

Tapestry 5 did not even attempt to be backwards compatible to Tapestry 4. Instead, it laid the ground work for true backwards compatibility going forwards. Tapestry 5甚至没有尝试向后兼容Tapestry 4.相反,它为真正的向后兼容性奠定了基础。

Currently I just found that annotations: 目前我刚发现注释:

import org.apache.tapestry.annotations.InjectObject;
import org.apache.tapestry.annotations.Persist;

may be replaced with 可以替换为

import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.annotations.Persist;

Also how can I get rid off hivemodule.xml ? 另外我怎么摆脱hivemodule.xml

I'll be thankful for any links, documentation or advice. 我会感谢任何链接,文档或建议。

As far as I know there is no simple migration possible. 据我所知,没有简单的迁移可能。 From the tapestry website : 来自挂毯网站

There is no existing tool that supports upgrading from Tapestry 4 to Tapestry 5; 没有现成的工具支持从Tapestry 4升级到Tapestry 5; Tapestry 5 is a complete rewrite. Tapestry 5是一个完整的重写。

You might be possible to upgrade/rewrite your application incrementally by building some session sharing services. 您可以通过构建一些会话共享服务来逐步升级/重写应用程序。 Disclaimer: I have never attempted this nor have I seen it done between tapestry 4 and 5. I have seen it done with a migration from tapestry 5 to wicket. 免责声明:我从来没有尝试过这个,也没有在挂毯4和5之间看到它。我已经看到它从挂毯5迁移到wicket。 So see it in that light, if you wish to move away from tapestry 4, you'll have to rewrite partially/completely. 所以从那个角度来看,如果你想远离挂毯4,你将不得不部分/完全重写。 Which raises the question what it is you need to achieve that can't be done with tapestry 4 and focus on how to best achieve that. 这就提出了一个问题,即你需要实现什么,而挂毯4无法做到这一点,并专注于如何最好地实现这一目标。

I know it is probably not the answer you were hoping for. 我知道这可能不是你所希望的答案。 Good luck! 祝好运!

I found this website addresses that issue. 我发现这个网站解决了这个问题。 tapestry site 挂毯网站

Look at the Segregating Applications into Folders section near the bottom of the page. 查看页面底部附近的“将应用程序分隔到文件夹”部分。 Tapestry 5 allows itself to be stashed in a folder, allowing the user to slowly transition their project from the old format (ie Tapestry 4) into Tapestry 5. Best of luck! Tapestry 5允许自己被隐藏在一个文件夹中,允许用户将他们的项目从旧格式(即Tapestry 4)慢慢转换为Tapestry 5.祝您好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM