0% found this document useful (0 votes)
2 views2 pages

Drupal Architect Interview Questions

The document contains a series of interview questions and answers focused on Drupal architecture, PHP core concepts, and MySQL database design. It covers topics such as the differences between custom and contributed modules, the plugin system in Drupal, and various PHP features like abstract classes and traits. Additionally, it addresses database normalization, query optimization, and the differences between InnoDB and MyISAM storage engines.

Uploaded by

kamal.obroi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Drupal Architect Interview Questions

The document contains a series of interview questions and answers focused on Drupal architecture, PHP core concepts, and MySQL database design. It covers topics such as the differences between custom and contributed modules, the plugin system in Drupal, and various PHP features like abstract classes and traits. Additionally, it addresses database normalization, query optimization, and the differences between InnoDB and MyISAM storage engines.

Uploaded by

kamal.obroi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Drupal Architect Interview Questions & Answers

Drupal Architecture & Development

Q: What is the difference between a custom module and a contributed module in Drupal?

A: Contributed Module: Developed and shared by the Drupal community, hosted on drupal.org.

Custom Module: Tailored to specific project needs, created by developers for a particular site.

Q: Explain the Drupal 8/9/10 plugin system.

A: Plugins are small pieces of functionality that are swappable and follow the Plugin API.

They use annotations (@Plugin) and are discovered using plugin managers.

Examples include: Blocks, Field formatters, Image effects, etc.

Q: What is a service in Drupal and how is it defined?

A: A service is an object managed by the Symfony Dependency Injection Container.

Defined in *.services.yml and injected using service container.

Q: How does Drupal handle configuration management?

A: Through YAML files in the config/sync directory. Used with commands like drush config-export and drush

config-import.

Q: How would you implement multi-site architecture in Drupal?

A: Share core codebase, separate sites/site1.com/settings.php, symbolic links or composer for shared modules/themes.

PHP Core & OOP

Q: What is the difference between abstract class and interface in PHP?

A: Abstract Class: Can have method implementations.

Interface: Only method declarations. Multiple interfaces can be implemented, only one abstract class can be extended.

Q: Explain Dependency Injection and its benefit.

A: Passing dependencies via constructor or method. Promotes loose coupling and easier testing.

Q: What is the difference between __construct() and __invoke()?

A: __construct(): Initializes the object.


Drupal Architect Interview Questions & Answers

__invoke(): Allows an object to be called as a function.

Q: What is late static binding in PHP?

A: Uses static:: instead of self:: to refer to the class that called the method, not the class it is defined in.

Q: Explain traits in PHP.

A: Traits allow reuse of methods across multiple classes.

Example:

trait Logger {

public function log($msg) { echo $msg; }

} class MyClass { use Logger; }

MySQL & Database Design

Q: Explain normalization and its types.

A: 1NF: Atomic columns

2NF: No partial dependency

3NF: No transitive dependency

Q: What is the difference between JOIN, LEFT JOIN, and INNER JOIN?

A: JOIN/INNER JOIN: Returns matching rows from both tables.

LEFT JOIN: All rows from the left and matched rows from the right.

Q: How would you optimize a slow query?

A: Use EXPLAIN, add indexes, avoid SELECT *, optimize joins.

Q: What is a covering index?

A: An index that contains all columns needed by a query, reducing table lookups.

Q: Difference between InnoDB and MyISAM?

A: InnoDB: Supports transactions, row-level locking, foreign keys.

MyISAM: Faster read, table-level locking.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy