I'm working (slowly) on a small Flask project. One of my models is a class called
Post, which is a lightweight
Post objects are created by a
PostFactory, because creating a
Post involves hitting a database. The
PostFactory holds the necessary database connection, so the
Post objects can be serialized.
What part of the model/view/controller division does a factory object naturally fit in? Is it part of the models, since it's tightly coupled with
Post objects? Or is it a controller, since it manipulates models?