Is there a services package in the MVC standard?

1

Is there a service package in the MVC standard? Would it be an MVCS?

For example, I have a ConnectionFactory class - which serves to connect to the database. That would be a service. Where do I put this in the MVC pattern? Would it be in the Controller package or would you create a new package called Servicos?

Another question: and the exceptions, in what package do I put it?

    
asked by anonymous 16.10.2017 / 16:33

1 answer

0

Generally this type of service is in a folder called config, or app-> config. The exceptions, which in my view would be files of a framework for example, fictionary in vendor.

This type of model is widely used by frameworks, such as Zend and Laravel (PHP Frameworks).

Zend folder structure:

-config
     -autoload
-data
     -cache
-module
     -Application
-public
     -css
     -js
     -image
-vendor
     -zendframework
     -bin

Since the config folder is responsible for the configuration files of the entire application. The folder dates to the files saved in the application. Module holds the files responsible for the mvc of each module of the application. Public is the folder responsible for the public files, much of these files used in the views. And vendor, where is the framework and various.

    
16.10.2017 / 16:56