Re: XML-based sources (Metadata Factory plugin)



Hey Juan,

On Fri, 2012-04-27 at 16:40 +0200, Juan A. Suarez Romero wrote:
> Hi.
> 
> As part of a work I'm doing in order to help people to create new
> sources in a simpler way, I'm pleased to announce the new
> metadata-factory.
> 
> It's still a work in progress, and thus it is not merged in Grilo yet.
> But you can find here:
> 
> https://gitorious.org/~jasuarez/grilo/jasuarez-grilo-plugins/commits/metadata-factory
> 
> 
> What it does? Basically, it is a plugin that is able to read
> descriptions of sources in XML, and based on that description, create a
> new metadata source completely functional.
> 
> In the branch there are two examples of XML-based sources, one of them
> using Lastfm and another using TMDb to get thumbnails for content).
> 
> Here is a source that gets the thumbnail from lastfm service:

This is a very good idea, and fixes one of the problems of creating
metadata sources for grilo, the need to compile those sources to be
used.

The problem I have with it is that the syntax, due to the fact that it's
using XML, is very complicated, probably based on XPath and XSLT. I
actually found it more complicated than writing the C code. Now I can
only imagine how complicated if one tried to implement a source for a
service that uses json (which I see you've done, I certainly wouldn't be
able to juggle those 2 so easily).

Personally, I would rather have seen:
- remove the need for plugins to implement the threading/async'ness, and
do it all in the calling code.
- add helper functions for oft-used features. This might be XML and Json
helpers for example.
- implement a plugin that uses libpeas or lua to export that
functionality to a scripting language

I probably wasn't very clear in
https://bugzilla.gnome.org/show_bug.cgi?id=667557

If you decide to carry on with this XML-based plugin, the 2 first items
in the list are still very interesting to plugin developers.

Cheers





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]