Skip to content

Nesting!

Latest
Compare
Choose a tag to compare
@3rd-Eden 3rd-Eden released this 17 Jun 12:28
· 169 commits to master since this release

Debugging

We wanted to make it easier to debug your applications when using BigPipe/Pagelet, so we started using the new diagnostics module to output debug information. The diagnostics module provides an easier to read output in the terminal as it colors the namespace based on a hash of the name and some magic. It will still work in exactly the same way as you might be used to debug, just a little bit better in our opinion.

Another change we've made to make it easier to debug was the removal of Freelist. Originally we wanted to re-use the created Pagelet instances to reduce the amount of garbage collection that Node had to as these Pagelet instance would stay around for ever. This unfortunately lead to some really odd edge cases which were a pain to debug. There was really good lessons we've learned from this: Premature optimization is the root of all evil.

Authorization

While working on tests we noticed that the authorization handler was never called when a pagelet was created over a real-time connection. Allowing people to create a new unauthorized pagelet on the server and retreiving it's generated HTML and calling it's RPC methods when crafting a special packet. This has been resolved and the appropriate test have been written for this in order to prevent regression of this horrible bug in the future. We urge everybody to upgrade to 0.7 as fast as possible.

Nested pagelets

This release comes with a major and amazing new feature. It's now possible to have / render pagelets within pagelets! And of course, you can also render pagelets within those pagets as well:

Pagelet.extend({
  pagelets: {
    one: require('pagelet'),
    two: require('pagelet')
 }
});

This allows you to write even more modular templates and pagelets then ever before!