Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think there are two potential trains of thought here. The idea that you propose in #4, a "dataLoaded" event might warrant some conversation. However, the first argument that comes to mind is that, as you rightly said, Meteor is of a new generation of fluid web app frameworks. In that world, what does it mean exactly that the initial set of data has loaded? </p> <p>The second might be that there's a better solution to your problem. There may definitely be cases where the merging of jQuery and Meteor feels clunky, but after a cursory read of your example code I feel like there might be a better way in this example. It looks like you have a Feed collection and want to display a living timestamp for each feed item like "2 hours ago". Is that correct? </p> <p>If so: I don't <em>think</em> that example #2 is terribly wasteful if you aren't going to store the living timestamp as its presented in Mongo. I'm admittedly not sure of the best way in Meteor, but you should be able to cache the timestamp value in the app. Another thing you might want to consider is storing the value in Mongo separate from the Unix timestamp - say, a number of hours. You could have a process running on the server to update the time elapsed on the feed item. This is sustainable assuming that the feed items eventually go stale, there aren't a huge number of them and you don't need to be super exact on the timestamp.</p> <p>I don't have any data and don't suggest that these methods are a) right and b) faster than the obvious solution, but its food for thought.</p> <hr> <p>ETA: Meteor.subscribe might be of use <a href="http://docs.meteor.com/#meteor_subscribe" rel="nofollow">http://docs.meteor.com/#meteor_subscribe</a>. See the usage in the todo example: <a href="https://github.com/meteor/meteor/blob/master/examples/todos/client/todos.js" rel="nofollow">https://github.com/meteor/meteor/blob/master/examples/todos/client/todos.js</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload