Design patterns The Active Record design pattern is a technique to save data from in-memory objects to the database, and load data from the database into in-memory objects. This pattern includes the code for saving and loading inside the model class.(Single Responsibility Principle is violated, as this single class holds both database updates and also the model. There is more than one reason for this class to change. The Data Mapper Design Pattern is a similar pattern but moves the saving and loading code out of the model, into a separate class.
Posts
Showing posts from September, 2022