如何从 Phalcon 调用 Jasper 报告 (.jasper)
我有许多使用 PHPJavaBridge 调用编译的 Jasper 报告 (.jasper) 的 PHP 脚本。我想将所有这些脚本转换为 Phalcon 框架,然后将其编译为 C 可执行文件。我应该继续使用 PHPJavaBridge 还是有更好的方法?
我有丰富的 PHP 经验,但还没有使用 Phalcon 的经验。
I have many PHP scripts that call compiled Jasper reports (.jasper), using the PHPJavaBridge. I would like to convert all those scripts to the Phalcon framework, which gets complied into a C executable. Should I continue to use the PHPJavaBridge or is there a better way?
I have plenty of PHP experience but, no experience with Phalcon yet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您可能想知道 PhalconPHP 框架是用 Zephir Lang 编码的(也由 Phalcon 团队构建和维护)。虽然 PHP 框架很少成为应用程序的瓶颈,但它是一个非常好的框架,但很可能始终是您的代码成为瓶颈。
如果您想像 PhalconPHP 一样编译 C 扩展,您将需要看看 Zephir Lang:
我知道两个 PHP 到 Zephir 的转译器,你可以在 Github 上找到它们,但我不会在支持上赌太多。
Zephir C 编译的 PHP 扩展非常强大,我建议在 PHP 上构建所有内容,因为 PHP8+ 将为您带来出色的原生性能、更广泛的支持和支持。兼容性好,易于维护。如果您在应用程序的某些部分遇到瓶颈和速度减慢,那么您可能需要使用 Zephir 来优化应用程序这些特定部分的性能。
另请注意,Zephir 需要针对新的 PHP 版本进行改进和调整,如果您想将来升级 PHP 版本(新功能、安全补丁等),这最终可能会成为问题。
First, you might want to be aware that PhalconPHP Framework is coded in Zephir Lang (Also built and maintenaned by the Phalcon Team). While PHP Frameworks are rarely the bottleneck of your application, it's a pretty good Framework but it will most likely always be your code that will be the bottleneck.
If you want to compile C extensions like PhalconPHP does, you will want to take a look at Zephir Lang:
I know two PHP to Zephir transpiler which you can find on Github, but I wouldn't bet too much on support.
While Zephir C compiled PHP extensions are very powerful, I would suggest building everything on PHP as PHP8+ will give you great performance natively, wider support & compatibility with ease to maintain. If you are facing bottlenecks and slowdowns in some parts of your application, then you may want to use Zephir in order to optimize the performance on those specifics parts of your application.
Also be aware that Zephir needs to be improved and adjusted for new PHP versions which can eventually become a problem if you want to upgrade the PHP version in the future (for new features, security patches etc.)