Pages

Wednesday 29 February 2012


cake php interview questions and answers
1.What is meant by MVC?
model view controller, it is a software architecture, used to isolates business logic from presentation logic. cakephp is based on mvc pattern.

2.What are 3 important parts of MVC?
  1. The Model represents the application data
  2. The View renders a presentation of model data
  3. The Controller handles and routes requests made by the client
  1. Compatible with versions 4 and 5 of PHP
  2. MVC architecture
  3. Built-in validations
  4. Caching
  5. scaffolding
4.what is the name of Cake'sdatabase configuration file?
by default it is database.php.default, you can find it in /app/config/database.php.default
for connecting to database, it should be renamed to database.php


5.What are controllers?
A controller is used to manage the logic for a part of your application. Most commonly, controllers are used to manage the logic for a single model. Controllers can include any number of methods which are usually referred to as actions. Actions are controller methods used to display views. An action is a single method of a controller.

6.What is default function for a controller?
index() function


7.What is a Component in cakephp?
Components are packages of logic that are shared between controllers. They are useful when a common logic or code is required between different controllers.


8.What are commonly used components of cakephp?
* Security
* Sessions
* Access control lists
* Emails
* Cookies
* Authentication
* Request handling