Skip to main content

Zend Framework Interview Questions and Answers



1.What is a Framework?
In software development, a framework is a defined support structure in which another software project can be organized and developed.
  • An abstract design
  •  Set of common functionality
  •  Developed for a particular domain
 2.How to disable layout from controller?
$this->_helper->layout()->disableLayout();
Disable Zend Layout from controller for Ajax call only
if($this->getRequest()->isXmlHttpRequest()){
$this->_helper->layout()->disableLayout();
}
3.How to change the View render file from controller?
function listAction(){
//call another view file file
$this->render(“anotherViewFile”);
}
4.How to protect your site from sql injection in zend when using select query?
$select = $this->select()
from(array(‘u’ => ‘users’), array(‘id’, ‘username’))
where(‘name like ?’,”%php%”)
where(‘user_id=?’,’5′)
where(‘rating<=?’,10);
5.How to check post method in zend framework?
if($this->getRequest()->isPost()){
//Post
}else{
//Not post
}

6.How to get all POST data?
$this->getRequest()->getPost();
7.How to get all GET data?
$this->getRequest()->getParams();
8.How to redirect to another page from controller?
$this->_redirect(‘/users/login’);
9.How to get variable’s value from get?
$id= $this->getRequest()->getParam(‘id’);
10.Create Model file in zend framework?
class Application_Model_Users extends Zend_Db_Table_Abstract {
protected $_name = “users”;
protected $_primary = “id”;
}

Comments

Popular posts from this blog

SAP GRC Interview Questions and Answers

1.What is the use of  SAP GRC? SAP Governance , Risk and Compliance solution enables organization to manage regulations and compliance and remove any risk in managing organizations key operations. As per changing market situation organizations are growing and rapidly changing and inappropriate documents, spreadsheets are not acceptable for external auditors and regulators. 2.What are the different activities that you can perform in SAP GRC? SAP GRC helps organization to manage their regulations and compliance and you can perform following activities Easy integration of GRC activities into existing process and automating key GRC activities. Low complexity and managing risk efficiently. Improve risk management activities. Managing fraud in business processed and audit management effectively. Organizations perform better and companies can protect their values. SAP GRC solution consists of three main areas: Analyze, manage and monitor. 3.What are the different GRC m...

Apache Kafka Interview Questions and Answers

Q1) .Mention what is Apache Kafka? Ans:   Apache Kafka is a publish-subscribe messaging system developed by Apache written in Scala. It is a distributed, partitioned and replicated log service. Q2). Mention what is the traditional method of message transfer? Ans:   The traditional method of message transfer includes two methods   Queuing: In a queuing, a pool of consumers may read message from the server and each message goes to one of them •   Publish-Subscribe: In this model, messages are broadcasted to all consumers Kafka caters single consumer abstraction that generalized both of the above- the consumer group. Q3). Mention what is the benefits of Apache Kafka over the traditional technique? Ans:   Apache Kafka has following benefits above traditional messaging technique Fast: A single Kafka broker can serve thousands of clients by handling megabytes of reads and writes per second •   Scalable : Data are partitioned and streamlined ove...