I had some more discussions on this. The problem is that the view
"default" matches anything. So if I have a very specific view, that's
only present on my container, that renders in a star-shaped iframe, and
only makes sense for gadgets that have a black background (obviously a
purely hypothetical case; still you can easily see how specific views
require specific support from the gadget), any gadget specifying a
"default" view section, will seem to support my view. As a container, I
don't know whether the developer just created a "default" section
because he was too lazy to specify sections, whether there is a switch
between views being made in javascript, or whether his gadget is a black
star shaped thing in any view.
On a more practical level, as I understand how MySpace supports gadgets
now, is that they have 3 views:
- - canvas
- - profile
- - innerprofile
Innerprofile is what you see when you go to your own profile. When a
gadget developer submits his gadget to myspace, he has to specify
whether it makes sense to show his gadget on only the innerprofile (e.g.
todo list), only on the canvas/profile (e.g. superwall), or both (e.g.
shelfari, showing your books on your profile, and showing your friend's
books on your innerprofile)
As shown before, the catchall functionality of the "default" view
currently makes it impossible to retrieve this information from the
gadget XML.
When more containers will want to support a similar functionality,
gadget developers will have to specify the views the gadget is
supporting again in each container's web interface.
In a talk I had with Dan, Cassie and John Hjelmstad yesterday, we
thought of several possible solutions:
- - Support an extra tag in the spec as I suggested originally. Perhaps,
"supportedviews" isn't the best terminology here, something
"preferredviews" might be more accurate.
- - Extend the spec description of the content-sections in such a way that
it is clear that any view that is explicitly supported is mentioned
somewhere. So instead of just one
<content type="default">
section, it would make sense to specify
<content type="profile,innerprofile,canvas,starshapedblackthingy,default">
It would let the container know that it has specific support for those
types, and in addition has a default view for any other type. In
javascript the switch may be made between the views
- - This informations should be stored in some global gadget directory.
The problem here is that we don't have a global gadget directory yet,
and I don't think it's a good idea to have each container keep it's own
data about this now.
Please let me know if I've been able to at least convince you of the
need now :); I would be interested in what solution would be preferred
by the community.
Reinoud Elhorst
Hyves
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH+02rqCQnCrE98GgRAp5bAKC5NOlDtezwp2GKMvEpL8q9xK//ZQCgoLM4
t3f6tbitQDHUaMQgAakZ3O4=
=N0D9
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I had some more discussions on this. The problem is that the view
"default" matches anything. So if I have a very specific view, that's
only present on my container, that renders in a star-shaped iframe, and
only makes sense for gadgets that have a black background (obviously a
purely hypothetical case; still you can easily see how specific views
require specific support from the gadget), any gadget specifying a
"default" view section, will seem to support my view. As a container, I
don't know whether the developer just created a "default" section
because he was too lazy to specify sections, whether there is a switch
between views being made in javascript, or whether his gadget is a black
star shaped thing in any view.
- - This informations should be stored in some global gadget directory.
The problem here is that we don't have a global gadget directory yet,
and I don't think it's a good idea to have each container keep it's own
data about this now.
Please let me know if I've been able to at least convince you of the
need now :); I would be interested in what solution would be preferred
by the community.
In that case, it's questionable what the value of the default view is,
if by specifying a default view, you claim to support every view that
can ever be imagined in the future. At the very least, I think the spec
should be very clear about this point; I don't think most gadget
developers start by reading the spec through.
>
>> On a more practical level, as I understand how MySpace supports gadgets
> now, is that they have 3 views:
> - canvas
> - profile
It might be interesting to check the top x opensocial gadgets out there
now, and see how they behave. If indeed they very seldom specify a
default view, checking the specified views would work.
On the practical side, we do need the information on what views are
supported. If many gadgets have a default view, and no other way exists
in the spec to decide what views are supported, it seems that we'd
either need to specify a hyves-specific extension to the spec, or need
to collect the data when a gadget developer submits his gadget to our
site. In the latter case, it would make sense that we'd share that data
back to some/the central directory when it is released.
In that case, it's questionable what the value of the default view is,
if by specifying a default view, you claim to support every view that
can ever be imagined in the future. At the very least, I think the spec
should be very clear about this point; I don't think most gadget
developers start by reading the spec through.
It might be interesting to check the top x opensocial gadgets out there
now, and see how they behave. If indeed they very seldom specify a
default view, checking the specified views would work.
On the practical side, we do need the information on what views are
supported. If many gadgets have a default view, and no other way exists
in the spec to decide what views are supported, it seems that we'd
either need to specify a hyves-specific extension to the spec, or need
to collect the data when a gadget developer submits his gadget to our
site. In the latter case, it would make sense that we'd share that data
back to some/the central directory when it is released.
- Cassie
Is Kevin's view that "The default view should usually be an error or promotional message, not a functional version of the gadget" the general view in the community (I haven't checked how this is being done in real life gadgets at the moment)? In this case, this should be in the gadget spec very clearly. I do think however that this is at odds with the traditional google gadgets and backwards compatibility.