by Kiro · 11y ago · 0 comments
What does this mean exactly? What kind of code needs to run on both?
You can optionally choose to include Meteor methods (ajax-style remote endpoints) on the client. Then when the method is called, the client-side version is run in addition to the real, server-side one being kicked off. If the server-side returns an error, such as due to insufficient permissions, the changes made client-side are rolled back. Combined with Meteor's client-side mongo implementation and reactive UI updates, it gives impressive "perceived performance" benefits.
A simple one is validation of forms, but also doing rapid UI updates without having to do network round-trips.
validation
routing
modular business logic e.g. - calculate total interest paid over the life of the loan provided the client pays x per month etc etc