Summary
If you take away one thing from all these examples, it should be that binding handlers are solely responsible for interaction with the DOM. In our first example, we made the slideVisible
binding as an animated replacement for the standard visible
binding. This change from the normal "instant" hide and show to the "animated" hide and show was completely decoupled by our viewmodel. This is beneficial because it keeps these two pieces completely separated, allowing them to develop and evolve independently.
In this chapter, we covered simple and complex binding handlers, binding context management, and using the virtual elements API to support containerless bindings. In the next chapter, we will be looking at preprocessors for bindings and nodes.