DoneJS 3.0 Update


#1

Several people have been asking about DoneJS 3.0 so I wanted to give an update about where it is at.

First, let me explain what DoneJS 3.0 is about. DoneJS 3.0 combines:

  • CanJS 5.0 - Using the can package.
  • StealJS 2.0 - Tree shaking
  • Incremental Rendering - Available since done-ssr 1.1.0, but now enabled by default.

A prerelease of DoneJS 3.0 is available right now that includes the first 2 new features; CanJS 5.0 and StealJS 2.0. You can install it with:

npm install -g donejs@pre

And then create a new app:

donejs add app my-donejs3-app

Note that this will be missing a few things:

  • The current prerelease using the traditional full server-side rendering.
  • The current prerelease does not utilize constructible can-components and the new way of doing routing.

My anticipated schedule for DoneJS 3 is:

  1. Get incremental rendering working with our core demo apps. This is what I’m currently working on. It is taking some time mainly because the http2 support in Node.js is quite a bit different from http1.
  2. Update the generators with the new way of doing routing.
  3. Enable incremental rendering by default.

When (2) is done I’ll create another prerelease and notify everyone here. Same for when (3) is done. I would expect DoneJS 3.0 to be releasing soon afterwards (after some last-second crossing of the i’s).


#2

whats about the new approche for routeData thats described in https://canjs.com/doc/guides/routing.html#Connectacomponent_sview_modeltocan_route ?

does that fit into donejs 3 ?


#3

Yup! The constructible components pattern from the guide will be used in donejs 3. I’m working on updating the chat guide with what I think that will look like. I’ll post here when that’s done to get feedback (still discussing how this should work in practice).

One thing we are thinking about doing is turning the default route.data into a DefineMap so that you can do route.data.page to get the current page, for example. This would eliminate the need to do a bunch of serialize: false in you AppViewModel like people struggle with today. What do you think?


#4

Thats a good idea… simplify routes a bit :slight_smile:

I am going to start working with this version of donejs soon, is this a good place to post issues?


#5

@MarcGodard donejs/donejs ! :slight_smile: . Appreciate the beta testing!