What does API2 fix? Was API1 broken?

Continuing the discussion from API1, API2 & Xojo.Core Question:

I didn’t really want to derail that topic, and I didn’t really want to start another one either where the same things would be re-hashed. But I have and so here goes:

Being very new to Xojo, I’m still trying to get my head around the different syntax, coding format/style/IDE, and now obviously the whole API 1 v 2 situation.

Is this at all equatable to the change of paradigm that Python experienced between version 2 and 3 where statements became functions, return types went from being lists to iterables and iterables became “the norm”? I resisted Python3 for quite a while and I don’t think I could go back to 2 now.

Python, v3 was used to clean out the hacks of previously cobbled together code that had been adapted to work with old paradigms a decade or more old, and give it a clean slate to work with.

I have grown quite accustomed to how even strings are iterable, and the cleanliness of the for...loops (where EVERYTHING is iterable). I’m hoping that API2 is somewhat doing the same sort of housekeeping. Making Xojo more resilient for the future. Is that what API2 is about?

From what I am seeing, the more annoying thing at the moment (as pointed out by norm) is the fact that examples around the web are (or will be) broken, and things like event name changes… I would like to understand the philosophy behind why click had to become action and Opened to Open et al (or whichever way they went).

I realise there’s going to be a lot of resistance for broken backwards compatibility, but is this a necessary evil? and is this evil being used to its best advantage?

What have been the real driving forces behind API2 and should the community be on board with them more? At any rate, is there any point to resist something that’s not open source and community driven?

In a year or five, will anyone long for the days of API1?

I’m just curious and really open to hear what people love about either API.

I hope there’s more of a complaint with API2 than it’s just breaking backwards compatibility. For example, the simple change of a method name (IMO) isn’t the be-all-and-end-all, it doesn’t break it so much so that a regex couldn’t fix it, but I am against the renaming if in the same process it’s going to reduce readability, which in some cases, it certainly has.

The only thing I can think of here is the .Action. To me, Click(ed), Open(ed), Press(ed)etc are much clearer thanAction`, what is the “Action”? What value is returned, etc. I discussed elsewhere that an action on one object returned a boolean as opposed to a string elsewhere and there’s probably examples of it returning something else somewhere else. In my opinion, that’s bad and lacks readability, but I also do think that’s relatively minor.

Anyway, over to you guys, what do you love about API1 or API2? (and I really would much prefer to hear what people like as opposed to not like)

I thought I would add, when I first started with Xojo, I had read:

but TBH, most of it was lost on me since I had come from the python world and simply thought, “makes sense”, revisiting those pages now do make me feel like it IS very much like what Python went through, and I suppose my only real comment is that it is more inevitable and welcome.

However, instead of making some changes now in 2019, and more in 2020 and even more later in 2020R2 (or whatever), they should have gone the Python route and kept with API1 in 2019Rx and keep it’s development active and developed 2020 purely API2 in its completeness. for example,

is a mistake in my opinion since I feel bringing that in later WILL break code.

If anything should be iterable, it’s a list! :slight_smile:

Ask Geoff on the other forum what API2 was meant to add and what it add to date.

Nota:
I never saw Python, so all you said about it means nothing to me.

That said, if you came to Xojo after API2, forget your questions (they are useless for you *) and go ahead.

  • For me API2 is a waste of time: both Xojo and mine; because it is (now) mostly a rename of API1 (so few of Xojo was rewritten).

For me, API2 means learn a new development language: I have to re-learn nearly everything just like if I changed to use Python.

For any newcomer, it is different because they already have to do that: learn API2 will take the same amount of time

No API1 was not broken.

API2 was said to new, but only somethings have been modified, most of API2 was just new words (a new “clickable table of contents” that fire the same code.

InStr = IndexAt
Give me where the seach string start in the searchable string (or return 0).

Read the roadmap and understand by yourself.

;

;

1 Like

The following of course are MY opinions, many of which I have posted many times before

This is a BIG DEAL… not so much for new users, creating new projects, but more so for the established developers needing to not only support and bring forward existing projects, but also for those developers who need to maintain older code.

Xojo managment thinking that making unnecessary changes, makes it look like they are moving the product forward during a time when they don’t have a clue what should be going on

No, because all of us who do/did, will have moved on to other toolsets

Thats the thing, in some cases RegEx CAN’T fix it, some changes are not a matter of search/replace

VISTA caused me to abandon Windows, and it looks like API2 (and Xojos current attitude towards its existing customers) will cause the same.

2 Likes

NO

Not really

Absolutly not

At a glance, the idea of one man thinking that renaming keywors with “modern” ones will make the languaje more popular

Considering past history, maybe in 5 years API2 it is going to be deprecated in favor of the brand new “better” idea of the moment.

Not to mention that in 5 years, looks like microsoft MAUI and Flutter from Google will be real multiplatform tools with single codebase. I really liked Xojo, but as many others have said, maybe it is time to learn those instead of relearning a language that each passing day is more outdated.

For me, looks like a waste of company resources changing the languaje instead of fixing bugs or implement new basic functionality.

And a lot of wasted time for user that have to relearn the language and throw away years or even DECADES of experience using some keywords like MsgBox just because someone thinks it is prettier if you use MessageBox :roll_eyes:

2 Likes

Hi Dave,

This has been a long-discussion that has resulted in often-heated discussions.

I can only say how it affects me. I have written numerous books, provided an incredible number of examples (as other contributors have), which has taken me about 10 years to create. Changing from API1 to API2 has caused a large delay in creating new content for Xojo. Lets say that it will take 4-5 years to update all of my books, examples, code, screen grabs, and verifying that all of this works from API1 to API2. This means that any new content that will help programmers will be delayed until 4-5 years. This is sad for the community as other advanced-programming contributors have went to other programming languages because of this change.

If the Xojo community were as large as C#, C++, or Python, then this may not be as big of an issue, as there are other programmers which can roll-up-their-sleeves and help or takeover projects. For now, new topics such as Advanced Canvas Drawing, new Databases, TCP/IP, Virtual Reality, Vulkan libraries, Direct X, plugins, Microcontrollers, Component Object Model, and many other helpful topics, will be delayed.

There are many programs that I have created which will not be updated in Xojo, as programming languages that have a large programming base and more-mature language for Windows and Raspberry Pi are available. An example is that I can create a non-optimized canvas example C#, Python, C++, C, or Java for Windows/Raspberry Pi and the program is always significantly faster than Xojo, where Xojo is typically 2-100 times slower at drawing.

I am not privy to what has actually changed under-the-hood of Xojo, and I can only mention how it has effected me and my projects. I want to see Xojo succeed, however this appears to have delayed my work and made much of the previous Xojo-Real Studio-RealBasic code more complicated/error-prone to new programmers, as I continuously get questions from new-to-advanced programmers to help with code updates to API2. It has typically taken at least 1-year for the Xojo language to remove bugs after an items first-release to be kind-of-stable. Again, further delays.

Yes, I want Xojo to succeed. However, five years in computer language delays and data is a very long time. C# is making large changes in being more compatible than Java, and with the funding that these two large corporations have and the languages are free, I am wondering how Xojo will compete in the future? The answer may be ‘lets wait and see’.

1 Like

IMO if they had concentrated on things that really mattered and threw a bit more resources at actually fixing the pain points, and providing more of the functionality that is expected in a modern RAD environment (so Xojo’s capabilities compared more favorably to single platform tools- even though they would not match them) , I think they could have been in a good position to expand the X-Platform coding market and REALLY take off…

But I think they squandered those years on misguided priorities and now potentially more capable competition is emerging in the X-Platform market.

I too want Xojo to succeed… but the company’s decisions for a good number of years now, have really cooled my enthusiasm about the product.

At this point I will still use it, but my livelihood does not depend on it…

I may be retired relatively soon (involuntarily). At one time I wondered, despite not having an IT background, as I’ve used Xojo for over 19 years now, if I might find a way to make some needed extra money during my retirement using it, while doing something interesting…

But knowing only Xojo (API 1 at that), having a mental block against C type syntax, and given how little Xojo has kept up with modern expectations, I don’t see that as a realistic possibility any more.

Does Walmart still have greeters? :wink:

  • Karen
3 Likes

This.

3 Likes

x2, complete waste of resources, I am trying B4X and its ok, except for only being windows.
sad to be leaving Xojo when my licence expires.

1 Like

Have to admit that I hear this quite frequently lately

2 Likes

that makes me sad, what a waste.

1 Like

I can only speak from my experiences, as a user since 1997 (could be 1998).

I run two different versions of Xojo, I’m using 2019r3.2 for new projects, while keeping 2018r for existing projects (the change to the macOS SDK caused some of my more complex CI code to fail, and I haven’t yet debugged it).

I can’t use API 2.0 for components that are shared between these versions, as API 2.0 won’t work on 2018r3.

If I start a project in 2019r3.2 API 1.0 won’t auto complete, this is a HUGE drag as it slows down development and makes me question if I am writing the code correctly. I write each component in a separate project, until it’s ready to integrate into the main project.

I have attempted to use API 2.0 for some parts, but the name changes are not always logical, which means I have to have the language ref open and to validate that what I am using is going to do what I want.

In some places, parameters are now labelled as Value, which is far too generic IMHO. In some places where the parameter was already labelled Value, it’s now something completely different, thus creating inconsistency and again wasted time.

What’s worse is that I have inadvertently started to mix the two and my brain doesn’t see a problem, but the compiler does. mixing recordSet and rowSet for instance. Again this causes wasted time.

Meanwhile things that I needed or wanted in the last 14 months have been completely ignored, and I’m not even talking huge changes.

Now my license has expired; I’m in no rush to renew, as I am left feeling like Xojo doesn’t value me as a customer, which given my length of time using their tool, stings.

I’ve considered moving on, but for me I feel it’s kinda stupid to change languages to avoid changing languages. I’m not saying that it’s stupid for everyone, just for me.

I do hope that Xojo as a company can learn from this and find a way to create a mutually beneficial relationship with it’s more experience users, thus winning the hears and minds of these users as they feel that Xojo cares, and in return the Xojo tool gets improved. These happy enthusiasts will aid in the promotion of the Xojo development environment, instead of walking away angry.

1 Like

Add me to that.

On the other hand, like wrote someone above, who knows when another new large change will happen…

When trust is lost …

1 Like

While I understand where you are coming from … to me there was this to consider as well, based on the events of the past two years, do you really expect the COMPANY and its management to change? It might be possible that all you would be doing is delaying the inevitable (that of course is for you to decide).

It does seem that the more experienced a software developer you are the less Xojo seems to want you around. Its almost as if they feel they can horn-swoggle newbies, but fear the rest of us might see “the man behind the curtain” for what he really is

3 Likes

It Is… until you see that a change for functionality is better than a change for “aestetics” and that one change could save you from future ones depending on the mood of a single person…

1 Like

IF API 2 “fixed” a pile of bugs in the language and added some new capabilities (generics etc) then maybe it would make sense

It doesn’t though and causes many existing projects issues. Whether that is new bugs in the API 2 replacement functions & classes or just in a pile of work reminiscent of Y2K’s “rewrite everything to get what you already had”.

And no new functionality. It just renames existing things.
Some day in the future it may add being able to cut & paste code from desktop to web to ios and Android & Console

To me it seems a very low payback for the harm
xDev has many years of code & examples etc that now dont work or will confuse readers since it uses API 1
What few training sites there were, BKeeney’s, has shuttered because recreating all those many hours of video simply would never have had a payback.
Any examples any of us has posted in the forums, on our web sites, etc now needs revamps.
Any Github projects are now “out of date”

I’m sure the expectation is that all this will be recreated but the people you see leaving or just plain not participating are all these people who have been around a long time and HAVE created all these additional resources that Xojo indirectly relies on to attract and educate new users on their forums etc

Seems to be to be the very definition of “cutting your nose off to spite the face

4 Likes

More like ‘New Coke’…

The big difference was the Coke was smart enough and not so arrogant to finally realize the error of the ways … Something I doubt Xojo is capable of doint.

mmmm, new coke, lets just say that’s API2.

lets say Xojo did no taste tests at all and they ignored all the tests people who were doing tests as part of the development in order to produce this wonderful new version.

the product was then released to beta testers, the beta testers all threw up at the first mouthful.

Xojo provided extra sick bags to counteract the initial problem as it was obvious the testers had allergies which required more sanitary disposal which would eventually lead to not using sick bags.

eventually the testers who were sick of this shit decided to stop testing it, and hey presto there was no more need of sick bags.
‘wow’ declared Xojo we have a great beta test as no one is sick of it…

make the rest up your self.

no its not a joke, but it is a funny way to run a business.

2 Likes

TRUMP : If we stop testing people for Covid, we will have less cases… So stop the testing!

Same logic (or lack thereof)… Just because you didn’t test doesn’t mean the problems (virus) doesn’t exist… it just means you don’t know where it is to fix it.

2 Likes