Azzera filtri
Azzera filtri

Which MATLAB GUI framework to use?

42 visualizzazioni (ultimi 30 giorni)
Otis
Otis il 25 Lug 2022
Commentato: Walter Roberson il 26 Lug 2022
I posted a “how should I go forward” question on the discussion tab for the GUI Layout Toolbox. It was suggested that I post the question here. I posted the question on the GUI Layout Toolbox page because I literally just discovered the toolbox. I came across it a couple weeks ago while researching issues for a new Matlab UI project that I am starting. I also learned that Matlab is moving its GUI framework from Java based to an HTML5-class-base framework. After playing around with some of the examples, I found that I like the GUI Layout Toolbox. The potential downside is that the GUI Layout Toolbox is based on the Java framework. It’s a downside if Matlab is moving away from the Java based framework and will no longer support it. The new UI project is one that should be around for quite a few years. I’d hate to start it with the current framework only to have to recast everything in a couple years. So my question boils down to would it be prudent to start this new project with the new GUI framework? I know this is one of those hard to answer, “it depends” questions. I’m just hoping for some guidance from folks who are more familiar with how Matlab is moving forward with this framework change.
Thanks times a gazillion,
Bill

Risposta accettata

per isakson
per isakson il 26 Lug 2022
Modificato: per isakson il 26 Lug 2022
Caveats:
  • I have not used the new GUI framework in any serious way
  • Yes “it depends”. This answer suggests how I would approach a project like "[your] new UI project".
Steps:
  • Decide to use a variant of the Model-View-Controller pattern, with a very thin GUI (see Passive View).
  • Find out whether the new framework provides the features needed. First decide on the interfaces between the components and then develop and test the GUI of my app. The point is that all (relevant) limitations of the new framework shall surface. In the tests the GUI is activated by user interaction and communication with fakes (mocks/stubs/test code/test double). Thus I don't need to think about the implementation of the rest of the app. The tests shall show whether I can proceed with the new framework.
In a recent Matlab newletter there is an article on MVC: Developing MATLAB Apps Using the Model-View-Controller Pattern. It comes with a worked example: Develop MATLAB Model-View-Controller Apps
And more links:
  1 Commento
Otis
Otis il 26 Lug 2022
Thanks for this response. The "Steps" you've laid out are pretty much what we're going to have to do. I also appreciate the links. I will definitely check them out. I'm fortunate in that the team, albeit small, working on this project has experience in GUI development. That means that we'll be in a mode of "how to do this with Matlab" versus "how to do this".
Thanks so much,
Bill

Accedi per commentare.

Più risposte (1)

Walter Roberson
Walter Roberson il 25 Lug 2022
Are you prepared to pay the Oracle per-desktop license fee to run your Java-based code? Because the only update that Java used by MATLAB is getting is the security updates to the last free version, which Oracle has not committed to keep creating security updates for.
  5 Commenti
Otis
Otis il 26 Lug 2022
Matlab isn't free, so I'm not sure cost is a factor in the decision. At least not directly. However, if Mathworks is moving away from the Java based GUI framework because of a potential increase in cost to itself and its customers, then that is a factor. Especially if they stop any support of that Java based GUI framework. And that's what I'm trying to get a feel for. Because that suggests going forward with the new framework.
Thanks,
Bill
Walter Roberson
Walter Roberson il 26 Lug 2022
I believe they are trying to rewrite all of their GUIs to not use Java.
I haven't heard anything yet about how they might rewrite aspects such as gunzip or how they communicate with parallel processes.
My speculation is that Java will not be removed from MATLAB within the next 5 years, in the sense that it will likely still be possible to directly call java -- but within 5 years they might have finished removing any dependency on Java in their own code.

Accedi per commentare.

Categorie

Scopri di più su Platform and License in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by