26 messages in com.googlegroups.google-mashup-editorRe: gm:link Tag and Google Data Sourc...| From | Sent On | Attachments |
|---|---|---|
| Reto Meier | 08 Oct 2007 02:32 | |
| Jason | 08 Oct 2007 15:56 | |
| Reto Meier | 09 Oct 2007 05:16 | |
| Jason | 10 Oct 2007 10:46 | |
| Jason | 12 Nov 2007 11:16 | |
| adszhu | 06 Jan 2008 04:37 | |
| Jason | 07 Jan 2008 10:34 | |
| adszhu | 10 Jan 2008 11:23 | |
| Jason | 10 Jan 2008 16:17 | |
| adszhu | 14 Jan 2008 08:50 | |
| Jason | 14 Jan 2008 16:25 | |
| Jason | 15 Jan 2008 10:46 | |
| adszhu | 16 Jan 2008 04:43 | |
| Ádám Szigeti | 22 Jan 2008 10:52 | |
| Jason | 22 Jan 2008 11:25 | |
| Ádám Szigeti | 23 Jan 2008 03:26 | |
| Jason | 23 Jan 2008 10:35 | |
| Ádám Szigeti | 24 Jan 2008 01:15 | |
| Ádám Szigeti | 24 Jan 2008 10:47 | |
| Jason | 25 Jan 2008 18:32 | |
| Ádám Szigeti | 26 Jan 2008 09:09 | |
| adszhu | 19 Feb 2008 01:00 | |
| Jason | 21 Feb 2008 14:19 | |
| Ádám Szigeti | 22 Feb 2008 01:41 | |
| Jason | 22 Feb 2008 14:14 | |
| Ádám Szigeti | 23 Feb 2008 08:01 |
| Subject: | Re: gm:link Tag and Google Data Source Freshness![]() |
|---|---|
| From: | adszhu (ads...@gmail.com) |
| Date: | 01/06/2008 04:37:23 AM |
| List: | com.googlegroups.google-mashup-editor |
Hi,
I am using http://demo-jsgdatalib.googlemashups.com/ as a basis for my
own mashup, and I faced some difficulties when reaching the elements
of the calendar feed.
It is the lines 374..376 of the code in GME. While Jason's <td
align="center"><gm:date ref="gd:when/@startTime"/></td> expression
operates, the <td><gm:text ref="author/name"/></td> does not. I have
tried all the methods mentioned at
http://www.w3schools.com/xpath/xpath_syntax.asp,
including ".author/name", and "atom:author/name" as well.
I also could not reach the "gd:where@valueString" data element. On the
other hand, "title" can be fetched succesfully.
Is there any trick that makes it work?
On Nov 12 2007, 8:17 pm, Jason <gmej...@google.com> wrote:
Hi Reto. I have some good news for you:
1) As of last week's release, all caches, including those from Google Spreadsheets and Google Calendar, now expire after 10 minutes -- much better than once or twice a day. :) This greatly increases the utility of applications that use Google Spreadsheets, et al. as a data store.
2) Styles for certain tags (including gm:link and gm:image) have been adjusted so that they now more closely match their HTML analogues, meaning that they are now displayed as inline elements rather than block.
Enjoy!
- Jason
On Oct 10, 9:46 am, Jason <gmej...@google.com> wrote:
Hi Reto. My answers are inlined below:
1) Yep, seen the client-sideJavaScriptlibraryfor Calendar. The big benefit ofGMEis that I can define one datasource (calendar) and have it automatically create a list and stick pins on a map without having to mess around with clientside Java. In fact, I'm trying to map the location of events in a calendar, the gm:map tag lets me do that in a single line, with the dynamic geocoding of the 'where' field done in the same place. Much neater than fetching the calendar and parsing through each item, geocoding, and placing pins. Been there. Hated it.
Fair enough. :) We are actually working to integrate the relatively newJavaScriptGDatalibraries andGMEin order to simplify the process of writing to calendar feeds, displaying unshared events, etc. considerably. This may not be right around the corner, but it's definitely on our road map.
2) Um yes. But that means I need to find a parameter that: (a) I don't need to specify for my purposes (b) Has sufficient scope to be changed every 30 mins / hour for the foreseeable future without running out of scope. Max-results is what I'musingin test for calendar, and I can mess with structured queries in spreadsheet to achieve similar results, but both fit firmly under 'cheap hack' rather than the extra time parameter that I can happily place in the 'lateral workaround' category.
Your points are valid. Unfortunately,GDatafeeds do not accept arbitrary query string parameters and Google Reader's feed-reading infrastructure, whichGMErelies on to pull and cache feeds, does not support variable cache refresh frequencies. I will reiterate your concerns, however.
3) gm:link : yep, did that -- but why does it behave that way in the first place? It's inconsistent with other tags and having it act this way by default means we need to hack around in CSS to get it to work, if it defaulted to inline it would be trivial to place it by itself on a new lineusingstandard HTML.
I'll put in a feature request. Thanks for the suggestion.
Now the question!
For the record, what is the typical cache frequency for Calendar and Spreadsheet feeds? Spreadsheets in particular seems to update less than once a day!
I'm afraid I don't know the exact frequency, but, as you've pointed out, it is far too small to create applications that rely on displaying frequent updates to these feeds. I'll reiterate your concerns to the team, and hopefully we can come up with a mutually beneficial solution or at least a reasonable compromise. Thanks for your patience, and keep those questions coming. :)
- Jason
On 8 Oct, 23:57, Jason <gmej...@google.com> wrote:
Hi Reto. There have been several recent posts concerningGME'sfeed caching. I do have a couple of suggestions for you:
1. The newJavaScriptclientlibraryfor Google Calendar allows you to pull calendar and event feeds into standard HTML pages and, luckily enough,GMEsource files as well. This clientlibraryis only available for Calendar (for now...), but it's definitely worth a look. Oh, and did I mention that it also enables you to write to calendar feeds? This alone opens the door for some pretty awesome mashup possibilities. Click the link below to see a sample of theJavaScript clientlibraryfor Calendar in action.
2. Even though allGDataservices throw an error if you pass in an unrecognized query string parameter, you can use the parameters they do support, including max-results and updated-max, to achieve a higher "cache refresh rate." Bear in mind that your application will likely load much more slowly than it would ordinarily since fresh feeds are fetched and cached by the server every time you access a new URL, but this should work.
As far as your issues with the gm:link tag goes, CSS may be the solution you're looking for. In fact,GMEdeveloper Phil Rees recently wrote a very good article on re-stylingGMEtags:
It explains how to use the Firefox extension Firebug to inspectGME markup so you can manipulate it to fit your needs. For example, the following simple application displays the links for Digg articles in one line:
<gm:page title="My App" authenticate="false"> <style> div .gwt-HTML { display: inline; } </style>
<gm:list data="http://digg.com/rss/index.xml" template="myTemplate"/
<gm:template id="myTemplate"> <span repeat="true"> <gm:link ref="atom:link/@href" labelref="atom:title"/> </span> </gm:template> </gm:page>
Please let me know if you have any other questions.
- Jason
On Oct 8, 2:32 am, Reto Meier <reto...@gmail.com> wrote:
I'm working on a big new mashup that includes data sourced from Google Calendar and Spreadsheets. While putting it together I've noticed a couple of issues.
I'm pulling feeds from Spreadsheets and Calendar, but theGMEcache for both sources isn't updated frequently (*maybe* once or twice a day). The usual trick of sticking a '&timevariable=[date/time variable goes here]' at the end of the feed address doesn't work, as Spreadsheet & Calendar have strict parameter passing requirements (which return an error of you add extra variables). It would be *really* nice to be able to set a parameter in the gm:data tag that specifies the frequency of cache refreshes -- particularly for SS and Cal. Even if it's coarse grained like 30mins / hourly / daily.
Also, I've noticed that the gm:link tag implies a trailing <br/>. In other words, you can't string a bunch of these links together on one line of text; and if the linkref field is empty, nothing is displayed -- it would suit me better if the link was disabled rather than hidden if no link ref is available. Could that maybe be an option?
Thanks!




