Almost all MCQs of Computer

Solved MCQs on CakePhp

1.       Question: What are 3 important parts of MVC? 
The Model represent the application data
The View renders a presentation of model data
Module represents the application part
The Controller handles and routes requests made by the client

2.       Question: The view layer in CakePHP can be made up of a number of different parts. What are the deferent part of view layer? 
View
Element
Controller
Model
Helper

3.       Question: Which block of the content contains the content of the render view? 
Content Block
Title Block
Section Block

4.       Question: What are the relationship types in CakePHP? 
HasOne
ManytoMany
HasMany
belongsTo

5.       Question: Cakephp is a PHP framework package which enables you to develop custom application.It supports a MVC based architecture. 
TRUE
FALSE

1.       Question: What is the first file that gets loaded when you run a application using cakephp? 
Index.php
Bootstrap.php
Core.php
Database.php

2.       Question: What is the first function that gets loaded from a controller? 
About
Index
Delete
Edit

3.       Question: What are the list of some database related functions in cakephp? 
Find
FindAll
Create
Query
4.       Question: What is the name of cake's database configuration file? 
Datasource
Database
Database.php.default
Question: What are commonly used components of cakephp? 
Security
Database
Session
Helper

1.       Question: Cakephp allows you to setup a combination of controllers, models and views and release as a packaged application. 
Helper
Plugin
Views
Behavior

2.       Question: Session can be configured in a number of ways in cakephp? 
$this->Session->write('Persion.eyeColor',Green');

3.       Question: How to retrieve the session value in CakePHP? 
$green=$this->session->retrieve('Person.eyeColor');
$green=$this->session->get('Person.eyeColor');
$green=$this->session->read('Person.eyeColor');

4.       Question: Which method will delete the session cookie and all session data stored in the temporary file system? 
Nullable()
destroy()
unset()

5.       Question: In CakePHP,what are the server built-in ways of authenticating users stored in your application? 
Fromauthenticate
Databaseauthenticate
Basicauthenticate
Digestauthenticate

1.       Question: What are the name of datasource in CakePHP Configuratoin array 
Database/SqlServer
Database/MySql
Database/postgee
All of them


2.       Question: How to load plug in one by one or all of them in a single call? 
CakeLoad('ContractManager');
CakePlugin::loadAll();
CakePlugin::load('ContractManager');
Cake.LoadAll();

3.       Question: Behaviors add extra funtionality to our models.CakePHP comes with a number of built-n behavior such as 
Authentication
tree
Translate
Session

4.       Question: Which helper use to create a forms quickly? 
HTMLHelper
JsHelper
FormHelper
CacheHelper

5.       Question: Which Helper contains method to make text more usable and friendly in our views? 
HTMLHelper
JsHelper
FormHelper
TextHelper

1.       Question: Paginator in CakePHP is offered by a component in the controller to make building paginated queries easier.How to declare paginator component in a controller? 
Public $myPage=array('Paginator');
Public $components=array('Paginator');
Public $helper=array('Paginator');

2.       Question: How to send email by using CakePHP? 
$email=new cakeEmail(); $email=send('app@aaa.com','test');
$email=new cakeEmail();
$email=sender('app@aaa.com','test');
$email=new CakeEmail(); $email=sender('app@aaa.com','test');





3.       Question: The security Component create an easy way to integrate tighter security in our application.Its provides methods for various tasks like.. 
Restriction which HTTP Methods
Requiring that SSl be used
Limiting cross controller communication
All of them

4.       Question: _____ensures that the model is loaded when it is needed. 
Uses('AppModel','Model');
App::uses('AppModel",Modelname');
App::uses('AppModel','Model');
('AppModel",Model');

5.       Question: Which is the default cache Engine in CakePHP? 
Filecache
Apccache
Wincache
XcacheEngine




1.       Question: What are commonly used components of cakephp? 
Security
Sessions
Access control lists
Emails
All of them

2.       Question: What are commonly used helpers of cakephp? 
CacheHelper
FormHelper
HtmlHelper
jsHelper

3.       Question: What is an Element? 
Element in  cakephp are smaller and reusable bits of view code
Used to display the views that contain presentational code.
Used to change the way that models behaves and enforcing model to act as something else.

4.       Question: How to including helpers in controller? 
$helper=array('From','Html','Js','Time');
array('From','Html','Js','Time')
public $helpers=array('From','Html','Js','Time');


5.       Question: A copy of CakePHP's database configuration file is found in 
/app/Config/database.php.default
/app/database.php.default
/app/Config/database/database.php.default
/app/Config/database.default

1.       Question: To work with database in the latest version of cakePHP,__ ____must be enabled in your php.ini file.
mysql
pdo_mysql
pdo_mysqli
mysqli


2.       Question: When a user uses a form to POST data to your application, that information is available in:
$this->get->data
$this->post->data
$this->form->data
$this->request->data

3.       Question: To change the default value of security salt,you have to work with the core php file located in 
/app/Config/core.php
/app/core.php
/system/config/core.php
/config//app/core.php

4.       Question: The _____seed is used for encrypt /decrypt strings. 
salt
cipher
hash
rsa

5.       Question: The _________is the bread and butter of cakePHP applications. 
controller class
Model class
component class
view class

1.       Question: We use the SessionComponent's SessionComponent::________method to set a massage to a session variable to be displayed on the page after redirection. 
setFlash()
setMessage()
showMessage()
showFlash()

2.       Question: CakePHP's model class files located in 
/app/config/model
/app/system/Model
/app/Model
/app/Models/Model

3.       Question: CakePHP works with convention over configuration. 
True
False

4.       Question: By naming your model post ,cakephp will automatically infer that this model work with controller name 
postcontroller
post_controller
PostController
post

5.       Question: The mode named post will tied to a database table named_________automatically 
post
posts
tbl_post
none

1.       Question: _________often represent a single function or interface in an application. 
View
Controller
Model
Actions

2.       Question: To take a advantage of the validation features in cakephp, you'll need to use Cake's FormHelper in your:
action
helper
controller
views

3.       Question: The single instruction in the action uses _______to pass data from the controller to view . 
set()
show()
view()
get()






4.       Question: cake's view files are stored in/app/View inside a folder named after the controller they correspond to .So for controller named PostController the view folderlocation will be 
/app/posts
/app/views/Posts/
/app/View/post/
/app/View/posts/

5.       Question: In cakephp,the view /template file extension is: 
php
html
ctp
ctm
1.       Question: $this->Html is the instance of cakephp's________class. 
HtmlHelper
ViewHelper
htmlhelper
viewHelper

2.       Question: How to create a form in cakephp? 
$this->create()
$this->FormHelper->create()
$this->FormController->create()
$this->Form->create()
3.       Question: In cakephp validation rules are defined in: 
controller
model
view
helper
4.       Question: Every cakePHP request includes a CakeRequest object object which is accessible using $this->request. 
true
false
none
5.       Question: Cake's routing is found in: 
/app/Config/core.php
/app/Config/database.php
/app/Config/routes.php
/app/routes.php
1.       Question: Controller classnames are ______, CamelCased, and end in Controller. 
plural
singular
both
none

2.       Question: The getReady() function of the PeopleController class will look for a view template in: 
/app/view/People/get_ready.ctp
/app/view/PeopleController/get_ready.ctp
/app/People/get_ready.ctp
/app/view/get_ready.ctp

3.       Question: In general, filenames match the classnames, which are: 
uppercase
lowercase
CamelCased
Capitalized

4.       Question: The ____folder is where you'll place third-party PHP libraries you need to use with your cakePHP application.
app
vendors
lib
plugins
5.       Question: Model classnames are ______ and CamelCased.
plural
singular
both
none
1.       Question: CakePHP's_____folder is where you'll do most of your application development. 
app
vendors
lib
plugins
2.       Question: CakePHP does not support composite primary keys
true
false
none
3.       Question: A_____is a class that aids in controller logic. 
Component
helper
behavier
model
4.       Question: _______are an abstraction that enable models to manipulate different types of data consistenty. 
views
components
behaviours
Datasources

5.       Question: The render() method is automatically called at the end of each requested controller______. 
controller
model
action
view
1.       Question: Actions are methods on a ________ that handle requests. 
controller
components
models
views
2.       Question: The set method() is the main way to send data from your controller to your_________. 
controller
model
action
view
3.       Question: The __________class is the parent class to all of your application's controllers. 
ViewController
DevController
Appcontroller
Controller
4.       Question: In cakephp, the conventional view file Question: Convention of Foreign key name of the related table followed by _id in CakePHP. Example foreign key of category table to the other table would be category_id. 
True
False
1.       Question: Controller extensions in CakePHP is called 
Behaviors
Components
Helpers
All
1.       Question: Model extensions in CakePHP is called 
Components
Behavious
Helpers
All
2.       Question: View extensions in CakePHP is called 
Components
Behaviors
Helpers
All
3.       Question: Which of the following database storage engine CakePHP does not support? 
MySQL
PostgreSQL
Microsoft SQL Sever
SQLite
Oracle
4.       Question: CakePHP uses app/tmp directory for 
Model descriptions
Cached views
Session information
Cookie
All
5.       Question: Which of the following setup methods are available in CakePHP? 
Development
Production
Testing
Advanced
All
1.       Question: Which of the following database storage engine CakePHP does not support? 
MySQL
PostgreSQL
Microsoft SQL Sever
SQLite
Oracle
2.       Question: CakePHP uses app/tmp directory for 
Model descriptions
Cached views
Session information
Cookie
All
3.       Question: Which of the following setup methods are available in CakePHP?
Development
Production
Testing
Advanced
All
1.       Question: Rather than using an auto_increment key as the primary key, you may also use char(36). CakePHP will then use a unique 36 character UUID (String::uuid) whenever you save a new record using the Model::save method. 
True
False
2.       Question: Convention of Foreign key name of the related table followed by _id in CakePHP. Example foreign key of category table to the other table would be category_id. 
True
False
3.       Question: Model extensions in CakePHP is called 
Components
Behavious
Helpers
All

11:59:00 PM
Tags
[facebook]

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget