why use xojo instead of javascript + html 5 + css for crossplatform development?

especially when it comes to linked database applications…

Here are some articles and professionals talking about why this is a really bad idea:
Electron is Cancer - Casper Beyer
Electron is Flash for the Desktop - Joseph Gentle
Electron considered harmful - Drew DeVault
“You should have higher standards” - Bryan Jones

My favorite is the quote “Electron enables lazy developers to write garbage”

I do not necessarily mean to use electron. you can also write the code by hand

Electron is (unfortunately) the leading way to bundle JS, HTML, and CSS into a desktop app. It also includes Node.js and means to interact with the system. If you’re going to make any meaningful cross-platform app with JS, HTML, and CSS, not using Electron is an even worse idea than using it.

It doesn’t have to be an either/or. We’re using Xojo to write html + javascript + css in Xanadu [ https://campsoftware.com/products/xanadu-for-xojo.php ].

We ran into enough bugs and limitations in the Xojo Web Framework that was super frustrating. Things like the ‘round trip’ lag and couldn’t easily show a spinner, bugs in containers when not visible, and other issues too. I can’t remember them all as it’s been a while. Some bugs made me wonder if anyone else was actually using the Xojo Web Framework in production. I’d REALLY like to see Xojo convert the Feedback app into a Web App that uses the Xojo Web Framework as that’d be useful to uncover issues.

When @Tim Dietrich first demoed Aloe [ https://aloe.zone/ ], I wasn’t able to see how making a Web App by writing all the html + javascript + css could be practical since the Xojo Web Framework did so much heavy lifting for me.

But when I put my toe the water and started with a ‘hello world’ test with Aloe, I was hooked and had TOTAL control over everything. If there was a bug, I could fix it myself rather than submitting a bug and not knowing when or if it’d be fixed. At some point when I could see how easy Xojo made it to use Xojo code to write html + javascript + css, I found a nice template [ https://www.w3schools.com/w3css/w3css_templates.asp ] and started using w3.css [ https://www.w3schools.com/w3css/w3css_references.asp ]. That allowed me to simplify my code without having to learn everything about javascript + css. Now we’re using AJAX to save data when exiting controls.

The Xanadu site will be updated before XDC with a massive update. I’ll be demoing how easy it is to develop using html + javascript + css in my XDC session.

All this said I’m excited to see Xojo Web Framework 2 at XDC. I hope I can throw away Xanadu and rebuild it in Xojo Web Framework 2, but that’ll depend on if I can fix bugs in controls, deal with round trips, and other issues.

Are you talking about desktop apps created with javascript + html5 + css ? Come on :smiley: :smiley: :smiley:

Web Apps and Console Apps using Aloe.

That’s what I thought OP was talking about…

Otherwise the question becomes “Why use Xojo Web over doing it by hand?” in which case I would not have commented. @nicolás canessa if that’s what you meant, then I retract my grumpiness :slight_smile:

It’s still valid for a Desktop App as a Web App unless you need special hardware or special OS integrations. We’re using Xanadu as a FileMaker replacement which are generally used as Desktop Apps. But it’s not specifically a ‘Desktop App’. :slight_smile:

I usually chime in when Xojo Web is concerned. But since 1996, I had ample time to see what is possible or not in these separate languages. Not to mention the nightmarish maintenance.

I read several times the OP’s post. He seems indeed to be talking about desktop apps.

I am sorry, but doing the same as a Xojo Desktop app with Javascript + Html 5 + Css, if at all possible, is the kind of thing only someone who does not know these languages can ask.

I am talking about develop one DB driven app and with the the same code, without any change, be able to use it in desktop or web

I do not mean if it is possible or not, because I know it is. I mean that js + html + css seems to be very practical and powerful. What I find interesting in this conversation is to listen to your opinions

Cool. The way you’d do that would be to create a Web App where folks on the desktop would use a browser. The trick is to make the Web App feel like a Desktop App by not reloading the page all the time by using AJAX. :slight_smile:

[quote=376761:@nicolscanessa]I am talking about develop one DB driven app and with the the same code, without any change, be able to use it in desktop or web

I do not mean if it is possible or not, because I know it is. I mean that js + html + css seems to be very practical and powerful. What I find interesting in this conversation is to listen to your opinions[/quote]

Then I frankly don’t see the point for a desktop app. Just do a server app, and access it through a browser…

There are some gotchas, but they are few and far between. Case in point: Discord uses Electron. Without Electron they would have to search for some other off-the-wall solution for system-wide hotkeys (Push-To-Talk, Mute, etc) which wouldn’t be as elegant, or just have every user with a constantly active microphone (not on my server!). Their web app is, essentially, the same as their desktop app, they just tossed it into an Electron bin.

Don’t misunderstand me, I’m not a fan of building web applications and tossing them in to a native App container, but the case can be made in certain specific instances.

Totally agree. It depends on the App, but for normal database apps, a web app has equal footing if the UI is right.

Why not? The app I’m now re-implementing in Xojo was originally written in Javascript, HTML, and CSS in a browser, and used Ajax via Apache to communicate with a number of backend scripts that in turn used SQLite for storage and various sockets to communicate with remote hosts. And it worked on Mac, Win7, and Mint.

The Xojo version is almost the same as the original.

Sorry - by “same”, I mean it looks and operates the same. I don’t mean that I shoehorned the original code into some kind of Xojo box.

I won’t claim that there’s never a use case for building a desktop app using web stack technology. But I cringe every time I see one. Terrible performance; excessive memory requirements; non-native look and feel; poor OS integration; poor forward compatibility; etc. If I have a choice between native and web-based desktop apps, I will choose native every time.

To be completely honest, I don’t even like the web stack for the web. It’s a shame that something better was not designed or utilized from the beginning. HTML+CSS make for a horrendously complex and inefficient imaging model. JavaScript is great for short one-off scripts (its original intent) but terrible for large, multi developer projects. And browser engines have become monsters to handle it all.

Check Activity Monitor sometime, or use developer tools on a random commercial site. We now have web pages…singe pages…that require more memory and vastly more CPU cycles than entire operating systems from the early 90s. All to display some text, photos, and a few web ads. Something that QuickDraw or Display PostScript could have handled with a fraction of the resources. It’s ridiculous.

Bad example. Discord is a CPU hog and battery drainer when not completely idle. Just like Microsoft Teams (another Electron app). Actually, Teams is worse since it’s a hog even when idle (leave it to Microsoft). When a chat app is using more CPU cycles and battery power than Photoshop, and that’s considered acceptable by end users, there is something wrong with the world.

Tim, I am not saying it is not possible, I know enough about web engineering to do just the same.

I am simply not convinced it is a good approach to Desktop software. Especially as we talk about that in a Xojo forum. I am sorry, but such an app on a Mac must be downright horrid. All what makes the Mac gorgeous in terms of user experience is directly the result of the Mac controls, and doing without is IMHO simply massacring the HIG.
I understand Linux and Windows users may be a little less picky, but yet, I will take a UWP app over a browser app any day. Even if the new Windows design guidelines are closer to the web, a true native app is way faster and less cumbersome.

In short, yes, it is possible, but I still think it is not a good idea.