Skip to content

Architecture Overview

Brad Peabody edited this page May 18, 2019 · 6 revisions

NOTE: For now, this document applies to the refactor on the component-refactor branch.

  • A BuildEnv keeps track of the components involved the Build->Render cycle. The cycle starts with a "root" component, on which a Build method is called, passing it a BuildEnv instance. This method returns the virtual DOM corresponding to this root component in its current state, and methods on BuildEnv are used to track the lifecycle of instances of child components.

  • The Builder interface has a single method Build which is implemented by a component and returns it's "virtual DOM" (represented by vugu.VGNode et al)

  • A Renderer is responsible for synchronizing a virtual DOM with its target output. JSRenderer performs synchronization with the browser DOM. Where as StaticHTMLRenderer will output the virtual DOM as a string for use in "server-side rendering", static website output, etc.