MythTV / mythtv

The official MythTV repository
https://www.mythtv.org
GNU General Public License v2.0
705 stars 345 forks source link

Remove QtScript dependency #241

Open mark-kendall opened 3 years ago

mark-kendall commented 3 years ago

QtScript was deprecated in Qt5.5, is no longer developed and has been removed for Qt6.

QtScript is currently used to provide server side scripting for the web server (e.g. build tables of html from exported data). Note: I am undoubtedly missing other uses.

Instead of sending 'complete' html to clients, we should be providing boiler plate html with jQuery etc so that the web client can use the services API to build a useful, context sensitive interface (i.e. mythbackend could present recordings, status etc and the frontend some control elements as well as status etc).

A feature complete mythbackend implementation could provide a replacement for mythweb.

For clarity - this essentials means moving JavaScript from the server to the client.

stuarta commented 3 years ago

Agree with this. We should ensure the API is feature complete, and then we can layer on our presentation layer with whatever our favourite JS library is.

stuartm commented 3 years ago

There will be a performance hit for this though, seems unavoidable but we should be aware. QtScript is not just 'backend javascript', it directly makes function calls to native C++, doing much more right now than we really want to expose in the API (helper functions etc).

Please do not use jQuery whatever you do. It's a bloated mess. Something like Angular, Svelte etc would be a much better choice.

I've been wanting to take this on for a while, I wasn't happy that I left the WebFrontend abandoned and in some places broken. I don't think I'll have time to do 100% of this on my own. Happy to collaborate with someone on it though.

stuarta commented 3 years ago

The main one i've been playing with of late is ReactJS with MaterialUI

stuartm commented 3 years ago

I was going to mention React, but decided against making a long list ... suffice it to say there are plenty of options. React is up there with Angular though in terms of user base.