A solid foundation is the key to constructing a building that will withstand the abuses of nature over the course of time. The same is true for software, but the foundation is knowledge—a firm understanding of design concepts and implementation patterns—not concrete. Without this foundation, an engineer will inevitably create unstable software that eventually crumbles. The downfall may be code smell due to a misunderstanding of a core concept, a poor API resulting from an insufficient design period, poor implementation due to not knowing a standard pattern, etc. The intent of Part I is to help prevent this downfall.
These opening chapters are designed to help you create a better foundation by covering commonly misunderstood (or inadequately understood) concepts that are core to positioning, dragging, and resizing elements—core features required of most UI components. In addition to these concepts, basic design considerations are discussed to help ensure consistency across components and prevent common design mistakes.
If you already have this knowledge, then great—skip to Part II! If you want a refresher, then just skim Part I. If you want to understand the base component class that will be used throughout the book, then just read the last section of Chapter 2 (“Example Widget”). Remember, this is your adventure!
Throughout Parts I and II of this book, the term widget will be used when referring to different libraries and the dialog example. You ...