Build a sales notification app using NativePHP
Вставка
- Опубліковано 23 лип 2023
- NativePHP has been announced at Laracon by Marcel Pociot. A collaboration between Marcel and Simon. With NativePHP, we can build desktop applications with PHP. Let's put it to the test and make a little proof of concept.
Say hello on Twitter: / philo01
Make a living selling code via Anystack: d.pr/R8RtNF
Blog: philo.dev
Video audio enhancements by clean.audio - Наука та технологія
I was eagerly waiting for your contribution on UA-cam. Thanks Philo for sharing your knowledge and experiences.
Thanks for the kind words! 🙏🏻
Absolutely amazing! Waited for a long time! You guys rock!
Hope you enjoyed it!
this is my second video and i am middle or less programmer and I enjoy your videos cause I notice many things that I used to write in a long way and you unintentionally solve them for me. Together, you continue to upload the latest updates in laravel, livewier, and things related to php. Knowing that I love livewire too, keep going, legend.swallow Subscribe 😂
Thanks for the kind words, that's great to hear! 😄
This is awesome. Can't wait to use Native php already
Thank you brother for the information , excited to explore NativePHP !
Any time! 😄
Quite a neat example! Thanks for showing us this demo of nativephp.
Glad you liked it! :)
Looks very promising! How does it work with data stored in a database (MySQL in Laravel for example). Is the database located localy on the machine or can you interact with one on a live server?
And a follow up question: if so - can you have multiple apps on different machines with data being in sync and persistent?
By default it will use a SQLite database. You can interact with remote servers but you should be aware that any credentials are public because your code is not encrypted.
You could build an implement to keep data in sync. Using OAuth and APIs would be the best route.
Thank you very much. Really looking forward to using it on Windows
You're welcome!
I am a bit confused because in the documentation you mention both Electron and Tauri. Which one does NativePHP use? If I am not mistaken Tauri has been written in Rust.
The current release uses Electron. I’m not sure what the status is of the Tauri version. They are both wrappers for building apps while PHP is embedded to allow execution of PHP.
Great🎉. Waiting for more from you
More to come! 🎉
Good Day. I was recently watching your video and I was curious if this Native PHP consume a lot of memory on your computer as the same issue on Electron JS?
Electron has improved over the years, and memory consumption is pretty good! 😄
Wooow this is mind blowing..
It’s really cool! 🎉
This can make PHP shine again
What theme are you using for vscode including the fonts? Thanks!
I'm using PHPStorm with the default light theme and also the default font.
Thank you for sharing
My pleasure! 😄
Can't wait to see it ported over to Windows (without hacks)!
The main problem I see is that they are relaying on static-php-cli where there is no binary for windows yet ...
@@Rapid-eraser Which means the user can just open the source files including secret variables and modify the scripts to his needs
Where can i find some screenshots of how the native apps looks like? I quickly scrolled through this video and the endresult was never shown. Also the nativePHP website doesn't seem to have any screenshots.
You can use HTML and CSS to make the app look like anything you want. The end result is shown in this video but its a sales notification so there isn’t any UI. If you search for native php on Twitter/X you will find various examples.
@@PhiloDev Oh, OK. Thanks. I thought it would be more like wxWidgets or QT or something.
First one , thanks for update
No problem! 😄
Thanks for the video! Larajobs has a bounty for a notification project. Will help.
Your welcome! :) Good luck with the bounty!
I think you could have disabled terminal notifications somewhere in the project config (webpack config for me) to avoid installing rosetta.
Great to see PHP like this🎉, however, as a PHP dev I think it has its place and it is not like that. Maybe a small project but nothing to serious for this there is far better languages
Agree, for more advanced projects you probably want to go native instead of a wrapper.
Assuming a scenario where I`d want a route on the api.php file accessible on the LAN, a use case, print service api, how would one go about it? 😂 I have tried Artisan::call('serve'). Definately didnt work.
It's such a nice package, wow
what is the color scheme and file icon theme?
It’s the default PHPStorm light scheme and the new UI option you can enable.
Everyone says php is dead from past and Now Laravel is Sick🥰🥰🥰 Loved It ..
PHP and Laravel are alive and kicking 🚀
@@PhiloDev Indeed✌️🔥
They don't know that PHP is actually immortal lol.
Super
Most of the work here is done by Electron. The way I see it, NativePHP is a PHP interface on top of Electron. I think Tauri would have been a better choice, but after all NativePHP is still in alpha status, good decisions could be made even now.
Yeah I agree it's could be lot better and more efficient
Tauri support is underway :)
so its electron wrapped for php
Yes! Pretty cool right? 😄
cool! but waiting for windows to test!
I think they are working on it! :)
I tried to run it in linux but didnt work, is it available on linux?
It should according to the documentation.
How to build it?
What do you mean? :)
NativePHP is a promising project....
Definitely 😄
Unable to make it work on windows 11
How to get exe file
I think this mic for ASMR. I heart strange tongue voices 😂
what about androaid and ios application?
Those are not supported at this time.
PHP has been able to do "native" apps for a long time. There are widget library bindings for PHP. Electron isn't native...
True it's not really native. Still, it seems to be the first convenient way to start building desktop applications with PHP.
How about Mobile Applications?
I think there is a proof of concept but it's unknown if this will ever become available as I heard to Apple doesn't like it when you embed binaries to run code so it might not be possible.
Is this a Joke? Can this really be done? First time seeing this and can't wait to even visit the website to read the documentation. (I don't even want to watch the video so as to believe that I'm actually dreaming and it's not real). Someone please reply my comment, wake me up from my dream and tell me building desktop apps can be developed with this PHP...
It can really be done! Watch the video ;) haha next, go and give it a try :D
@@PhiloDev Thanks a lot for the video. I've watched the video. It's very informative & insightful. PHP is 🔥...
There is nothing native about it? it looks like a wrapper around a browser (electron)
Correct! It's not really native, but still pretty cool being able to use PHP to build a desktop application 😄
i got bamboozled, i thought they really find a way to build php to machine code. Instead it's just a glorified browser
As all native js applications are, like Discord, Telegram and other stuff
It does not matter as long as it does it job and provide a useful app.
End users don't care
I was thinking this shit was for mobile application.
Too much hype
the way i clicked this video was too fast
Light mode? Not sure if this guy can be trusted 😉
I actually like it during the day haha. In the evenings I switch back to dark mode.
Its basically just another electron wrapper 😂
The app size will be huge as sheed
It's not that bad, and there's also a Tauri version in development which should be significantly smaller. The PHP binary is only 21mb surprisingly.
my eyes hurt, a white development environment and no dark mode? really?
It depends on the time of day 🤓 during bright days; it’s easier to read on a white background; during evenings, I’ll switch to dark mode.
@@PhiloDev I think the white theme look gorgeous. What theme is it?