Cake php is the famous framework of php. Which make our development fast and secured. Since, i want to spread cake php programming knowledge through out world , so i’v decided to start from beginning.
We know every framework follow MVC. Where M refers to Model, V for View and C for Controller. When any user(client) browse or surfing internet page he just see the view part of that website. Which is HTML generated according to the user request. Controller handle user request and response from model. On the other hand Model is responsible for business logic of the data.
- ModelsModels represent knowledge. A model could be a single object (rather uninteresting), or it could be some structure of objects.There should be a one-to-one correspondence between the model and its parts on the one hand, and the represented world as perceived by the owner of the model on the other hand.
- ViewsA view is a (visual) representation of its model. It would ordinarily highlight certain attributes of the model and suppress others. It is thus acting as a presentation filter.A view is attached to its model (or model part) and gets the data necessary for the presentation from the model by asking questions. It may also update the model by sending appropriate messages. All these questions and messages have to be in the terminology of the model, the view will therefore have to know the semantics of the attributes of the model it represents.
- ControllersA controller is the link between a user and the system. It provides the user with input by arranging for relevant views to present themselves in appropriate places on the screen. It provides means for user output by presenting the user with menus or other means of giving commands and data. The controller receives such user output, translates it into the appropriate messages and pass these messages on to one or more of the views.
Ok lets go in our tutorial: First download cake php framework from this link. Extact this file and put it on your C->xampp->htdocs->cakephp folder. expand cakephp folder and see file/folder structure
form the folder structure we see that some of folder and file. It contain’s Model,View and Controller folder. With this there have a Config file which contain database.php file and route.php. I’ll discuss about all files and folder later.