2013-09-07, 12:56
(2013-09-04, 10:49)hellow Wrote: Please forgive my ignorance but why is "all" the data appended with javascrip/jquery instead of mako?
You mean why most of the page data is not rendered in python (serverside) but in the browser (client side)? This probably is for two reasons.
1. Htpc manager does not depends on 3rd party software when serving a page. The data is provided by various api's, which is always slower than accessing a datasource directly. By using ajax to collect the data, in most cases the experience is faster. Also, in case an api connection is not working of over the internet and therefore slow, i would rather wait on a nice spinner telling me 'loading tv shows' for a few seconds, than my browser waiting/hanging on the initial request.
2. When doing things like paging, or auto-refresh, javascript seemed the way to go. Loading which song is playing in xbmc or updating the sabnzbd status every 5 seconds.
I would like to build the entire page server side, but there were just too much things that did not feel right due to the api connections.