PHP 中的 Objective-C / Cocoa 桥?
PHP 有什么好的 Objective-C 或 Cocoa Bridge/Connector 吗?我对 Mac 开发感兴趣,但想用 PHP 来完成。如果您能为我推荐任何适用于 Mac 的 PHP 编译器,那就太好了。
注意:我已经知道 Titanium 之类的应用程序,但这不是我想要的。 谢谢。
Is there any good Objective-C or Cocoa Bridge/Connector for PHP? I'm interested in Mac development, but want to do it with PHP. It'd be also good if you could recommend me any PHP compiler for Mac.
Note: I already know Titanium-like apps, and that's not what I want.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来这里有一个: http://www .slideshare.net/wezfurlong/hot-chocolate-you-got-cocoa-in-my-php
(下载链接在幻灯片中)
PHP 中几乎没有什么可以为您的 Mac 开发带来任何好处,尽管。如果您想使用具有更熟悉的语法的语言进行 Mac 开发,并且不想处理太多内存问题等,那么使用 MacRuby 或 RubyCocoa 进行编码应该不会比以前有太大的跳跃PHP 经验。
Looks like there's one here: http://www.slideshare.net/wezfurlong/hot-chocolate-you-got-cocoa-in-my-php
(download link is in the slides)
There's little in PHP that is going to do you any favors with Mac development, though. If you want to do Mac development with a language that has a more familiar syntax and you don't want to deal as much with memory issues and such, doing your coding with MacRuby or RubyCocoa shouldn't be too much of a jump from previous PHP experience.
不幸的是我无法让 wezfurlong-Bridge 在 Mac OS X Lion 下运行。因此,我决定利用 Objective-C 的灵活性让 PHP 与我的 Cocoa 应用程序对话,甚至创建对象并向它们发送带有参数的消息。
您可以在 http://github.com/cundd/pop/ 上获取包括(非常基本的)示例应用程序的源代码
Unfortunately I wasn't able to get the wezfurlong-Bridge running under Mac OS X Lion. So I decided to use the flexibility of Objective-C to let PHP talk to my Cocoa application, even create objects and send messages with arguments to them.
You can get the source including the (very basic) sample application on http://github.com/cundd/pop/
我像这样“桥接”PHP…简单就是金…如果你想变得更奇特,JSON 来回编码,并将原始数据作为
base64
编码字符串发送…I "bridge" PHP like this… simplicity is golden.. If you wanna get fancy, JSON encode things back and forth, and send raw data as
base64
encoded strings…