Mixing HTML / JS code with SAS is an antipattern - I would not recommend it, for many reasons:
Your app now requires developers with TWO skillsets (SAS + Web) to maintain. These guys are like unicorns, very rarely are they competent in both disciplines.
You cannot test your web / sas code in isolation
You cannot lint either your SAS code nor web code using regular IDEs
You are reliant on a SAS instance to work on the web component
You cannot build a complex application this way (because even a very simple app will rapidly get complex)
Good luck using React, Angular, or any modern frontend framework that requires compilation. (By the way, it's not impossible, you can do this with SASjs Streamed apps)
When we built the JES API approach (documented here: https://adapter.sasjs.io/#using-the-jes-api ) it was not possible to re-use session ids, perhaps that has changed now, if so I hope that this thread will be updated. To my understanding though your performance gains will be limited to the use of a re-usable compute context - meaning best case 2 seconds on Viya 3.5 and 6-8 seconds on Viya 4.
Contrast with Compute API which is ~1 second - https://adapter.sasjs.io/#using-the-compute-api
... View more