cakephp interview questions

10

Click here to load reader

Upload: pankaj-chauhan

Post on 11-Jul-2015

151 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Cakephp Interview Questions

CAKEPHPInterview- Questions

Exp.1-3 years

Created by : Pankaj Chauhan

Page 2: Cakephp Interview Questions

App Config Controllers

--Model Plugins --Tmp

Vendors --View --Webroot

-- Cake Config Docs

Libs --vendor --console

app --controller

Cakephp Folder

Page 3: Cakephp Interview Questions

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.

Page 4: Cakephp Interview Questions

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.

Page 5: Cakephp Interview Questions

Client

Dispatcher

Views

Controller

Model

Page 6: Cakephp Interview Questions

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

Page 7: Cakephp Interview Questions

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.)

Page 8: Cakephp Interview Questions

Security Sessions Acl (Access control lists) Auth (Authentications) Emails Cookies RequestHandling MVC Architecture, Built in validation Caching, Scaffolding

Commonly used components

Page 9: Cakephp Interview Questions

Has And Belongs To Many

Ques: What is Scaffolding ?

Ans: Scaffolding is Automatic CRUD creation.

HABTM?

Page 10: Cakephp Interview Questions

Thanks