Dataflow in App Designer

조회 수: 3 (최근 30일)
fburton
fburton 2020년 11월 17일
댓글: J. Alex Lee 2020년 11월 20일
What is a good way to implement a dataflow paradigm in App Designer?
My app consists of processing stages, each of which take input data and generate output data based on settings specified by GUI components. Each stage depends on other stages in a chain or tree (directed graph) being executed to provide its input data. The first stage is typically reading a file and the final stages typically display plots, images or tables of results. Because some stages take a significant time to execute, it makes sense whenever possible not to recompute intermediate results data. However, I need to find a clean way to code this behaviour.
Any suggestions welcome!
  댓글 수: 8
Mario Malic
Mario Malic 2020년 11월 20일
I'd separate the calculation part out of plotting, for a complex app. I guess creating classes or having properties for each of the calculation stages would be the way to go. Then, the plotting part is where you'd have multiple options to choose what you want to plot. Within those options you can program what data you need, from which properties/classes and do the plotting.
J. Alex Lee
J. Alex Lee 2020년 11월 20일
i completely agree about separating calculation from plotting!

댓글을 달려면 로그인하십시오.

답변 (1개)

J. Alex Lee
J. Alex Lee 2020년 11월 20일
Yes, much clearer explanation of your question.
All due respect to Sourabh, I do not think you are looking for multi-window app with data passing.
First let's assume that you have the modular functions required on your back end squared away and available to do all the atomic steps of your workflow. [If you don't have that, focus on that first, do not even think about app-izing it].
If you can break your steps that cleanly, then conceptually why not have a "execute" button for each step? On file load, you can have the program go through all the steps, but then say if you want to change a parameter in step C, change it and press the "execute step C" button. Then you can have a "plot results" button, or executing step C can trigger execution of the plot. You can make the user experience a bit more seemless by associating each of your parameters with a step (A,B,C), and automatically executing the relevant step on ValueChanged. This would be easiest if your workflow is truly serial, so that changes in A trigger B, trigger C. If you have a more complicated workflow, like you may be able to change A, but actually wouldn't need to re-run B and can skip to D, but that DOES require triggering F, etc., then I guess you need to think about any kidn of automatic triggers more, or stick with manual step execution buttons or something like that.
To your specific question about the app "knowing" what step has changed, that just sounds like a logical variable to switch on or off depending on if a step has been executed or needs to be executed based on detecting a ValueChanged on something.
  댓글 수: 1
J. Alex Lee
J. Alex Lee 2020년 11월 20일
편집: J. Alex Lee 2020년 11월 20일
it may help to use "events and listeners" in addition to callbacks

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by