从 Rails 调用应用程序

发布于 2024-07-20 01:25:09 字数 196 浏览 3 评论 0原文

我有一个使用 COBOL-CGI 的现有网站/应用程序,其中 COBOL 应用程序通过使用占位符填充数据来创建 html 页面。

我现在想创建一个rails站点,除了使用自己的数据库之外,还应该调用外部应用程序来检索各种信息。

这个应用程序还能用cgi调用吗? 有没有更好的方法从 Rails 调用第 3 方应用程序? 活动X?

I have an existing website/application that uses COBOL-CGI where the COBOL app creates the html pages by filling in data using placeholders.

I now want to create a rails site that in addition to using its own db, should also call the external application to retrieve various information.

Can this application still be called using cgi?
Is there a better way to call 3rd party applications from rails? ActiveX?

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

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

发布评论

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

评论(1

演多会厌 2024-07-27 01:25:09

您可能想要采取一些不同的做法。 您可以让 Rails 应用程序调用 COBOL CGI,但当前的应用程序正在创建 HTML,您需要从其中抓取数据。

也许您最好修改 COBOL 以生成一些更简单的表示形式,甚至包括 CSV 文件,尽管 YAML 或 JSON 可能更容易使用。 然后,您可以调用 COBOL 应用程序,并捕获其输出以供 Rails 应用程序使用。

You probably want to do it a little differently. You can have the Rails application call the COBOL CGI, but the current one is creating HTML, which you'd need to scrape for the data.

Probably you'd be best off to modify the COBOL to generate some simpler representation, down to and including just a CSV file, although YAML or JSON might be a little easier to use. Then you can invoke the COBOL application, and capture its output for use by the rails application.

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