On Fri, Jun 1, 2012 at 8:44 PM, Alan Gutierrez <a...@prettyrobots.com> wrote:
> A big issue is that if there is an error in your template, there's no way to
> report it if you've already started streaming 200 OK.

If there is an parse error in the template, you can not start
streaming and you send a 500.
If there is no parse error and the error happens inside a
template-tag, display that error (bold and in red), probably say
'sorry' and log it with a full stacktrace.

On Fri, Jun 1, 2012 at 2:41 PM, Gabriel Farrell <gsf...@gmail.com> wrote:
> I think non-streaming templating is still the norm because most
> templates aren't large enough to be a concern in terms of memory or
> computation time.

Memory and computation time is not my reason to do this.

The reason is to send the template output immediately as it is
generated. That way the client is not idle waiting to actually get the
data it requested. Instead it gets the data unbuffered as a stream.
And that should fell very damn responsive.

> If a lot of processing happens during rendering then
> one can hit some bugs that are really hard to track down. Often it's
> better to handle things in the JS before passing variables to the
> template.

We'll see how hard this really is. I'm still very optimistic about the topic.

> That said, Kernel is cool. I'll keep it in mind for my next project.

Yes, its cool.


I'm still evaluating how well it works. And I'm still very optimistic.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to