Skip to main content

Openings for different technoogies.

PHP Interview questions 5

1) what is MVC? why its been used?
Ans :      Model-view-controller (MVC) is an architectural pattern used in software engineering. Successful use of the pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. In MVC, the model represents the information (the data) of the application; the view corresponds to elements of the user interface such as text, checkbox items, and so forth; and the controller manages the communication of data and the business rules used to manipulate the data to and from the model. WHY ITS NEEDED IS 1 Modular separation of function 2 Easier to maintain 3 View-Controller separation means:
A Tweaking design (HTML) without altering code B รข€” Web design staff can modify UI without understanding code
                
2) what is framework? how it works? what is advantage?
Ans :      In general, a framework is a real or conceptual structure intended to serve as a support or guide for the building of something that expands the structure into something useful. Advantages : Consistent Programming Model Direct Support for Security Simplified Development Efforts Easy Application Deployment and Maintenance
3) what is CURL?
Ans :      CURL means Client URL Library
curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos), file transfer resume, proxy tunneling and a busload of other useful tricks.
CURL allows you to connect and communicate to many different types of servers with many different types of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also be done with PHP’s ftp extension), HTTP form based upload, proxies, cookies, and user+password authentication.
                
4) what is PDO ?
Ans :      The PDO ( PHP Data Objects ) extension defines a lightweight, consistent interface for accessing databases in PHP. if you are using the PDO API, you could switch the database server you used, from say PgSQL to MySQL, and only need to make minor changes to your PHP code.
While PDO has its advantages, such as a clean, simple, portable API but its main disadvantage is that it doesn't allow you to use all of the advanced features that are available in the latest versions of MySQL server. For example, PDO does not allow you to use MySQL's support for Multiple Statements.
Just need to use below code for connect mysql using PDO
try {
$dbh = new PDO("mysql:host=$hostname;dbname=databasename", $username, $password);
$sql = "SELECT * FROM employee";
foreach ($dbh->query($sql) as $row)
{
print $row['employee_name'] .' - '. $row['employee_age'] ;
}
}
catch(PDOException $e)
{
echo $e->getMessage();
}
                
5) What is PHP's mysqli Extension?
Ans :      The mysqli extension, or as it is sometimes known, the MySQL improved extension, was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer. The mysqli extension is included with PHP versions 5 and later.
The mysqli extension has a number of benefits, the key enhancements over the mysql extension being:
=>Object-oriented interface
=>Support for Prepared Statements
=>Support for Multiple Statements
=>Support for Transactions
=>Enhanced debugging capabilities
=>Embedded server support

Comments

Popular posts from this blog

Urgent Recruitment For Freshers And Experienced at TATA Power

Company Profile: Tata Power Solar with 25 years of deep domain expertise, is one of the pioneering solar manufacturers in the world and India's largest specialized EPC player. Reference link :http://www.tatapower.com/careers/opportunities.aspx Job Role : Graduate Trainee Job Type : Engineering jobs Job Details : At Tata Power we have a vision of where we want to go, and it’s really exciting. Would you like to be part of a company that is making history? Towards this objective, Tata Power participates in campus recruitments and is the company of choice in most major engineering institutes such as National Insitute of Technology, VJTI, Govt. Engineering Colleges, Birla Institute of Technology, NPTI, MS University, Nirma Institute of Technolgy, etc. Apart from college hiring, we also hire experienced professionals from the industry at various mid-level and senior positions. A Structured Induction Programme is carried out for: Graduate Engineer Trainees (GETs) All the GETs und...

We have the openings for Python,Django

Job Synopsis         Python / Django Openings With Symphony Teleca - Bangalore Company:         Symphony Experience:      5 to 10 yrs Location:         Bengaluru/Bangalore Job Description         Work Location: Bangalore (ITPL) Experience: 2-10 Yrs (SE, SSE, Lead, Architect/Manager) Mandatory Skills: Django 1.3.3 Python 2.6 Mysql 5.1 / Postgres 9.1 / any other DB Optional Skills: Celery 3.0.5, Httpd, Nginx, Memcache, Jquery Please revert with your updated CV's ASAP. Regards, Deepthi. Role:                         Team Lead/Technical Lead Role Category:         Programming & Design Industry Type:         IT-Software / Software Services Functiona...

Looking for Drupal Themer

Location : Bangalore Position : Drupal Themer Job Responsibilities: • Work with Drupal Developer in porting pages to Drupal • Responsible for building Drupal themes and template files for themes for requirements specified Preferred profile: Strong Knowledge of Drupal coding standards. Strong grasp of semantic, HTML and CSS based design • Experience in converting PSDs and into functional Drupal themes from scratch • Experience in creating well-commented, Zen-based subthemes (http://drupal.org/project/zen) from provided layered Photoshop compositions, including creating and editing templates for different node-types and pages, editing .info files, and adding additional theme settings using the Drupal Form API. • Experience in adding, editing and deleting pages, users, user groups, blocks, and block areas on a pre-existing Drupal installation based on provided directions, text, pictures and wireframes • Experience in testing and modifying Drupal themes and stylesheets to ensure consistent...