meteorhacks / meteor-ssr

Server Side Rendering for Meteor
https://atmospherejs.com/meteorhacks/ssr
264 stars 29 forks source link

Why Client Side Templates need to be available #3

Closed SantoshSrinivas79 closed 9 years ago

SantoshSrinivas79 commented 10 years ago

@arunoda I haven't looked at the code yet, but I was reading the description. I was wondering why we cannot keep everything server side.

Basically my use case is:

1) Create server side handlebar templates for sending emails 2) Render the templates on the server side using data that is relevant to the particular user 3) Send the emails on the server side with appropriate rendering and logging

Does this seem like a use case that can be solved using srr?

Thank you.

arunoda commented 10 years ago

Of course yes. This is exact what ssr can be used. You can use blaze instead of plain handlebars. For now you need to define your template on the client (just only to get it compiled) But very soon, you'd able to load it via assets.

Sivli-Embir commented 10 years ago

:+1: for this, no point in putting email only templates on the client. Naturally its already on your todo list, thanks as always @arunoda

arunoda commented 10 years ago

BTW: Now I've added an feature for that. See: https://github.com/meteorhacks/meteor-ssr#ssrcompiletemplatetemplatename-stringtemplatecontent

arunoda commented 9 years ago

Now we can't load client side templates at all :)