...
/Solution: The Model Has an Active Record
Solution: The Model Has an Active Record
Let's solve the antipattern Magic Beans using Active Record.
Controllers handle application input while views handle application output, both relatively simple and well-defined tasks. Frameworks are best at helping us put these together quickly. But it’s hard for a framework to provide a one-size-fits-all solution for models because models comprise the rest of the object-oriented design for our application.
This is where we actually need to identify what the objects are in our application and what data and behavior those objects have. It’s true what Robert L. Glass said:the majority of software development is intellectual and creative.
Grasping the model
Fortunately, there’s a lot of wisdom in the field of object-oriented design to guide us. Craig Larman’s book