如何将 Catalyst 的各个部分集成到旧版 Web 应用程序中?
我正在努力解决一个经典的遗留项目:手动 URL 解析和组合、手动路由等。了解一点 Catalyst 我渴望至少其中一些概念,例如正确的(又名透明的)URL 路由和参数解析。理想情况下,我只是使用 Catalyst 并完成它,但考虑到它是一个遗留项目,我想我只有两个选择:
- 以某种方式在我的项目中使用 Catalyst 的一部分 - 我不确定这是否可行。是吗?
- 使用单个模块实现 Catalyst 框架的一部分——您有什么经验,可以推荐哪些模块?
I'm struggling with a classic legacy project: manual URL parsing and composition, manual routing etc. Knowing a bit of Catalyst I long for at least some of the concepts, for example proper (a.k.a. transparent) URL routing and parameter parsing for example. Ideally, I'd just use Catalyst and be done with it, but given it's a legacy project, I guess I only have two options:
- Somehow use parts of Catalyst in my project -- which I'm not sure is possible. Is it?
- Use single modules implementing parts of Catalyst's framework -- what are you experiences, which modules can be recommended?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有尝试过这个,但从我的尝试来看,我认为采用遗留项目并半途“催化”它并不是一个真正可行的选择。我不认为 Catalyst 应该以这种方式使用,并且尝试这样做可能会比它值得付出更多的努力,特别是因为你会遇到其他人不熟悉的边缘情况与(因为他们不知道您的遗留代码)。
仅仅让遗留项目适应 MVC 就已经够困难的了,甚至不考虑使用哪个框架。因此,恕我直言,如果您打算这样做,请寻求一个完整的解决方案:
I have not tried this, but from what I have tried I don't think that it's really a viable option to take a legacy project and "Catalyze" it halfway. I don't think Catalyst is meant to be used in that way, and trying to do so will probably be far more effort than it is worth, especially since you'll be hitting edge cases all over the place that nobody else has any familiarity with (since they don't know about your legacy code).
It's hard enough just getting a legacy project to fit into MVC, without even considering which framework to use. So, IMHO, if you're going to do it, go for a full-assed solution: