Summary
In this final chapter, you learned how to make reusable and easily maintainable code, using widgets and components. Talking about reusable view code (HTML, JavaScript, and CSS), we introduced widgets, defined and focused on the benefits they add to the project. Next, you learned to build and use them, and finally, we did a practical example by building a new widget from scratch. Talking of reusable logic code, we discovered its components, distinguished between components and application components, and also did some practical examples by building useful components for real-life problems.
Then we mastered the documentation generator, specifically API and guide documentation. You learned how to launch and use the tools provided by Yii. Finally, we built a controller class to explain, with a practical example, how to build the API reference and the guide reference for that controller.