1

I've been following along with the book Discover Meteor from https://www.discovermeteor.com/ and I have built the tutorial project called 'Microscope'

This uses iron-router and Meteor templating system to render out the front-end. I want to redo this project using famo.us for the front-end but I am unclear on how I to do so.

I am aware of a package called famono. mrt add famono. Using this package I can integrate famo.us and draw surface to the screen in a meteor project. It also allows you to render templates to the screen.

But I am confused on how to redo the project so the router - routes to render a famous surface with the data.

Also I am wondering if the templates will still be reactive.

If someone could provide insight on how to redo the 'Microscope' project to use famo.us on the front-end I would greatly appreciate it!

Thanks

UPDATE (to be more specific)

I have been trying to figure out how to integrate famous with templates and routing, and I have no clue how to do it.

I use iron-router to handle my routing which chooses which template and data to render like so:

Router.map ->
  @route 'posts',
    path: '/',
    data: ->
      Posts.findOne()

So this will load up the posts template with Posts.findOne() data.

But I know with famous I can generate surfaces from templates on the front end like so:

background = new Surface
      template: Template.post
      data: ??? (Posts.findOne()) ???
mainContext.add(background) 

Because javascript is what is going to load the final template into the view, what is the recommended way for me to get the data for that template, should I query the database from the front-end by setting up special subscriptions?

Typically I render the data into the page from the router on the server but...

with famous, I just have to load the main template and let famous load the rest of the templates. The only thing left is getting the data for the other templates. What is recommended?

Nearpoint
  • 7,202
  • 13
  • 46
  • 74
  • Any updates on this? I'm running into a similar problem. Its hard to see just where famo.us and meteor tie into each other. Do you use a scrollview or #each? Do you render views in modules using require.js format like in the Timbre example? Its really hard to say where these two frameworks meet in the middle... – Chet Jul 04 '14 at 01:30

2 Answers2

0

I would start by looking at https://github.com/gadicc/meteor-famous-components/. That package will do all the work for you if you want.

I have never used the Surface template argument but I believe that is a one time load and will not update on data invalidation (data change).

Sivli
  • 196
  • 1
  • 9
0

Or u can take a look at working examples ) https://github.com/sayawan?tab=repositories

mervasdayi
  • 729
  • 6
  • 16