Need help about future decision of my PB apps

Everything else that doesn't fall into one of the other PB categories.
User avatar
idle
Always Here
Always Here
Posts: 5096
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Need help about future decision of my PB apps

Post by idle »

Kukulkan wrote:Hi idle,

thank you very much for your opinions.
idle wrote:I don't think electron and node.js are good options yet.
Maybe you can give me some more information about why? I found no real drawbacks yet (except the huge size). Do you think there is something I should have an eye on?
Apart from the size the applications that I've seen built with them are slow to load and seem a little clunky.
Windows 11, Manjaro, Raspberry Pi OS
Image
User avatar
Kukulkan
Addict
Addict
Posts: 1352
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Need help about future decision of my PB apps

Post by Kukulkan »

Hm,

I rebooted my machine (to make sure no caching is used) and started three Electron apps I use on my machine: Skype, KeeWeb and Visual Studio Code. While Skype needs some seconds, KeeWeb starts lightning fast and Visual Studio Code seem to need 2 to 3 seconds. This might be a little slower than native apps, but still okay... But I'm on a fast machine with SSD. So maybe it has more effect on slower machines?
User avatar
idle
Always Here
Always Here
Posts: 5096
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Need help about future decision of my PB apps

Post by idle »

If you don't mind ditching all your PB code I guess electron would be fine. I'm just a little dubious about the security of node.js on the desktop.
On the whole application servers strike me as being a good idea, you can create a desktop, lan or wan application with little change but then you're either targeting the native systems embedded browser, cef or the users systems browser.
In terms of your motivation electron seems to be a little overkill, though perhaps it suits your business plan going forward.

I've been running a public application server built with civetserver for a couple of months on an old XP box from home
It just utilizes the built in preprocessor for server side processing and delivers html but it can just as easily use
a client side JS framework, it's secure, light on resources and does the job well. I still have a lots to do though.
I'm currently using lmdb as the DB engine, though without reflection capabilities in PB it's a little hard to integrate it transparently
so it requires you to wrap the reads and writes through separate functions at the moment but that's ok it's just slightly repetitive
at times but it sure beats SQL as far as ease of development goes, way more flexible and easier to adapt.

To CEF or not to CEF that is the question?
At the moment my project won't benefit from CEF though for cross platform support it will probably make more sense
than relying on the systems embedded browser. So at some point I will capitulate and import it
but at the moment I have no income and my project still 3 to 6 months away from being production ready.
Windows 11, Manjaro, Raspberry Pi OS
Image
User avatar
the.weavster
Addict
Addict
Posts: 1537
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: Need help about future decision of my PB apps

Post by the.weavster »

idle wrote:On the whole application servers strike me as being a good idea...
I agree. With the project I'm working on at the moment I'm using Abyss and CGIs coded with PB to make a server side API and I'm making the client side with wxPython. The recently improved database and JSON commands mean PB has been great for this. I really love the simplicity of CGI and simple solutions are invariably more robust.

The client side has to cooperate with an existing application that doesn't have an API so I've had to use the Windows API to monitor what the user is looking at in the other app to keep my companion app in synch to give the illusion of integration. If it weren't for that I might have gone for SpiderBasic on the client side. Having said that I've quickly grown to love wxPython and I've been pleased with how easy it is to create an installable application with PyInstaller.

@Kukulkan
If you're interested in trying wxPython I recommend the Wing Python IDE as the best IDE I've found for it.
Post Reply