Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSR Tips and Tricks guide #1049

matthewp opened this Issue Nov 2, 2017 · 1 comment


None yet
2 participants
Copy link

matthewp commented Nov 2, 2017

tldr; create a guide for SSR best practices to help with common needs and with debugging problems.

This was discussed on a recent live stream (29:46) and a previous live stream (28:57).

The Problem

Server-side rendering is one of donejs' best features. This is because it runs your application in a virtual dom that looks like a real dom, and uses zones to know when it completes. However there are times when you need to do things slightly different when in ssr, or you have a library that doesn't work well with zones, and the fact that donejs mimicks a browser environment makes it difficult to know what to do.

The Solution

Add a new guide to that talks about some of these issues:

  • How to prevent parts of your application from being server rendered.
  • How to specify a statusCode for a request, allowing you to set 404s when needed.
  • How to adjust the zone timeout and enable debug information. How to use the debug information to figure out why SSR is slow.
  • How to disable some code from running within a Zone when it runs asynchronous tasks that will never complete.
  • How to ensure SSR waits on a function to complete.
  • And more!: Add more suggestions to this thread.

This guide would hopefully be grouped into sections for common things you might run into and some possibly solutions.


  • - Identify topics to include within the guide.
  • - Find an appropriate way to guide these.
  • - Write the guide.

@justinbmeyer justinbmeyer referenced this issue Nov 3, 2017


Epoch 1 Survey Questions #77

24 of 24 tasks complete

@matthewp matthewp added the proposal label Jan 18, 2018


This comment has been minimized.

Copy link

leoj3n commented Oct 27, 2018

👍 for this guide. The can-zone code is very intimidating but I think what it does and how you use it is probably pretty straightforward. I know I'm just one user, but I would appreciate a high-level explanation of how can-zone works and more specifically what hoops it has to jump through to achieve its effect.

Not understanding how it works makes it scary to use. 👻


What I'm thinking is like a literal code walkthrough on video or in a longer blog post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.