XDC 2018: Android, Xojo Framework, and API 2.0 Notes

Travis Hill from Xojo talked about the progress on Android, Interops, and the Xojo Framework and API 2.0.

Interops is being used to build the Android framework.

Interops:

  • Need something from the OS
  • Use instead of declares
  • Ready to use with Xojo types.  No need to worry about type conversion.
  • Android will be the first platform primarily built with Interops.
  • Not a separate project in another language.  Built with Xojo.
  • Anything Xojo is doing, we’ll be able to do as well.

Mapping the Android SDK into Interops.  In 2016  they had completed less than 25% of the Android SDK.  In 2017, it was about 65% and in 2018 they have considerably more than 75% but certainly not complete.

Using Interops is totally optional – like declares.  Good way to think of them is that they’re pre-existing declares.

Android is being developed using Strings and Variants and using the global framework.

Major Project Milestones:

  • 32-bit and 64-bit ARM – done
  • Linker – done
  • Position Independent Executables (PIE) is still a work in progress.
    • Can execute from any address
    • Required for Android
    • Supported on other platforms
    • Will be moving this feature to other platforms
  • Compiler
    • Native code
    • Virtual code
    • Bytecode
    • Android built with virtual code in mind
    • Building a two-way bridge between Native and Virtual
    • Mirror classes with native and virtual will be transparent to developers
  • IDE Integration:  Typically one of the last steps
    • Graphics
    • Layout editors
    • platform particulars
    • baseline project
    • Autocomplete
    • Build Settings

Requirements:

  • Mac/Windows 64-bit
  • Linux has issues so it remains to be seen if Linux will be able to do it.
  • Android Studio provides the emulator and debug tools
  • Apps use Android 8.1 (Oreo) SDK
  • Targets Android 4.4+.  Trying to hit the 80% mark

Travis showed a demo with three controls:  TextField, Button, and HTMLViewer.  Doesn’t seem like much, but is a huge amount of progress.

New Xojo Framework

The Xojo framework is dead.  Ends the split personality.  No more Xojo namespaces and no more ‘wall of code’.  Unified Language Reference (brought applause from the crowd).

API 2.0 is NOT a new framework – it’s adding to the existing one that’s been around since the beginning.  Can be added to over time with little disruption.  No requirements for everything to be present.  De-empasize/Deprecate old ones over time.

Naming Example:

Add(“Hello”)

AddAt(5, “Hello”)

Count

Remove(“Hello”)

RemoveAt(5)

New names allow for behavior updates.

Exceptions on Errors

Always 0-based offset

Easy transition

Namespaced types (Text and Auto) will be deprecated.

Classic types will get some enhancements from the Xojo framework.

String going forward.  Text will be de-emphasized and then deprecated. 

Coming to String:  ToString/FromString.

Optional Locale support.

Better default encodings from outside sources (web, databases).

Variant going forward.  Auto to be deprecated.

Implementation may change.

Date going forward.

Timezone handling and math.

Android will ship with String/Variant types.  Ship with API 2.0.

iOS adding string and variant and API 2.0 naming.

Desktop adding API 2.0.  Deprecating Xojo framework.

Web adding hybrid approach.  Will use existing web framework but API 2.0 as well.

Overall Goals of API 2.0

  • No namespaces (though we can still use namespaces)
  • All platforms consistent
  • Learn one, learn all
  • Clear naming
  • Clear documentation

I will give Xojo some credit for admitting that the Xojo framework did not accomplish what they had hoped for.  It’s clear that Text and Auto were not well received by the community despite the things they solved.  In talking with one of the engineers at lunch they will be bringing some of the good ideas from Text into String and Auto in Variant.

The downside to this change is that those developers that have spent considerable time and effort learning and implementing the Xojo framework have to convert it to API 2.0.  The plus side is that the new approach is less intrusive and more likely to be adopted by the community.

8 thoughts on “XDC 2018: Android, Xojo Framework, and API 2.0 Notes

  1. I hope we can make computer property called Text again !! It has really annoyed me that I cannot make property called Text. Even if they promised back then that we would be able to then the IDE refuses it.

  2. I’m glad that they are abandoning the Xojo farmework, bit, while I know SOME of the work will be reused, it’s safe they wasted so much time ob it and the IDE…

    These last several years i was getting disillusioned with the product because of that.

    Also as I don’t do iOS,there was not much that i felt made the product better for my uses.

    – karen

    • I always understood the reasons for Text and Auto – I just could never find much enthusiasm for them. Certainly part of it is the amount of time I’ve spent with the global framework and the pain integrating the Xojo framework with it.

      As many of us at XDC said this week, we’re glad we were dragging our feet in converting over to the Xojo framework. The other comment most heard was, “At least they admitted it didn’t turn out like they wanted” and decided to deprecate it rather than double down on it.

  3. As someone who started using Xojo relatively recently, and went straight for Text/Auto/all that business… at least someone’s happy about this.

    • I gave the advice to a number of developers that if starting a new project it made sense to use the Xojo Framework whenever possible. For those that have been a round a while and have years worth of work in the old framework it was going to be a long slow (painful) transition. We *did* attempt to use Xojo Framework in some projects but we kept running into edge cases that made it difficult (and painful) to use. And ‘difficult/painful’ and ‘consulting’ don’t go well together so we went back to our tried and true methods.

      So, happy? Not really. Relieved is more like it.

Comments are closed.