The imperfections of Note To Self revisited
Actually, as mentioned before, we did not use a strict MVC pattern in that app. If you remember, the ArrayList
of notes was actually held in the Activity
class. In our next app, we will see how to improve our adherence to the MVC pattern with the use of a specially designed Java class, the singleton. The singleton is not yet another class type such as, inner, anonymous, static, interface, and so on. It is simply a way in which we can design and code a regular class in order to make our code more adherent to the MVC pattern and therefore more manageable as it becomes more complex, more potentially reusable in the future, and more understandable to other developers who might get involved with the project.
So, why did we do it wrong in our Note To Self app? For simplicity. When designing the Note To Self app, we knew that it was never going to be a big or complex project, and it was never going to be worked on simultaneously by more than one developer...