cakephp interview questions
TRANSCRIPT
CAKEPHPInterview- Questions
Exp.1-3 years
Created by : Pankaj Chauhan
App Config Controllers
--Model Plugins --Tmp
Vendors --View --Webroot
-- Cake Config Docs
Libs --vendor --console
app --controller
Cakephp Folder
Ques-1 – What is the first file that get loaded when you run a application using cakephp, Can we change that file?
Ans: First call file is bootstrap.php, yes it can changed , either through index.php or .htaccess file.
Ques-2: Is any drawback using cakephp? Ans: Its loads full application before it starts your task. It is not recommended for small projects because of its resource heavy structure.
Ques: What is model, View, Controller. Ans: MVC is an architectural pattern used in software engineering. Successful use of pattern isolates the business logic from user interface as well as database (fetching/Saving) data.
M --> Model represents the information (the data) of the application.
V --> View is user interfaces C -->Controller manages the communication of data and the business rules used to manipulate the data to and from the model.
Client
Dispatcher
Views
Controller
Model
Ques: What is naming convention in cakephp?
Ans: 1. Table Name : Plural and lowercased. 2. Model Class Singular and CamelCased eg.ModelName
3. Model filename Singular and underscore eg. Model_name.php
4. Controller Class Plural and CamelCase with Controller appended. Eg. ControllerNamesController.
5. Controller filename Plural and underscored with controller appended.
Eg. Controller_names_controller.php
Ques: What are components and helper and why they are used?
Ans: A Component is an independent piece of code written for specific task that can be used (eg. Email, Ajax, RequestHelper and sessions)
A helper is used for helping cakephp in rendering data to be shown to user with views (eg. Form, Html etc.)
Security Sessions Acl (Access control lists) Auth (Authentications) Emails Cookies RequestHandling MVC Architecture, Built in validation Caching, Scaffolding
Commonly used components
Has And Belongs To Many
Ques: What is Scaffolding ?
Ans: Scaffolding is Automatic CRUD creation.
HABTM?
Thanks