When you use validated methods and keep your code isomorphic you get optimistic ui just by being lazy and not coding everything twice
I really like that feature, but I must admit that there are some problems with it working too well (but at the same time not well enough) sometimes.
I am working on a math practice website that generates math-problems and checks the results. Most of that is done client side and the server is just there to keep scores and to let the teacher watch the results coming in in real time. Even if you loose the connection to the internet altogether you can still keep working without even noticing. When you get connected to the server again your results will get synced with the server (again without you even noticing). Only trouble is: when you close the browser window before you get connected again, everything you did while being disconnected will be lost.
I just ran into that problem two weeks ago and I fixed that by saving all method calls (for that particular method that submits the results of exercises) to local storage, delete the backups in the callbacks from that method and resubmit any backuped submissions that are left local storage when i know that there are no methods cued up for retries.
Would actually be a nice feature (e.g. for validated-method) to just be able to set a flag and have retries persist until next time. That would give you pretty awesome offline-capabilities for ordinary web-apps with just a tiny little
persistRetries : true instead of doing a couple of lines of code
And in those cases where you don’t want things to look like they are working when they momentarily aren’t, you can just add a little
if Meteor.server in the right place and ruthlessly amputate the part that does that for you for free.