The great Xojo Myth

They have touted this over & over and repeated it yet again in a brand new blog post

And as an extra plus, using Xojo, you can expand your application supported platforms to include building native desktop clients (Mac, Windows, Linux) or mobile clients (iOS, Android) , all with just one codebase.

I would LOVE to see a single project that can be compiled for all desktop targets, iOS, android, and web that can do Hello world. From a single project file !

But they cant yet they repeat this “single code base” lie over & over

Heck you cant even make a single project to compile iOS & android from one project file. And differences between them prevent a “single codebase” from working especially if it has anything to do with UI

Compiling one project for Linux, Windows & macOS only works if you are working on a desktop application.

1 Like

:thinking: How Xojo Simplifies Full-Stack Development for Everyone

1 Like

The IDE might be cross platform, but app creation is not when you need four Xojo projects.

Also, it seems that there is less and less abstraction. One example is different error messages coming back when using URLConnection, depending on the project type. How is that abstraction?

2 Likes

Then you should consider to use gluon mobile and gluon desktop with graalvm and javafx. Possibly a solution. And not XOJO.

Still trying to get clients to give something else a try in more areas :slight_smile:

I know. Old story. I am happy. With my tool chain and liberica native image kit it is nice for desktop apps with swing or fx

A quick tutorial on how to take advantage of Liberica NIK would be HUGELY useful

Does it matter what IDE you use ?

First of all: Native Image Kit is an implementation of GraalVM, the Java ahead of time compiler. The NIK from liberica is optimized for Swing and also JavaFX. That really makes sense while it is performant and - what all developers really want - you have a compiled and so not accessible Sourcecode. That makes it really interesting for use instead of some other languages.

The Native Image Kit has a few clues which I will show in a Tutorial within the next few days.

Advantage: really fast in Startup. Disadvantage compared to running tith JRE: the performance running with JRE is a bit higher (okay, discussion on a high level).

Java gives you three ways to distribute your applications. First of all the jar File. That is my favourite format when distributing my embedded applications. There is a jre installed on the system which I use. All my Customers getting Updates from time to time. With jar Files you have extremely small updates, big applications coming up with a few Megabytes, small ones with a few KB. But you need to be sure that the Customer has the right Java version installed. If your jar file was compiled with Java 22 for example it will not run on a Java JRE 11. The other way around a Java 11 compiled one will run on JDK 22. Important to know. Since I have the control for the installation situation on embedded Devices I know which JRE is installed and can compile my Apps with the right Java version.

The second way of Distribution is jpackage. Since Java 14 it is Part of the JDK. With JPackage you pack a distributable or even an installer with your Application and the needed runtime environment in one executable package. That is bigger than a jar File (mostly 30 to 50 MB more) but it includes the Java environment which you don’t install on the target computer. Weather a jre is installed or not on target computer or not: the application packed with JPackage is using only the one it is bundled with. So you have a rock solid bundle running on all your customers computers of the target platform. With Jpackage you need to pack your application for each target platform. I am doing this Job with Github Actions or even locally (I have a few customer requirements forbidding to use Github Actions cause of security reasons).

The third way is ahead of time compiling with GraalVM Native Image. This is an ahead of time compiling which compiles your Code in a secure und reliable way. There is one central problem doing this. Reflections and other operations which are dynamically generated in runtime. While compiling ahead of time we need to identify this functionalities to generate the dynamic parts also correct. Note that there can be also dynamic code generations which are leading to a partial JVM within the result (not often but it can be). This one would then run in background. You even don’t have to take care of it.

To use it the docs of Liberica are a good starting point while it describes all you need. Especially also the mave and gradle integration and (drum roll) the resources also have to be integrated.

In this document is the “magic” description to use it. Do not forget: when compiling Swing you need also to set the headless option like for AWT and yes, in Swing there is much stuff stolen from Java AWT.

To get the reflections and JNI which are not supported by GraalVM while dynamically generated use the tracing agent to get them out and generate the configuration files for the Compiler, described following the link at the end of the document I linked here:
https://docs.bell-sw.com/liberica-nik/23.1.3b1-21.0.3b10/how-to/using-nik-with-desktop-applications/

As I am using all three variants I have to describe why so people can understand:

simple jar I described. It could also be used for Desktop Apps but your customers would need to take care of the installed JRE/JDK on their client computers.

JPackage is the format I am using the most to distribute Desktop Applications. It comes with a slower startup but runs fast and reliable. For me so there would not be any need for NIK. It is extremely flexible and it is simple to use. You can pack all kinds of Apps starting from a Command Line application you can even use jpackage for Springboot applications, Java-Swing Desktop applications and JavaFX applications.

But I have customers which having strange security requirements. They could be handled with a clean configuration on all systems the Software will be installed. But. The complete compiled Code nobody can see, recompile or manipulate. That is a set of requirements coming up for military use in my case.

The further use is with GLUON Mobile for generating mobile apps for IOS and Android which is running and that’s it. Also the GLUON technology uses this System of GraalVM for compiling it. While IOS does not allow Java at all it is needed in this case. (Only other way for Java / mobile Apps is CodenameOne which is using ParparVM to bring the Java Code to Objective C which compiles directly to IOS Devices).

If there is after the provided lecture any need for explanations I can do that when I have time.

The used IDE: I have used all three ways of distribution ways (jar, jpackage and NIK) with Netbeans IDE, IntelliJIdea and with Eclipse. The examples I will porvide for Swing Apps will be always Netbeans while Netbeans has an integrated Swing Designer which makes it simple to redo that kind of stuffs (like my last description for Emile (JList Example)). But you could also hard code the GUI or even use the JFormdesigner made by Formdev which is avaiblabe as Plugin for IntelliJIdea, Eclipse and Netbeans. While it costs money I am always providing Netbeans. Small tip: if you change later from Netbeans UI Designer to JFormdesigner the JForm Deisgner will simply convert your Designs and you can work with them so it is possible to work with it with IntelliJ or Eclipse.

For JavaFX there is anyhow the Scenebuilder which is for free and works with all three IDE’s without any problem.

I hope I answered the questions you had.

I look forward to an example (even a tiny one just to demo the use of Liberica would be great !)

Beta IDE for beta apps…

They said “a single codebase”, not “a single project file” :wink:.
If you make empty projects for every platform and externalise all in modules/classes, etc., most would be a “single codebase”. Of course, you have to wrap the external items to the GUI…

P.S.: I’m sort of kidding :wink:

1 Like

Imagine if Geoff decided to at least hear out the Pros…

3 Likes

I am sure you and me will walk with a cane before that happens, if it even happens!

I do not understand at these times, that Xojo inc. gets away with such lies.

3 Likes

The shrinking size of the comunity tells that they are NOT getting away with their lies. The time wasted on API2 could be used to make this single codebase a reality but…

3 Likes

They throw out everyone who might challenge their falsehoods
And then accuse those people of lying

2 Likes

We’re all trolls for wanting bugs fixed.

3 Likes

3 Likes

Nobody is a troll here and surely not for reporting bugs or want to help improving a product. The most critical customers are your best customers because their critics prove their involvement in your business. That’s it!

I do not want to de-rail the thread, but can anybody shine their light on PureBasic?

Thank you.
Chris

Norman, you dyed your hair!

2 Likes