Abstracting UI elements

We still need to add the image and video content. We could go ahead and add them into our current software design, but we're starting to see a pattern emerge in how we've set things up, and it might make sense to refactor our code, abstracting out some of the common elements.

Refactoring in software development means reworking parts of your code to make it cleaner, more maintainable, and more extendable without modifying the behavior or features.

In this case, we're going to refactor how the controller updates the screen by abstracting out our UI elements. If you noticed, each time we add a new UI element to the view or the model, we need to modify and add it to the controller. It would be cleaner if the controller ...

Get Augmented Reality for Developers 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.