Solved

Creating custom widgets

  • 21 February 2024
  • 2 replies
  • 36 views

Userlevel 5
Badge +7

Hi community,

 

With earlier versions of the webUI, I have played around with creating my own custom widgets (e.g. sankey diagrams using D3) for AIMMS. 

If I now go to the documentatation page about custom widgets (https://documentation.aimms.com/webui/own-widgets.html) I see that currently this framework is deprecated and should not be used until the new framework is made available.

 

Is there anything known about when this new framework will be made available and I could give the custom widgets another try?

 

icon

Best answer by Edo Nijmeijer 22 February 2024, 08:42

View original

2 replies

Userlevel 4
Badge +4

I don’t think I have an easy answer for this. The short answer has to be that the creation of a real, workable and, most of all, shareable public framework has never made it to onto the list of top-priorities for the WebUI team. And that there is no time-frame within which we would be returning to working on it, as I can foresee it now.

Which is a shame, but as you can see from the documentation we wrote for the ‘old’ one, there is quite a bit involved in opening up all aspects of widgets. Even writing it down is a major task. A public framework like this needs to be complete and documented in order to be useful.

You’re probably just as aware as I am that this deprecation has been standing for quite some time. The ‘new’ framework we use for our own development activities still borrows several aspects from the old one, while at the same time using new features that are not directly set up to be accessible from outside these ‘internals’. So yes, we’re using React components and tons of refactored code, but especially this modern code does not expose anything to the ‘globals’ (AWF.*) that the old framework depends on that heavily.

Deprecation of course means that you can still use the documented way of adding custom widgets. However the team is unlikely to work on fixing any of the problems that might arise from it. There should be little to none for widgets with simple options though.

But whatever the complexity, we might need to phase out support altogether if that is needed. In fact, full removal of the old framework is also a current impossibility for us, because we also still need to support some regular widgets and features that at least depend on it for parts of them.

Instead of custom widgets, the team is focusing much more on creating ‘regular’ widgets and features for which we see a lot of value and demand in the market. So this is why over the years we worked on grid layout, new charts (that do no include Sankey diagrams, I know), theming, Widget Named Views and currently the brand new Diagram/Whiteboard widget. All to try and remove the ‘custom’ aspects from customer’s applications. Which are always a risk to support for anyone.

So although I hope this doesn’t fully discourage you to work on custom widgets, using the ‘deprecated way’, I also hope you see how the availability and documentation of a new framework might not exactly be around the corner.

If you have feature requests, make sure to voice them to us, here in the Community, User Support or anywhere else you encounter us :-)

Userlevel 5
Badge +7

Thanks for you answer Edo.

 

Unfortunately, not really the answer I was hoping for though 😉

I do understand the need for having everything fully documented if you want to provide a way for users/developers to create custom widgets and that is quite a large task.

From the old winui days, I remember that whenever we wanted to achieve something for which there did not  exist a widget, we had to become very ‘creative’ with how we would use widgets that were available. I do remember really ‘abusing’ the network object in the winui in very creative ways to achieve certain goals. It did work, but it was not really the way the network object was intended to be used and always came with certain caveats.

The problem with the winUI though was that it was impossible to have a regular aimms user add new activex components or other stuff. With the webui my hope really was that this flexibility would be available (and it was with the previous framework/documentation that is now deprecated).

With such a supported framework in place, AIMMS could provide a set of well designed, thoroughly tested widgets to be used by people in all projects, while it would still allow the flexibility for developers to create completely custom widgets/visualizations for edge cases that will never make it to the backlog of the aimms widgets.

The examples could be the earlier mentioned sankey diagram, but also the (agree, just a tiny bit more complicated… 😉) chord diagram, which sometimes can be useful in e.g. the telco industry to display the transitions between either providers, or how customers move between the different plans.

Please note that it is not that I am asking now for these two diagrams to be added to the backlog of widgets, they just are examples of visualizations that might be useful for some industries/problems but probably would not end up in the list of widgets created by aimms because they are not generically applicable enough.

 

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator