ausocean / cloud

GNU General Public License v3.0
1 stars 1 forks source link

oceanbench broadcast: remove templates from the js and separate the js from the HTML #73

Closed trekhopton closed 1 month ago

trekhopton commented 1 month ago

This was done as an initial step for getting templates out of the javascript. We shouldn't use templates in javascript because it upsets HTML and JS formatters.

We also no longer need StartTime and EndTime in the broadcast config. There are already two other fields that store this information. The javascript can just use the timestamps.

saxon-milton commented 1 month ago

This was done as an initial step for getting templates out of the javascript. We shouldn't use templates in javascript because it upsets HTML and JS formatters.

We also no longer need StartTime and EndTime in the broadcast config. There are already two other fields that store this information. The javascript can just use the timestamps.

Are there other reasons why we shouldn't use templates in HTML and JS formatters ? Because I don't think this is a very good one.

trekhopton commented 1 month ago

This was done as an initial step for getting templates out of the javascript. We shouldn't use templates in javascript because it upsets HTML and JS formatters. We also no longer need StartTime and EndTime in the broadcast config. There are already two other fields that store this information. The javascript can just use the timestamps.

Are there other reasons why we shouldn't use templates in HTML and JS formatters ? Because I don't think this is a very good one.

HTML templates belong in HTML, not javascript. We could hypothetically use templates in any code but it's not good practice imo and there isn't much support for that sort of thing. Not being able to format HTML code is just a hindrance to development work flow. With a little more effort we can keep templates in the HTML and things are much neater.