[mythtv] Intro and Mythweb

David Shay david at shay.net
Mon Oct 31 23:57:50 EST 2005



Erin Tomson wrote:

> <snip>
> I've been working on some changes to mythweb lately, and wanted to run
> them by you all. My goal is to add support for mythweb themes that use 
> AJAX. (there's a good description of AJAX at 
> http://en.wikipedia.org/wiki/AJAX if you're unfamiliar with it)
>
> An AJAX theme has the potential to be much more responsive, since the 
> amount of data that needs to be initially loaded is smaller and 
> changes can be made to the database without refreshing the entire 
> page. Many tasks in mythweb will be dramatically more fluid.
>
Sounds like a great addition to me. 

> The downside of this is that it requires a fair amount of code 
> restructuring. Currently, mythweb builds large data structures that it 
> then passes to the theme for display. That's a slow process, 
> especially when an AJAX request may use only a tiny portion of that data.
>
> So instead, I propose that rather than using global variables, mythweb 
> would instead provide functions that query and return specific pieces 
> of data. Themes that need all the information at once can easily 
> retrieve it, while themes that don't can avoid paying the overhead.
>
Although this could certainly done in Mythweb itself, another approach 
could be to extend the mythtv protocol to provide some program guide 
access functions, for example to retrieve program data by date/time 
range and channel range.  This could provide a standard way to retrieve 
a subset of guide data.  One benefit here would be to provide for a 
simple way for other devices (i.e. the mvpmc project) to access the 
guide data.  It could be optimized within the backend as well in order 
to avoid repeated SQL calls for the guide data.

If there's any interest in this approach from the core developers, I 
would be willing to extend the protocol to provide these functions and 
work with you to get them into mythweb.




More information about the mythtv-dev mailing list