28th. Dec 21 - Extension Builder Bashing
Posted: Tue Dec 28, 2021 7:00 am
Christmas time is over, full of food and with my new friend, the Mandalorian Child (my better half really made me happy with it), I analyzed the Extension Builder.
And actually I never wanted to give a wall of text here, but in this case I can't help it.
After taking a closer look at it, I wonder if it was the right decision to choose this element to revise and adapt to oXT.
It's unbelievable what we have tried to create extensions with all these years and it doesn't surprise me at all that almost everyone who has dealt with widgets/extensions and the LCB syntax have thrown the towel sooner or later.
My first impression: It is and remains simply an unfinished product.
I think that we could never fully exploit the possibilities of the extensions because it was simply not finished.
As Marvin said in the Hitchhikers Guide: "I talk to the Engines... they don`t like me". So now I have a project name for the whole thing - "Marvin".
The deeper I get into it, the more I am glad that I decided not to buy a license of the latest LC version.
If the builder looks like this, how does the rest of the libraries and tools look like?
To understand the whole thing you have to look at the whole construct of the Extension Builder.
Let's start with the "GUI", or to stay in slang, the stack.
On the top right we find in the header the points "Edit" to edit the LCB-file in an external(!) editor, to open a LCB-file and the Preferences-cog. In the Preferences you should see the installed and active Extensions... which, as expected, is not the case...
The name of the extension is packed into a label of an opaque button, which overlays another button, in which extensions in the development environment of the creator are referenced, which are not accessible for us... for whatever reason...
The Icons. Let's be honest: who makes the effort to create icons in PNG format, when you can display them as SVG icons via the LCB file? And if someone uses this format, why didn't the creator hide the ugly frames of the IMAGE elements?
By the way, I generally recommend to use only SVG icons and to store them as path in the LCB.
The field "Resources". Have you wondered why nothing is ever displayed there? It's quite easy to explain. This is a display field for the content of the directory "resources" which is never created. Unless you create it manually.
By the way, originally the PNG icons of the extension should be there, but they have to be put into the folder "support", so that the builder or later the IDE can access them at all. This field is in my eyes therefore superfluous and serves finally only information what this directory contains... if it was created and contains something...
Defaultscript... also such a field where nothing is displayed. This is actually not true. Something is displayed. As soon as you press the button "Edit" below this field, the folder "Support" is created and a "defaultscript.livecodescript" is stored in it. And only if you write something in this defaultscript and save it, the content of the script is shown in the field "defaultscript". In a very small field... about 200*52 px... under Windows with Helvetica with 12px font size...
Do you already have a defaultscript in the directory "Support" and it is still not displayed? Then press the edit button once, the script will open in the LC-Editor and will be shown in the builder field.
And you can't edit in the small field either. A simple "defaulscript available" or a separate tab in the header would have been sufficient at this point.
The point API: if you open a LCB in the builder it will always say YES... the API is created automatically. Which is a good thing.
But what concerns the User Guide. This point should inform you if there is a userguide.md in the LCB directory.
In the time I have been working with widgets and the builder, i have never seen a *.MD file.
Here the question to the MAC and Linux users: Do you need the format for your OS? At least on Windows I don't need it, because the documtation of the command structure is loaded into the dictionary with the API.
What I would rather see than *.MD would be a license-information-file. so a license.md
What I am excited about is the "Console" field.
This is ideal for debugging and for me, besides the LCE packaging, the only reason why the Builder can call itself Builder and not Extension-Tester. Here I have nothing to complain about.
I don't talk about the footer now, because it contains the essential functions that you really need for testing, packaging and installing the widget / extension.
This could have been solved more nicely, but that would be only a design question again...
As for the scripting of it all. There are only two positions with three lines of code each where the stack itself is scripted. The EDIT button for the defaultscript and the retrieval of the Extension-Name in the opaque button....
Everything else is described in the separate behavior script.
This takes care of the positioning of the objects in the stack and some functions of the extension builder. But only a few, because the Behaviorscript accesses a Library-Script to get more functions, which in turn accesses another library script to pass its functions to the stack behavior script so that the stack can be used. Apart from that, there are functions stored in the libraries for the Extension Builder that are not used.
The whole thing is so nested that it is not nice anymore. If you make a careless change in the wrong place, the whole construct does not work, or if you are unlucky the whole IDE does not work anymore.
At the moment I also ask myself if it makes sense to rework the Extension Builder or if it is better to rewrite it completely, including parts of the library scripts. Also whether one should not throw it from the IDE and offer as an optional PlugIn, should be discussed.
Have a nice time
Andreas
And actually I never wanted to give a wall of text here, but in this case I can't help it.
After taking a closer look at it, I wonder if it was the right decision to choose this element to revise and adapt to oXT.
It's unbelievable what we have tried to create extensions with all these years and it doesn't surprise me at all that almost everyone who has dealt with widgets/extensions and the LCB syntax have thrown the towel sooner or later.
My first impression: It is and remains simply an unfinished product.
I think that we could never fully exploit the possibilities of the extensions because it was simply not finished.
As Marvin said in the Hitchhikers Guide: "I talk to the Engines... they don`t like me". So now I have a project name for the whole thing - "Marvin".
The deeper I get into it, the more I am glad that I decided not to buy a license of the latest LC version.
If the builder looks like this, how does the rest of the libraries and tools look like?
To understand the whole thing you have to look at the whole construct of the Extension Builder.
Let's start with the "GUI", or to stay in slang, the stack.
On the top right we find in the header the points "Edit" to edit the LCB-file in an external(!) editor, to open a LCB-file and the Preferences-cog. In the Preferences you should see the installed and active Extensions... which, as expected, is not the case...
The name of the extension is packed into a label of an opaque button, which overlays another button, in which extensions in the development environment of the creator are referenced, which are not accessible for us... for whatever reason...
The Icons. Let's be honest: who makes the effort to create icons in PNG format, when you can display them as SVG icons via the LCB file? And if someone uses this format, why didn't the creator hide the ugly frames of the IMAGE elements?
By the way, I generally recommend to use only SVG icons and to store them as path in the LCB.
The field "Resources". Have you wondered why nothing is ever displayed there? It's quite easy to explain. This is a display field for the content of the directory "resources" which is never created. Unless you create it manually.
By the way, originally the PNG icons of the extension should be there, but they have to be put into the folder "support", so that the builder or later the IDE can access them at all. This field is in my eyes therefore superfluous and serves finally only information what this directory contains... if it was created and contains something...
Defaultscript... also such a field where nothing is displayed. This is actually not true. Something is displayed. As soon as you press the button "Edit" below this field, the folder "Support" is created and a "defaultscript.livecodescript" is stored in it. And only if you write something in this defaultscript and save it, the content of the script is shown in the field "defaultscript". In a very small field... about 200*52 px... under Windows with Helvetica with 12px font size...
Do you already have a defaultscript in the directory "Support" and it is still not displayed? Then press the edit button once, the script will open in the LC-Editor and will be shown in the builder field.
And you can't edit in the small field either. A simple "defaulscript available" or a separate tab in the header would have been sufficient at this point.
The point API: if you open a LCB in the builder it will always say YES... the API is created automatically. Which is a good thing.
But what concerns the User Guide. This point should inform you if there is a userguide.md in the LCB directory.
In the time I have been working with widgets and the builder, i have never seen a *.MD file.
Here the question to the MAC and Linux users: Do you need the format for your OS? At least on Windows I don't need it, because the documtation of the command structure is loaded into the dictionary with the API.
What I would rather see than *.MD would be a license-information-file. so a license.md
What I am excited about is the "Console" field.
This is ideal for debugging and for me, besides the LCE packaging, the only reason why the Builder can call itself Builder and not Extension-Tester. Here I have nothing to complain about.
I don't talk about the footer now, because it contains the essential functions that you really need for testing, packaging and installing the widget / extension.
This could have been solved more nicely, but that would be only a design question again...
As for the scripting of it all. There are only two positions with three lines of code each where the stack itself is scripted. The EDIT button for the defaultscript and the retrieval of the Extension-Name in the opaque button....
Everything else is described in the separate behavior script.
This takes care of the positioning of the objects in the stack and some functions of the extension builder. But only a few, because the Behaviorscript accesses a Library-Script to get more functions, which in turn accesses another library script to pass its functions to the stack behavior script so that the stack can be used. Apart from that, there are functions stored in the libraries for the Extension Builder that are not used.
The whole thing is so nested that it is not nice anymore. If you make a careless change in the wrong place, the whole construct does not work, or if you are unlucky the whole IDE does not work anymore.
At the moment I also ask myself if it makes sense to rework the Extension Builder or if it is better to rewrite it completely, including parts of the library scripts. Also whether one should not throw it from the IDE and offer as an optional PlugIn, should be discussed.
Have a nice time
Andreas