Optimistic UI and methods

As far as I understand, Optimistic UI requires methods to live in ‘both’ directory or other directory accessible on both server and client.

At the same time, one of the most popular Meteor boilerplates by Differential puts methods into server directory: https://github.com/Differential/meteor-boilerplate/tree/master/server/methods - is there reason for that?

We’re talking about boilerplate that was hardly even touched in the last year and still recommends using Iron Router.

There’s nothing wrong with using boilerplates, but you can’t take their content for granted, they don’t have to fit into best practices for particular framework and they still need optimising for particular project.

1 Like

I see, I have also noticed that this boilerplate uses “Template Controller” pattern described in the Discover Meteor article "Which brings us to the final, best-of-both-worlds approach: template controllers. This is not a new concept by any means, and it’s already popular in the React world. But let’s see how it applies to Meteor. "
So this approach of building reusable components is also outdated and should be replaced by React from the beginning? React is the only ‘modern’ way to build such components in Meteor, at least at the moment?

Vue has a similar component system, with a bit of a different API. I find it to have all the same concepts as React but be a little easier and require less boilerplate


the webpack:webpack package has support for vue-loader inside Meteor as well

I’m enjoying working with that setup

1 Like

Important thing is not to get lost in what is outdated and what is not :slight_smile: People still talk and walk, though there are more modern ways of communicating, like decoupled “e-mail”, and more fancy ways of moving around like segway or airplane.

On a serious side, as far as I understand, Meteor Guide lists latest and greatest (not necessarily simplest) ways of doing things. It does not even mention Iron Router. But everyone is free to chose technology he or she is comfortable with, with its benefits and limitations.