4 ms·
The documentation says it builds “truly native” apps, so I was expecting direct PHP bindings to native APIs and for the UI to be fully native (AppKit, GTK, etc.
by LinguaBrowse 3y ago
The documentation says it builds “truly native” apps, so I was expecting direct PHP bindings to native APIs and for the UI to be fully native (AppKit, GTK, etc.). On closer inspection, though, it’s just a PHP framework on top of Electron? A bit disingenuous.
- Fire-Dragon-DoL 3y agoElectron is native. If you use windows APi or appkit, you are writing assembly code. /s
- deaddodo 3y agoYeah, super disingenuous. Especially considering PHP is already native (unless you mean specifically compiled code). It also has direct bindings to GTK: http://gtk.php.net/ http://gtk.php.net/ And other native libraries. This project seems to conflate "native" with "has its own window" (versus running in a browser). While I would argue the more common understanding is "native" meaning "running outside of a sandbox/closed environment and directly on the OS". Ironically, using the latter definition, this project is less native than just coding PHP directly.
- biugbkifcjk 3y agoWhen they said native, they actually just meant local.
- deaddodo 3y agoNo, they didn't. Unless you can Explain how: ./Electron.app Is any more local than: php ./MyApp.phar Especially considering the former spins up an entire browser + PHP server instance, while the latter runs the code directly.
- johannes1234321 3y agoWhat is more "native" about the former?
- deaddodo 3y agoNothing. In fact, it's less native (by most definitions, given it's running in a sandboxed environment). That's the whole point of this thread. What's more native? Running a Python app that uses PyQT, or running a single purpose web browser in a window that calls a sandboxed+bundled Python server and renders HTML widgets? In addition, OP was talking about locality. In both of the aforementioned examples, they're equally localized (both executing on the machine they're loaded on).
- madeofpalk 3y agoI guess PHP is native in the same way JS/HTML is native?
- dopidopHN 3y agoYou can have script interpreted by a binary. Without a browser involved.
- Phrodo_00 3y agoPHP itself is more native than that in the sense that you can basically run PHP scripts on top of your OS, just like Python or Ruby
- toomanydoubts 3y agoHow is that not true for JS given node?
- Phrodo_00 3y agoBut you specified JS/HTML, that's through the browser, and it doesn't have APIs for interacting with the OS as a normal language runtime does. JS on Node is about the same as PHP in this regard.
- least 3y agoIt's technically true, but JS/HTML is different from Node. JS/HTML is interfacing through the browser's DOM, while Node interfaces with the operating system itself.
- deaddodo 3y agoPHP is native in the same way Python, Red, Java, etc are native. They have a VM, but otherwise interface directly with the OS. It is in no way similar to JS/HTML in a browser (or Electron).
- madeofpalk 3y agoIs Nodejs native?
- devmor 3y agoYeah, when I saw the title I was hoping this was a revival or renewal of one of these projects. "Contained PHP server that opens an electron window" is not exactly exciting or interesting.
- porker 3y agoNever let the truth get in the way of good marketing. NativePHP comes from a well-known member of the Laravel community, and the Laravel approach to promotion makes the hype in the early days of Ruby on Rails look tame.
- SentinelRosko 3y agoI mean, it's from the same well-known group in the Laravel community that builds and abandons packages pretty quickly. Based on that track record alone, this should be a hard pass.
- pyr0hu 3y agoAs a Laravel dev, sadly I have to agree, the developers other packages (which are not paid) are abandoned quickly :(
- jahsome 3y agoI recognize Marcel's name, but not the other copyright holder. I used to really like tinkerwell, though haven't needed it for some time. I'm curious, what else has this group built and a abandoned? I have been out of the php game for a while, but I long for the Laravel ecosystem and community. I've yet to find things in other languages as cohesive or intuitive. I guess you just can't forget your first love.
- aruggirello 3y agoWait, this PHP-GTK thing is abandonware! Last release in 2008, and only supports PHP 5.5. Currently, and for most purposes (especially for new projects), PHP 7 is already being considered old... the amount of work that went into PHP 8 vs. PHP 5 is simply staggering. PHP 5.5 is just too old to develop against! The same applies to https://php-qt.org/ https://php-qt.org/ which "gives you" Qt 4 on PHP 5.1. Fortunately enough, for those seeking a GUI toolkit for PHP, there's also WxPHP [1]: https://github.com/wxphp/wxphp https://github.com/wxphp/wxphp [1] EDIT: WxPHP is being actively developed to support PHP 7 and 8 (there are no builds available yet)
- deleted 3y ago[deleted]
- 677IUHDDd 3y ago[dead]