Not sure how I feel about this

Some of my comments on SwiftUI (and even Xojo) have ended up on Michael’s site.

https://mjtsai.com/blog/2024/03/11/mac-dialog-in-auto-layout-vs-swiftui/

I feel honored, but also sad at the same time. I still love SwiftUI, but some situations really feel like Xojo all over again. At least… There are still tangible benefits to migrating to SwiftUI.

SwiftUI should work for must line-of-business apps. It still has features missing that can be found in UIKit but the elements of latter can be integrated in SwiftUI views.

At least devs have a choice: use SwiftUI or UIKit as a foundation, and these are completely different animals.

If someone wants to learn coding for Apple devices, I would recommend SwiftUI.
And yes, compared to Xojo’s clunky way of interface design and control, SwiftUI is a marvel.

Every year Swift and SwiftUI get significant improvements, there is a vibrant community and there is evolution.

Choosing between SwiftUI and UIKit is a matter of preference and, of course, requirements of the app to build.

Apple’s own SwiftUI tutorials don’t get updated in order to reflect the latest version of SwiftUI. That’s not great and being confronted with different versions is very confusing for beginners.
There are excellent tutorials from independent developers available. Just make sure to take those that are duly updated to the latest version of SwiftUI.

no dev tool is perfect…
the goal of a dev is to choose the right tool for the incoming project
the one that will lead to the lowest time-to-market
so you have to explore many tools, first to choose the one you prefer
and second to be able to come back to another tool if needed.

for me xojo is not perfect, lots of things can be made better
but it is my goto choice as other tools lack mainly giving me multi platform headache.
this is my opinion, and I know that others will not have the same, and I respect that.

2 Likes

Let me say it so. I rebuilded this layout implementation now with Java Swing on Netbeans which costet me 2 minutes. And I have done it with the Scenebuilder as fxml layout with JavaFX which costet me also around 2 minutes (actualy Swing was 1:48 and JavaFX with Scenebuilder was 2;17). That shows that Java let you do stuffs like that much faster. Swift should learn from it.

Basic layout is easy on any tool, but I doubt Java automatically handles all the constraints in this given task as default behaviour.

My main gripe has been the absolute garbage text editing on macOS. Not just missing features, but the bugs are astounding, and the situation I found myself in t’other day was using a workaround for one such bug was creating another bug that then needed a workaround.

SwiftUI’s List control is exceptional, you tell it you want to allow the customer to rearrange or delete items from the list, and it handles all the rest behind the scenes.

But, on the Mac, the TextField is broken in many situations, which prevents the customer from editing text, only appending to it. So I’d replaced the SwiftUI TextField with a wrapped NSTextField.
But now rearranging the list breaks the binding, so when someone tries to edit an item that’s changed location, it updates the item at the old location instead.

This is clearly the same problem as Xojo in that Apple doesn’t use it and haven’t discovered this problem (or they have, but politics).

Thankfully there’s a vast number of people using SwiftUI and I was able to find someone who demo’d how to create a custom binding in a way that solves this problem.

Maddening.

1 Like

I doubt you have any, really any Idea about the available layout managers for Java Swing and the possibel Layout control in Javafx. That is really no, really no propblem. I realize that you say dsomething because you do not know. Sad.

I just feel it’s unlikely that default resize constraints would work exactly like the required task constraints. Why should cross platform UI even default to Apple GUI guidelines or some custom ones?

1 Like

Not my probklem what you think, believe, mean or believe that you know better. Take flatlaf for example. Then set the defaults correct and go for it.

That’s not what I said. I said: Java is able and Swift UI should adopt a few features. Nut use Java. Java is not a way for native Software as far as you also should know. That was the discussion about the missed ability of Swift UI and not about using Java. You always try to implement something. Leave it alone. People like you are not reaching out to me.

1 Like

That was a shameful personal attach, which cannot be tolerated. We are all here to help and listen to each other.

Despite I do not program in Java, I find your posts interesting. I can see the enthousiasm for Java in your postings and that is fine.

Maybe something to think about; creating a step by step tutorial of how to program in Java for beginners? I am sure there will be a lot of interest in this forum.

Please, don’t waste your time on such small people, they are not worth it!

Chris

1 Like

There are tutorials for beginners already in this forum

1 Like