Chapter 9Project: Extracting Libraries

Back in Chapter 6, Project: MVC in Dart, we rewrote our simple Dart application in an MVC style similar to the venerable Backbone.js. As is, there is little possibility for reuse of this code—either in our own codebase or shared with others.

In this chapter, we will factor those MVC classes into reusable libraries. This involves two separate activities: putting our newfound object-oriented Dart skills to use and making use of Dart’s excellent library system. The end results will facilitate both code reuse as well as better code maintainability.

Also in this chapter, you’ll run into something that you won’t find in most language books: some actual limitations of the language being discussed.

Get Dart 1 for Everyone now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.