thanks for your reply. I think I might need to clarify my question a bit. I don't doubt the MVC pattern itself and I don't want to put business logic inside the controller and . In my example, my business logic is in NonCatalyst::MyClass, i.e. it is completely separate from the controller and the WebApp itself. The controller simply collects data and asks this model class for a result, which it then sends to a view.
My question is, what do I gain from using the Catalyst::Model::Adaptor approach to declare my external class as a model as opposed to simply requiring it in the controller and using it directly. If anything, the Adaptor approach appears to require more code, especially when parameters need to be send to the model.
In addition, my case requires that the model is instantiated once per request (it needs to connect to third-party databases depending on user input), so I would have to use Catalyst::Model::Factory::PerRequest and I can't really see the benefits of that at the moment but I'm new to Catalyst and fully aware that I might be overlooking something here. Thanks for your help!
In reply to Re^2: Trying to understand Catalyst::Model::Adaptor
by tospo
in thread Trying to understand Catalyst::Model::Adaptor
by tospo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |