Do you share the same templates between server and backbone?
I'm trying to escape code duplication as much as I can.
Do anyone knows any pattern to have the server templates sent to backbone avoiding duplication?
Do anyone knows any pattern to have the server templates sent to backbone avoiding duplication?
Templates={}
Templates['templatename']=function(){/*compiled template*/}
They can then be referenced quite easily in your backbone render methods.