News for hackers. Stuff that matters.
Re:NativePHP: A framework for building desktop apps using PHP by deaddodo on Friday July 21, 2023 @08:14PM (#36821797)
Yeah, 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/

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.

Re:NativePHP: A framework for building desktop apps using PHP by biugbkifcjk on Friday July 21, 2023 @08:45PM (#36822007)
When they said native, they actually just meant local.
Re:NativePHP: A framework for building desktop apps using PHP by deaddodo on Saturday July 22, 2023 @04:49AM (#36824569)
No, 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.
Re:NativePHP: A framework for building desktop apps using PHP by johannes1234321 on Saturday July 22, 2023 @06:38AM (#36825098)
What is more "native" about the former?
Re:NativePHP: A framework for building desktop apps using PHP by deaddodo on Saturday July 22, 2023 @06:51AM (#36825166)
Nothing. 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).

Re:NativePHP: A framework for building desktop apps using PHP by madeofpalk on Friday July 21, 2023 @08:57PM (#36822071)
I guess PHP is native in the same way JS/HTML is native?
Re:NativePHP: A framework for building desktop apps using PHP by dopidopHN on Friday July 21, 2023 @09:34PM (#36822287)
* * *
Re:NativePHP: A framework for building desktop apps using PHP by Phrodo_00 on Friday July 21, 2023 @09:43PM (#36822339)
PHP 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
Re:NativePHP: A framework for building desktop apps using PHP by toomanydoubts on Friday July 21, 2023 @10:10PM (#36822483)
How is that not true for JS given node?
Re:NativePHP: A framework for building desktop apps using PHP by least on Friday July 21, 2023 @10:24PM (#36822558)
It'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.
Re:NativePHP: A framework for building desktop apps using PHP by Phrodo_00 on Tuesday July 25, 2023 @02:13PM (#36866859)
But 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.
Re:NativePHP: A framework for building desktop apps using PHP by deaddodo on Friday July 21, 2023 @11:42PM (#36823017)
PHP 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).

Re:NativePHP: A framework for building desktop apps using PHP by madeofpalk on Saturday July 22, 2023 @07:05AM (#36825226)
Is Nodejs native?
Re:NativePHP: A framework for building desktop apps using PHP by deaddodo on Sunday July 23, 2023 @06:10AM (#36833965)
JS executed in a browser is not. The constraints were pretty specific.
Re:NativePHP: A framework for building desktop apps using PHP by devmor on Friday July 21, 2023 @10:15PM (#36822515)
Yeah, 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.

Re:NativePHP: A framework for building desktop apps using PHP by porker on Saturday July 22, 2023 @12:49AM (#36823390)
Never 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.

Re:NativePHP: A framework for building desktop apps using PHP by SentinelRosko on Saturday July 22, 2023 @01:37AM (#36823592)
I 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.
Re:NativePHP: A framework for building desktop apps using PHP by pyr0hu on Saturday July 22, 2023 @06:56AM (#36825190)
As a Laravel dev, sadly I have to agree, the developers other packages (which are not paid) are abandoned quickly :(
Re:NativePHP: A framework for building desktop apps using PHP by jahsome on Saturday July 22, 2023 @01:39PM (#36828104)
I recognize Marcel's name, but not the other copyright holder. 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 quite as cohesive and intuitive.

I guess you just can't forget your first love.

Re:NativePHP: A framework for building desktop apps using PHP by aruggirello on Saturday July 22, 2023 @08:43AM (#36825740)
Wait, 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/ which "gives you" Qt 4 on PHP 5.1.

Fortunately enough, for those seeking a GUI toolkit for PHP, there's WxPHP which supports PHP 7 and 8:

https://github.com/wxphp/wxphp