php - What's the best way to transition to MVC coding? -


I have picked up a PHP book and it's about 5 months since coding started in PHP. First of all, I had created all my sites without any organizational planning or MVC. I soon came to know that it is a pain .. Then I started reading on StreakFflow how to separate php and html and what I am doing since then.

  ex: profile.php & lt; - This file is html, css. I resonate the function here Profile_functions.php & lt; - This file is mostly PHP function  

In this way I am isolating all my coding by now and now I feel that I should proceed and start MVC. But the problem is that I have never taken classes before and sucked with them. And since MVCs (such as the KCPP and the codinator) are all squares, which can not be good.

My question: Is there a good book / site / article that teaches you how to code in MVC? I am looking for early starting books. I'm just starting to read and I think I'm going to use it.

Edit: Is it possible to structure an MVC organization for KC, codeigner, etc. without using your coding? Originally called 3 different files (visual, controller, model) in different profiles

Answer Your question to give

Is an MVC organization structure possible for Casey, Codinator, etc. without using your coding? Originally called 3 different files (see, controller, model) in different profiles

Absolutely ...

First file profile.php (view, What happens via the browser)

   

Controller

   

Model

  & lt ;? Php class UsersModel {Public Function __constuct () {// Join your DB or whatever you have to do} Public Function findUser () {Return to mysql_query ("Choose where users.id = 2 LIMIT 1" from users); }}  

Comments