Build a web app over a translated model #589
-
Hi all! I have a project of building a web app to show interactive results of a model translated from Vensim thanks to the SDEverywhere library. Here are some of my interrogations:
I realize these are big questions without much context. I am new to Vensim models so I am not sure how to start this project the right way. I am of course available for discussion :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
@LSarribouette I'll give a first answer to your questions. Should I use the JS output of the model or the WebAssembly? It mainly depends on the size of your model, by which I mean the number of total calculations (# variables multiplied by the # timesteps). If it is small to medium, I think pure JS would be fine. If it is very large, you could consider WebAssembly. There is a SDE setup difference depending on your target, with WebAssembly requiring Emscripten. That said, it also depends on your needs. If you're okay with a very large model running a bit longer then pure JS would also be okay. For instance, if you don't need responsive user interaction, then pure JS works. WebAssembly is mainly available for large model where every millisecond matters to the user experience. Is VueJS an appropriate frontend in this case? (it is the framework mostly used in my team) Yes, VueJS would be fine. It will just be JS calls from whatever UI framework you prefer. Will updating the Vensim model and apply these modifications up to the web app be a simple process? How can I keep it simple? Yes, updating is simple. SDE produces only a few static files that need to be replaced. So you can update Vensim, run SDE, upload the new static files to the web server. Also, it is possible with some additional programming to do this through continuous integration tools (even hosted on GitHub), if that is beneficial for your project. More setup at the beginning, but makes continuous updating easier in the long-run. Thanks for starting an SDEverywhere project! |
Beta Was this translation helpful? Give feedback.
@LSarribouette I'll give a first answer to your questions.
Should I use the JS output of the model or the WebAssembly?
It mainly depends on the size of your model, by which I mean the number of total calculations (# variables multiplied by the # timesteps). If it is small to medium, I think pure JS would be fine. If it is very large, you could consider WebAssembly. There is a SDE setup difference depending on your target, with WebAssembly requiring Emscripten.
That said, it also depends on your needs. If you're okay with a very large model running a bit longer then pure JS would also be okay. For instance, if you don't need responsive user interaction, then pure JS works. WebAssembly is m…