Appendix A: Implementing View Technologies


This appendix is intended as a reference to accompany s 12 and 13. It discusses how the MVC web app framework discussed in supports any view technology without the need to modify controller or model code. It first considers how this framework decouples controllers and views, and then looks at how the framework supports those view technologies discussed in . For each technology we'll look at:

Finally we look at how new, custom view implementations can be implemented within this framework, to support other view technologies or provide sophisticated, app-specific behavior.


Although this appendix is primarily concerned with the MVC web framework introduced in , the information about installing and configuring view technologies applies to all web apps. The code examples illustrating integration with each view technology can also be used as the basis of your own implementation code.


This chapter contains some lengthy code listings. However, space constraints mean that these aren't all complete. I've tried to show the central code needed to achieve each task (however, please refer to the code in the sample app and accompanying infrastructure packages for complete implementations of the approaches discussed).