Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Yii Interview Questions and Answers

Ques 1. What is Yii?

Yii is a high-performance PHP framework for developing web applications.

Example:

// Yii::app()->run();

Is it helpful? Add Comment View Comments
 

Ques 2. Explain MVC architecture in Yii.

Yii follows the Model-View-Controller architectural pattern where the model represents the data, the view displays the data, and the controller handles user input and updates the model and view.

Example:

// class PostController extends CController { }

Is it helpful? Add Comment View Comments
 

Ques 3. What is Yii's ActiveRecord?

Yii's ActiveRecord is an implementation of the Active Record pattern, providing an object-oriented interface for interacting with database tables.

Example:

// $post = new Post; $post->title = 'New Post'; $post->save();

Is it helpful? Add Comment View Comments
 

Ques 4. Explain Yii's Gii tool.

Gii is a web-based code generation tool provided by Yii that helps in quickly generating code for models, controllers, forms, and more.

Example:

http://your-app/index.php?r=gii

Is it helpful? Add Comment View Comments
 

Ques 5. What is Yii's widget?

Widgets in Yii are reusable components that can be embedded in views or layouts to encapsulate complex UI functionality.

Example:

// Yii::app()->widget('application.widgets.MyWidget', array('param'=>'value'));

Is it helpful? Add Comment View Comments
 

Most helpful rated by users:

©2024 WithoutBook