How make our XOJO Web app run faster on user screen

How make our XOJO Web app run faster on user screen?

I had a friend who is php programmer. We create ADD/EDIT/DELETE program accessing the same database on the same server we deployed. We did this just for comparison.

I noticed that PHP run more faster that my XOJO web app.

Why? Is it usual?

Comparing apples to oranges
Xojo gives you the UI/Backend and everything else

PHP is a server side only language so you must provide everything else, HTML/JavaScript/CSS

Yep. It is when well done.

There is back end (server side; PHP, or an Xojo app) and front end (in web HTML+CSS+JS). Xojo does a front end code that works in sync with the back end code exchanging “messages” all the time. So when you click a button in Xojo to make a sum of 2 fields and present a result, a JS code reads such values and send to the Xojo server that execute such sum there and send the result back and a JS code will present it. When you write both codes with separation of concerns in PHP+JS, you notice that for such task you don’t need to send anything to the server, you can solve everything in the front end code, so you get the values, sum them and present the result without sending anything to the server. Instantaneously. Many other things too you can design trying to squeeze bits of extra speed and only talk to the server when you really want something there (like reading/writing to a DB) but all the UI parts works detached from the server using JS to run them. Your friend probably is taking advantage of JS codes more than PHP codes to pass such impression of snappier code.

1 Like

If you want a real performance test write the backend in Xojo (SOA or Micro Services) and the frontend in your favorite JavaScript framework. In many cases it’ll be faster than a pure Xojo web app especially for such “local calculations” but it’ll take exponentially longer to create and maintain. Most SMB web applications don’t need to service an extreme number of simultaneous clients so for those markets Xojo webapps are a perfect fit. Just a thought!

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.