I am a core PHP developer and learning MVC Frameworks: CodeIgnitor and Kohona. I downloaded few sample projects to do research on how they work. I am really confused how to determine which Model, which View and which Controller are interrelated to each other.
How can I easily locate which View is for with Controller and vice versa for models, views and controllers.
Also, can anyone tell me what's the major advantage of using these frameworks (Sorry this question to be asked in Google first, I am just looking for short answer) and I feel frameworks uncomfortable cause its hard to locate right file if someone else developed the application.
The right way to find related files in a project is that, you have to read code, for example, if you want to find what view or model is being used in a controller then you should seek in the ode, which model it calls and which view it loads. This is the only way to find related files.
There are lots of advantages to use a framework but one of the most important advantages of using a framework is that, it speeds up development process, writer less do more
, it makes your development process faster because it provides you some tools, for example, a Session class for session management, a Validation class for user input validation etc, using these tools you can easily make an application with a very few code and it saves your time so you become more productive.
Another important advantage is that, if you are working in a team and use a framework then each developer knows the code organization of the project because the framework ties everyone to a single set of rules that every developer must follow, everyone follows the same conventions so there is no confusions and any time you may add more developer to work on a project who knows the same framework and can work without any problem.
CodeIgniter and Kohana does not implement MVC (even if they say so...).
A typical flow in php frameworks that call themself MVC are : A url routes to a controller, the controller retrives data from model and passes it the view.
The advantage to using a framework should be that it provides a set of tools for rapidly development, making you focus on the unique code for your application.
The documentation for each framework should be pretty straight forward, you should read it if you going to use a framework...