Interops?

So this new feature is coming. Anyone know what this will look like, how they will work, and how they will differ from Declares?

Nope. Only what they told us at XDC last week. It will work on MacOS, iOS, and Android. Linux and Windows definitely not at first and maybe not at all. I put my notes from the session at https://www.bkeeneybriefs.com/2018/04/xdc-2018-android-xojo-framework-and-api-2-0-notes/ which isn’t much in the way of details.

Bah, humbug !

So the Linux support should be feasible, if Xojo already supports Android Interops, which was created out of Linux, as far as I know.

Just repeating what they said at XDC.

I know, it was just a thought :slight_smile:

Android uses the Linux Kernel, but all the UI is different.

And remember: who knows when this or that technology will appear ?

In 6 days ? In 6 months ? In 6 years ?

I’ll pick > 6 days and < 6 years. :slight_smile:

If I understood correctly, Interops can be considered as a kind of prefabricated declare that translates directly into Xojo classes and data types.
There was an example visible on one of the tweeted photos:

Dim myURL As New URL("http://www.android.com") Dim myURLConnection As HTTPURLConnection = myURL.OpenConnection
Maybe you’ll have to address the respective framework explicitly or with a “Using” clause. It was so last year when Geoff presented an iOS Interop. This would close the one big gap that exists between Xojo and “native” IDEs like XCode: In the latter, you simply “#Import” a framework and can use all its classes and methods by name. In current Xojo, you have to declare each method and eventually build your custom classes around them. With interops not anymore.

URL would be a class not usually known to Xojo, but taken from Android and translated into a Xojo class without having to define the declare (or the class) via code, imported library or plug-in. This would mean you handle API stuff not usually built into Xojo as if it were so natively.

If I understood the comments about “percent of API mapped” correctly, there is at least one engineer who does all the declare stuff (or verifies that a brilliant algorithm someone invented does the right things), so there will be Android at first, then iOS and then eventually macOS that will be mapped to Xojo. This could mean a lot of work for every OS update when he would have to include the new stuff. I am sure Christian Schmitz can tell stories about …

Windows is definitely another kind of beast. There is no clear OOP structure visible. A lot of stuff has been added using weird constants and wrappers, making the whole structure clumsy to handle at least.

On the other hand, despite the vast variety of Linux distros, GTK/GDK has a very clean OOP structure. I would not be surprised if Linux could be interoped as well sooner or later. And I will state the contrary when more details emerge that convince me of the opposite.

I also saw the Twitter post from the Interop Session. I immediately asked myself whether, with all the convenience that the declaration with the Android-suitable data types and their autoconversion to Xojo data types brings, there is not a danger of losing the overview in the code, if you write more than the standard data types of Xojo into the code, purely superficially? I already have respect for it!

Android’s user-facing frameworks are all Java and have rich metadata available about how to call them. Interoperating with most non-Android Linux frameworks requires parsing C header files where there’s less information about the intent (e.g. is char* a string pointer or just raw data?).

For those who know Titanium, interops would be equivalent to Hyperloop?

Better (?) question: where Interops comes from ?

On Windows I expect that interops could be a great way to move Xojo towards .Net. .Net is mostly OOP and would probably lend itself well to interops. I remember the original VB dot Net creating a bunch of interops when porting a VB6 project to .Net.

edit: I changed VB.Net to VB dot Net because of the unwanted hyperlink…

[quote=385620:@Emile Schwarz]And remember: who knows when this or that technology will appear ?

In 6 days ? In 6 months ? In 6 years ?[/quote]

Xojo no longer provides time periods as of last week. Now things are either Important or a Priority. Interops on Android is a Priority as of now. Not sure about the other targets as there’s no list of what are Important or Priorities.

Hal: next time, simply put links to the report.

Here are no links. That was stated at XDC.

Thank you.

They said at XDC that Android ist first for InterOPs, followed by Mac & iOS.
Windows and Linux are later.