DVBProject/DVB-I-Reference-Client

presence of .php file in frontend directory causes confusion

Closed this issue · 5 comments

The presence of index.php in frontend / hbbtv / launcher causes confusion and there doesn't appear to be any documentation to explain this.

https://github.com/DVBProject/DVB-I-Reference-Client/blob/master/frontend/hbbtv/launcher/index.php

The name 'frontend' would imply to a reasonable outsider new to this project that this directory tree contains code to run in the DVB-I client. The DVB-I client cannot be expected to run php code. Surely this is actually part of the back-end?

I presume it is in the 'frontend' directory, even though it is served by the web server, because it generates the HTML for the OpApp.
Note that the 'backend' are the server functions like CSR, Service List server and Content Guide Server

Yes, the Reference Client is a dynamic web app served by PHP. Index.php is the initial URL of the client application and part of the "frontend". PHP running in the server provides the application for the HbbTV receiver.

As Paul said, frontend refers to whole client app while backend is for metadata creation and management (and in this project created initially only to create some content for the frontend).

The file itself is mix of javascript, php and html and would need refactoring and in the end getting rid of the PHP code altogether. Now it is mainly used to set the correct headers for HbbTV middleware and set the correct cache settings.

Can we close this issue. I am not sure what needs to be done and whether of not any change would be useful.
The files in the frontend/ directory provide/produce the frontend UI that runs on the client. As some specific aspects are dynamically created it makes sense to do that with a script running on the server - the output of that script is used by the client.

The only other approach, if you want the fact that the client UI webpage is dynamically created would be to have index.php as the default for that route.

In my opinion this ticket can be closed since. We will in ticket #67 address / improve this issue through creating the opapp pkg file for deployment.

Indeed this is the same underlying issue as #67.