Index

General

  1. Explain caching in Drupal?
  2. Can you explain how the database system of Drupal works?
  3. What is a render array in Drupal?
  4. What is Drupal’s taxonomy system and what are some of its key features?
  5. Explain the concept of “nodes” in a Drupal system.
  6. What Are Hooks?
  7. What is Node and Block in Drupal?
  8. What is PDO?
  9. Where should we use theme hook and what is the use of that file?
  10. Which design pattern is used by Drupal?
  11. How to add custom PHP codes in pages using Drupal?
  12. What are disadvantages of Drupal?
  13. What does sticky at top of lists do in publishing options while creating the front page?
  14. What is the use of Configuration menu?
  15. How would you optimize a Drupal website?
  16. What are the advantages of Drupal?
  17. How to remove breadcrumbs from my Drupal pages?
  18. How to add custom PHP codes in my Drupal pages or blocks?
  19. How do I get my site to have SEO-friendly URLs?
  20. How can I enable clean URLs in Drupal?
  21. When can a Drupal user not edit a node they created?
  22. What is the difference between Drupal and Ruby on Rails?
  23. What is database abstraction layer in Drupal?
  24. Explain the path system of Drupal?
  25. Explain Modules in Drupal?
  26. What are some most commonly used PHP based CMS?
  27. Why is Ctools used in Drupal?
  28. What are patches in Drupal?
  29. What is Drupal cron?
  30. Why is the 'search' function in Drupal is better than other CMS?
  31. Why you shouldn’t modify core drupal files ?
  32. Why does Drupal need a database? What databases are supported?
  33. What Does Drupal Do?
  34. What is teaser in Drupal?
  35. What is drupal weight?
  36. What Is Comment Moderation In Drupal?
  37. What is entity api module?
  38. What are available SEO modules in Drupal?
  39. What are the five conceptual layers in Drupal system?
  40. What are Drupal blocks?
  41. What is Drupal Pane module?
  42. Can you explain the Function and Working of Dashboard Module ?
  43. What is entity and entity api?
  44. How to use the contextual filter?
  45. What is a Web Content Management System?
  46. How you can drop the table using module?
  47. What is subtheme?
  48. What is responsive theme?
  49. When do I need a contextual filter vs. a relationship?
  50. How to interact with Drupal search system?
  51. What is a patch in Drupal and how will we apply patch in drupal?
  52. How to use preprocess function?
  53. What is Drupal error handling?
  54. What is Drupal Pane module?
  55. What is the use of server field in setup payments?
  56. What modules do you always recommend and why?
  57. how to improve DRUPAL performance for anonymous and authenticated users ?
  58. Explain the capabilities of views module.
  59. What are the technical differences between Joomla and Drupal?
  60. Do you keep regular backups?
  61. What is drupal panels?
  62. What is drupal cache?
  63. What is critical path?
  64. What is triage?
  65. Can Drupal work with JavaScript?
  66. Explain the flow of information between the 5 main layers of Drupal?
  67. Can you comment on the Scalability factor of Drupal?
  68. Explain coding standards in Drupal?
  69. How to install a new module in Drupal?

Advanced

  1. Explain Drush, Drupal weight, and Drupal Cron briefly?
  2. What Is Difference Between Diff And Patch?
  3. What is difference between innodb and myIsam?
  4. What is difference between update and alter query?


The Questions
General
1. Explain caching in Drupal?

Through caching Drupal allows to speed up website using different configuration like page caching, block caching and lifetime for cached pages.

  • Page Caching: It enables the entire HTML of each page to be stored in the database. It reduces the amount of queries needed
  • Block Caching: You can set the cache setting for a block in views, when block created by views
  • Minimum cache lifetime: It is the amount of time before the page cache is cleared. On each cron run, page caches are cleared.
  • Expiration of cached pages: It only applies for an external mechanism, for example, your browser cache or varnish
2. Can you explain how the database system of Drupal works?

In a database Drupal stores information, and each information has its own database table. For example, the basic information regarding the nodes of your site are stored and kept in the node table, and if you use the CCK module to add fields to your nodes, the field information is stored in a separate table.

3. What is a render array in Drupal?

For Drupal content render arrays are the basic building blocks. In Drupal, render arrays provide you a structured way to programmatically change the content before it is displayed.

4. What is Drupal’s taxonomy system and what are some of its key features?

Drupal comes with a built in taxonomy system that allows for categorization of the nodes on a site.The taxonomy system allows for arbitrary definition of terms, as well as arbitrary organization of those terms into vocabularies. There is no limit to the number of vocabularies that can be created, nor is there any limit to the number of terms that can be included in a vocabulary.

A vocabulary can also have free tagging which means that, instead of entering specific terms ahead of time, users may enter tags freely at the time the content is created and those tags automatically become terms in that vocabulary. Drupal’s taxonomy system is one if its most powerful and flexible features.

5. Explain the concept of “nodes” in a Drupal system.

All content on a Drupal website is stored and treated as “nodes”. A node is any piece of individual content (e.g., a page, article, forum topic, blog entry, etc.). Note, though, that omments are not stored as nodes but are always connected to a node.

The ability to create different “content types” is a way Drupal allows you to have different kinds of nodes for different purposes. For example, an “article” is one content type, a “book page” is another, and a “blog entry” yet another. You can also create new content types of your own.

Treating all content as nodes provides a great deal of flexibility that facilitates and simplifies creating new types of content. It also makes it easy to apply new features or changes to all content of a particular type.

6. What Are Hooks?

Hooks allow modules to alter and extend the behavior of Drupal core, or another module. They are one of the various ways that code components in Drupal can communicate with one another. Using hooks a module developer can change how core or another module works -- without changing the existing code.

7. What is Node and Block in Drupal?

In Drupal, if there is any new story or page, forum topic etc. is referred to as a node. Node module is responsible and takes care of adding, removing, and editing operation on any content in a website. A piece of information (block) can be displayed at a particular location and that location is called a region. Regions are like left side bar, header, footer etc. Blocks can be fit into any region based on configuration settings.

8. What is PDO?

PDO is referred as PHP Data Objects. It is a consistent way to access the database. It helps the developers to write code in the easier way. It is like a data access layer that uses a unified API. Drupal provides a database abstraction layer, which helps the developer to work easily with multi-database servers. It is used to preserve the syntax and power of SQL and to work with complex functionality. It provides a defined interface for dynamic queries with using security checks and good practices. This process is developed at the top of the PDO database API.

9. Where should we use theme hook and what is the use of that file?

template.php in the theme folder. This php file is used to override other theme functions. This file must start with opening PHP tag. PHP Template should be informed to override the theme functions which are not listed in the basic list.

10. Which design pattern is used by Drupal?

Singleton Design pattern

11. How to add custom PHP codes in pages using Drupal?

Drupal does not allow adding PHP code directly inside a post or in a block by default. To do this, we need to activate a drupal module called PHP filter via Administer Site building Modules.

12. What are disadvantages of Drupal?

The disadvantage of Drupal are:

  • Drupal is not user friendly interface. It requires advanced knowledge and few basic things about the platform to install and modify.
  • Drupal is a new content management system. It is not compatible with other software.
  • Performance is low compared to other CMS's. The website which is built using Drupal will generate big server loads and never opens with a slow internet connection.
13. What does sticky at top of lists do in publishing options while creating the front page?

It fixes your page at top of lists on your site.

14. What is the use of Configuration menu?

This is an important part in the Drupal Back-End. Any changes done in this configuration, will affect the entire website. Here you can do the user account setting, site information setting or any other general site setting.

15. How would you optimize a Drupal website?

The steps to optimize the Drupal site are:

  • Enable Page Caching
  • Compress CSS files
  • Js Aggregation
  • Moving Media Files and Static files to a CDN
  • Optimize Images Size and Their Number
  • Theme Optimization
16. What are the advantages of Drupal?

The advantages of Drupal are:

  • Drupal is a flexible CMS that allows handling content types including video, text, blog, menu handling, real-time statistics etc.
  • It provides a number of templates for developing web applications. So there is no need to start from scratch if you are building simple or complicated web applications.
  • Drupal is easy to manage or create blog or website. It helps to organize, structure, find and reuse content.
  • Drupal provides some interesting themes and templates which gives your website an attractive look.
  • Drupal has over 7000 plug-ins to boost your website. Since Drupal is an open source, you can create your own plug-ins.
17. How to remove breadcrumbs from my Drupal pages?

Breadcrumbs or breadcrumb trail is a navigation aid used in drupal interfaces. Normally it appears in between the top banner area and the page title. It gives users a way to keep track of their location within programs. Breadcrumbs are really useful in a comparatively bigger website with plenty of sections and subsections. But when it comes to smaller websites, it may found useless. In those cases you may either hide it using CSS (eg. .breadcrumb {display: none;}) or in the page.tpl.php file remove the line that says

18. How to add custom PHP codes in my Drupal pages or blocks?

By default, drupal will not allow inserting PHP code directly inside a post or in a block. To do this, you need to activate a drupal module called PHP filter via, Administer Site building Modules. Even though this module ships with drupal, it remains disabled by default.

19. How do I get my site to have SEO-friendly URLs?

The Pathauto module automatically generates URL/path aliases for various kinds of content (nodes, taxonomy terms, users) without requiring the user to manually specify the path alias. This allows you to have URL aliases like /category/my-node-title instead of /node/123. The aliases are based upon a “pattern” system that uses tokens which the administrator can change.

20. How can I enable clean URLs in Drupal?

Drupal’s default URL structure is like “http://www.sitename.com/?q=node/10″ This URL format can be hard to read, and can sometimes prevent search engines from indexing all your pages properly. In this case you can eliminate this “?q=” and clean the URLs through the following: Navigate to Administer Site configuration Clean URLs. By default, it will be disabled. Select enabled and click the save configuration button.

You can make your URLs cleaner with the help of path module: Home Administer Site building Modules: enable the Path Module.

21. When can a Drupal user not edit a node they created?

Symptoms: An authorized Drupal user loses “edit” access to nodes they’ve created, even if they have appropriate node (or other module) access permissions. Or, user cannot edit a node that should be editable by them, based on access control or node access settings. No errors or warnings are presented to the user. Nothing in the Drupal watchdog log.

Possible Cause: The user does not have permission to use the input filter currently assigned to the node. (An administrator or other privileged user may have changed the input filter settings, or, input filter permissions may have been changed to exclude the node author since the node was created. As a result, the user never had, or no longer has permission to use the input filter associated with the node.)

22. What is the difference between Drupal and Ruby on Rails?

Drupal is a Content Management System, it is a huge pile of code that give you a full working website directly after install. It already handles users, articles, permissions, uploading data so that you can start a small website even if you don’t know a word of code. However, if you want to change it, you will have to learn about the internals of the beast, and develop your own plug-ins to alter its behavior.

Ruby on Rails is a framework, it’s more like an empty shell to fill with the logic you need. It is a set of useful classes and functions so that you don’t waste time on low-value tasks when developping a website. At first, a RoR application does nothing, but you can start developping features very quickly, and you can do basically anything you want. It is infinitely much more flexible than Drupal but you have have to do everything yourself.

23. What is database abstraction layer in Drupal?

Drupal provides a database abstraction layer to provide developers with the ability to support multiple database servers easily. The intent of this layer is to preserve the syntax and power of SQL as much as possible, but also allow developers a way to leverage more complex functionality in a unified way. It also provides a structured interface for dynamically constructing queries when appropriate, and enforcing security checks and similar good practices. The system is built atop PHP's PDO (PHP Data Objects) database API and inherits much of its syntax and semantics.

24. Explain the path system of Drupal?

When you visit a URL within your Drupal site, the part of the URL after your base site address is known as the path. When you visit a path in your Drupal site, Drupal figures out what information should be sent to your browser, via one or more database queries. Generally, Drupal allows each module you have enabled on your site to define paths that the module will be responsible for, and when you choose to visit a particular path, Drupal asks the module what should be displayed on the page.

For instance, this site (drupal.org) is (of course) built with Drupal. The page you are now viewing is http://drupal.org/node/19828, whose path is “node/19828?. The module that is responsible for this path is the core Node module, so when you visit this page, Drupal lets the Node module determine what to display.

To determine the path to a particular page on your site, for purposes of creating a link, go to the page you want to link to and look at the URL in the address bar. By default the URL, after the base address of your site, will begin with ‘?q=’. When ‘Clean URLs’ are enabled you will see a directory structure in the URL. The “path” for use in a menu item is the part of the URL after the site’s base address and without the “?q=”.

25. Explain Modules in Drupal?

A module is a software (code) that extends Drupal functionality. Modules fall into one of three categories: - Core modules are those included with the main download of Drupal. These can be turned on or off without downloading additional components. Examples include - Contributed modules are downloaded from the Modules download section of drupal.org, and installed within your Drupal installation. Examples include - Custom modules are modules you write yourself. This requires a thorough understanding of Drupal, PHP programming, and Drupal’s API.

26. What are some most commonly used PHP based CMS?

Following are some most commonly used PHP based CMS:

  • Drupal
  • Joomla
  • WordPress
  • TYPO3
27. Why is Ctools used in Drupal?

Ctools is a set of APIs and tools which is used to improve the developer experience.

28. What are patches in Drupal?

Patches are the files that contain a list of differences between one set of files, and another. You can make changes like addition, deletion in codes through patches. Patches can also be used to make changes to another copy of the original or main file.

29. What is Drupal cron?

The term weight in Drupal is used to order nodes. Nodes with lower weight will be at top of the list while nodes with heavier weight will be at lower position.

30. Why is the 'search' function in Drupal is better than other CMS?

Drupal integrates well with external search engines such as Xapian, Apache solr if the built-in search engine does not meet your needs properly.

31. Why you shouldn’t modify core drupal files ?

No matter how easy it is to modify core files to make Drupal do what you want it to do, resist the temptation.

  • Doing so will make it complicated, difficult or near impossible to apply site updates such as Security and bug fixes.
  • You will make it difficult for those that come after to maintain the site.
  • You could possibly leave your site vulnerable to exploits.

The Drupal core has been designed to be modular, so there should be no reason to hack it. If there is a feature you want and it cannot be accomplished outside of modifying core, consider submitting your hack as a patch. Create an issue and tell the community the feature you want to accomplish. It will then be tested and your feature may become a part of the Drupal core.

32. Why does Drupal need a database? What databases are supported?

Drupal stores its information – the individual pages, the registered users, and so on – in the database. The database forms the back-end for your Drupal site. At this time, Drupal supports MySQL (or an equivalent such as MariaDB), PostgreSQL, and in Drupal 7, SQLite.

33. What Does Drupal Do?

Drupal is the choice for many great web sites because it does a lot of different things very well, and allows different kinds of information to interact effectively through its flexible, open architecture. Drupal’s feature set is far more economic and practical for most organization.

34. What is teaser in Drupal?

A short introductory sentence or paragraph about a piece of content that informs readers about the subject of the content. By default, the first paragraph or two of the content is used (there is a setting for how much), usually with a link to the complete node.

35. What is drupal weight?

A term used by Drupal to define the priority or order in which a function is processed or a block / node is displayed. From Drupal 6, the weight field is adjusted dynamically using a drag-and-drop interface. Note: A lower weight value (-10) will float to the top of lists, while heavier (+10) weights will appear lower in lists

36. What Is Comment Moderation In Drupal?

Drupal core contains settings that allow you to moderate comments. Drupal’s user access controls allow you to specify whether or not users must already have an account before they can post comments to the site. You can also specify whether a user (logged in or anonymous) may leave a comment without approval. Comment moderation is made simpler via the contributed module called Notify. Notify will send an email to the administrator whenever someone leaves a comment on their site.

37. What is entity api module?

The entity api module extends the entity API of Drupal core in order to provide a unified way to deal with entities and their properties. Additionally, it provides an entity CRUD controller, which helps simplifying the creation of new entity types.

38. What are available SEO modules in Drupal?

There are various SEO modules available in Drupal :

  • Pathauto
  • Meta tags/ Node words
  • Service Links
  • Google Analytics
  • Related Links
  • Search 404
  • Site map
  • Url list
39. What are the five conceptual layers in Drupal system?
  • Data (nodes, etc)
  • Modules
  • Blocks and menus
  • User permissions
  • Themes and templates
40. What are Drupal blocks?

Blocks are container objects that are used to organize your content of your website.

41. What is Drupal Pane module?

Pane module is used to translate the custom panel’s pane with optional title that will be stored as variables and it can be translate or edit quickly.

42. Can you explain the Function and Working of Dashboard Module ?

The Dashboard module provides a Dashboard page in the administration menu. The intention of the Dashboard page is to give administrators a quick overview of important information on the website.

43. What is entity and entity api?

They provide a unified way to work with different data units in Drupal. Drupal 7 is all about entities. They are everywhere: nodes, users, taxonomy terms, vocabularies etc.

But how, as developers, can we create our own entities? When do we really need to do that? I think these questions are really very project-specific. We can probably use nodes for nearly everything. But when it comes to performance-sensitive projects, nodes should really only be used for content, and we should separate as much as possible from nodes. Why? Nodes are revisioned, they fire a lot of hooks, and they have functionality that we likely won’t need. Also if we know exactly what fields we should have in our entities, we can create our own custom entities to avoid all those joins of Field API tables.

44. How to use the contextual filter?

In Drupal, each type of information has its own database table. For instance, the basic information about the nodes of your site are stored in the Node table, Comments and Users also have their own database tables, and roles, permissions, and other settings are also stored in database tables.

45. What is a Web Content Management System?

A Web content management system is content management system software, implemented as a Web application, for creating and managing HTML content. It is used to manage and control a large dynamic collection of Web material. A WCMS facilitates content creation, content control, editing, and essential Web maintenance functions. The software provides authoring tools designed to allow users with little knowledge of programming languages or markup languages to create and manage content with relative ease. Most systems use a database to store content, metadata, or artifacts that might be needed by the system. Content is frequently, but not universally, stored as XML, to facilitate reuse and enable flexible presentation options.

Most systems use server side caching boosting performance. This works best when the WCMS is not changed often but visits happen on a regular basis. Administration is typically done through browser-based interfaces, but some systems require the use of a fat client.

46. How you can drop the table using module?

To drop the table you can use dbdroptable in install file.

47. What is subtheme?

A Drupal subtheme (or sub-theme) is a theme that is based on a “base theme”. The base theme provides basic (and sometimes more than basic) functionality. The subtheme styles the site with a unique look, and adds any unique extra functionality.

48. What is responsive theme?

A responsive theme (as the one used for this website), is an approach to web development that allows a website to break itself down smoothly across multiple monitor sizes, screen resolutions, and platforms, be it a computer, tablet or mobile device. It allows the developer to create a site that is optimized for each platform, both in navigation, readability and load time.

As you can see when resizing the window (if you are viewing this site on a computer), the layout of the page shifts depending on the size of the screen; with different layouts for content depending on viewing area. Themes (or layouts) such as this, allow for a single site and single look to the site, to be viewed on various devices without the need for additional themes or resizing by the user.

49. When do I need a contextual filter vs. a relationship?

A relationship is a join. Just think of it terms of SQL: - a ‘relationship’ is a JOIN on another table - a ‘filter’ (contextual or not) is a WHERE clause.

Contextual just means the parameter comes from the current context, e.g. part of the URL, something in the session,

50. How to interact with Drupal search system?

The search module lets users search for specific content on your site. You can search both for users and for particular words. When you are on the “content” tab of Search, you will be able to search for words appearing in the default rendering of node content on your site, which would include the default rendering of any CCK fields, Location fields, Taxonomy, etc., as well as comments. When you are on the “users” tab of Search, you will be able to search the user names of registered users on your site, and if you have sufficient permissions, also their email addresses.

51. What is a patch in Drupal and how will we apply patch in drupal?

A patch is a file that consists of a list of differences between one set of files and another. All code changes, additions, or deletions to Drupal core and contributed modules/themes between developers are done through patches. The differences are presented in a structured, standard way, which means that a program (also named patch) can be used to apply the changes to another copy of the original file.

52. How to use preprocess function?

The main role of the preprocessor is to set up variables to be placed within the template (.tpl.php) files. From Drupal 7 they apply to templates and functions, whereas in Drupal 6 preprocess functions only apply to theming hooks implemented as templates. Plain theme functions do not interact with preprocessors.

53. What is Drupal error handling?

Error Handling is a process of detection and finding the resolutions for the errors, this can be programming application errors or communicable errors.

54. What is Drupal Pane module?

Pane module is used to translate the custom panel's pane with optional title that will be stored as variables and it can be translate or edit quickly.

55. What is the use of server field in setup payments?

We should select the server from either of the one i.e. Production or Sandbox.

56. What modules do you always recommend and why?
  • Views - This module is essential in every website I build. It makes displaying lists of content very easy. If you want an image slideshow, a list of blog posts, a list of products, etc., views is the best place to start.
  • Panels - Panels gives you the ability to create custom pages easily. These custom pages can have multiple regions of content. For example, you may want to create a home page that has a Slideshow on the top, and a two column layout below.
  • Ctools - On its own, Ctools does not seem to do a lot. However, it is actually a very powerful framework if you begin developing your own modules. I have used Ctools in the past for developing multi-step forms, modal dialog boxes, and even multi-step forms inside of modal dialog boxes.
  • Token - Tokens are little snippets of text that can be used as replacement patterns. For example, if your website sends out emails and you want to add in the users name, or you want fill in a link path with a node id to provide a helpful link to content, tokens will save the day.
  • Pathauto - The Pathauto module is a necessity for any website that frequently adds new content. It is also especially important if you have a website that allows users to create content using content types. Pathauto simplifies creating clean and search engine friendly URLS for the various content you add to your site.
  • Webform - If you want to provide easy to fill out forms for the visitors of your site, the Webform module will help you out.
  • Rules - Drupal rules will allow you to set up condition actions.
  • Date - This is useful for allowing the easy selections of dates in content types (with a nice date popup). It also integrates nicely with the views module.
  • Quicktabs - Makes it easy to add tabbed content without having to write your own Javascript/Jquery. What more do I have to say?
  • Libraries - Makes organizing your various libraries of functionality easy (see Jquery UI above for an example). Google Analytics - I don’t build a Drupal website without adding Google Analytics. This module makes it very simple. What gets measured, gets improved after all.
57. how to improve DRUPAL performance for anonymous and authenticated users ?
  • Anonymous Traffic: Lighter user, basic configuration and performance tuning should handle more use cases.
  • Authenticated Traffic: Heavier user, can lead to more complex configurations to handle load and performance.
58. Explain the capabilities of views module.

The Views module provides a flexible method for Drupal site designers to control how lists and tables of content (nodes in Views 1, almost anything in Views 2) are presented. Traditionally, Drupal has hard-coded most of this, particularly in how taxonomy and tracker lists are formatted. This tool is essentially a smart query builder that, given enough information, can build the proper query, execute it, and display the results. It has four modes, plus a special mode, and provides an impressive amount of functionality from these modes.

Among other things, Views can be used to generate reports, create summaries, and display collections of images and other content.

59. What are the technical differences between Joomla and Drupal?
  • Joomla only supports one Section and one Category for each content, while you can assign Drupal contents to several Sections/Categories.
  • Joomla does not support multi-site setups, whereas drupal supports multisite setups.
  • Drupal has built-in forum discussion, so you don\'t need to install additional modules.
  • The term Blog in Joomla is not same as blog in Internet dictionary. \'Blog\' term in Joomla is actually a teaser view of contents containing: Title, Introduction and a Read More link. So, in short, \'Blog\' in Joomla terminology is not \'Weblog\'! If one is asking if Joomla supports a \'Blog\' by default, then the answer is yes, but with a different meaning.
  • Comments on contents are not available in Joomla by default, but Drupal supports comments for all content-types by default.
60. Do you keep regular backups?

We should have automated backups running for the database (most important), code, files and server at least once a day (hourly is better).

61. What is drupal panels?

The drupal panels is a module in drupal which allows a drupal website administrator to create customized layouts for multiple uses. At its core it is a drag and drop content manager that lets you visually design a layout and place content within that layout. Integration with other systems allows you to create nodes that use this, landing pages that use this, and even override system pages such as taxonomy and the node page so that you can customize the layout of your site with very fine grained permissions.

62. What is drupal cache?

The core Drupal cache stores assembled pages and blocks for anonymous visitors in the cache tables in the database. Other popular Drupal caching options include boost,memcache, and authcache.

63. What is critical path?

The code that is run when serving a cached page.

64. What is triage?

A new bug or issue is assigned a priority based on its severity, frequency, risk and other predetermined factors, borrowed from medical term triage.

65. Can Drupal work with JavaScript?

Drupal provides methods for implementing JavaScript. Using these methods will help to keep your code clean and to ensure compatibility with the way other modules implement JavaScript.

A couple of simple principles guide Drupal's JavaScript approach: - All pages should be perfectly functional without scripts. JavaScript provides alternatives or supplements, not replacements for standard elements. - No JavaScript is hard-coded into pages. Rather, actions are attached dynamically to page elements--and only if the needed JavaScript support is present.

66. Explain the flow of information between the 5 main layers of Drupal?

Every element of information is called node. At the base of the system is the data pool which is the collection of nodes. Next are the modules that are functional plug-ins. Modules may be drupal core or a contributed item. Blocks and menus form the next layer of drupal. Blocks are output tool. A user can configure blocks to create a display that he wants and show only a few pages. In the next layer, user permissions are determined to the type of users who would be allowed to work on the database. Template, which is the theme of the site, is the last layer. It is made of a combination of XHTML, CSS and PHP.

67. Can you comment on the Scalability factor of Drupal?

There are many Drupal websites which are maintained with over millions of views every day. Drupal has grown very much towards the optimization factor and Drupal is easily scalable across higher bandwidths with efficient and stable platform for management.

68. Explain coding standards in Drupal?

As per the Coding standards, omit the closing ?> tag. Including the closing tag may cause strange runtime issues on certain server setups. (Note that the examples in the handbook will show the closing tag for formatting reasons only and you should not include it in your real code.)

All functions in your module that will be used by Drupal are named {modulename}_{hook}, where "hook" is a pre-defined function name suffix. Drupal will call these functions to get specific data, so having these well-defined names means Drupal knows where to look. We will come to hooks in a while.

69. How to install a new module in Drupal?

After finding and downloading a module, the next step would be to copy it the modules folder. Most people copy the file to the default modules folder here http://sitename.com/drupal/modules this is where all the modules that ship with Drupal are stored so it seems somewhat logical to do this. But this folder is actually meant to store only Drupal's default modules. Instead you should go to http://sitename.com/drupal/sites/all folder, there you will see a readme.txt file. This file will clearly tell you the trick. You just need to create a new folder named modules here. Now copy the modules folder here. That's all, you have successfully installed the module.

Next step would be to enable the module through the Admin interface. To do this navigate to Administer Site Building Modules. Here you will see a list off all installed modules, and our newly installed module will also be listed here. You just have to check the enable check box against the new module and then click the Save Configuration button. That's all.

Advanced
1. Explain Drush, Drupal weight, and Drupal Cron briefly?

Drush is a UNIX scripting interface for Drupal. It is command line shell. It is mainly helpful for those who are mainly worked on command line tools only. Drupal weight tells the priority or order to process the particular function and display of the block or node. Drupal Cron is used to executing the commands or scripts automatically at a particular date and time intervals.

2. What Is Difference Between Diff And Patch?

diff creates patch In simple terms, the diff command is used to compare differences between two versions of a file. The resulting file is called a patch, and typically is given (by the user) a “.patch” suffix.

This patch file then can be used on other copies of the “old” file by using the patch command, thus updating their “old” file(s) to match the “new” file(s).

Why you would use diff When might one use diff to create a patch file? Let’s say you are customizing a module to fix a bug, and have saved a new version of the module. How will you pass on your bug fix to others? Simply passing on your version of the module may not work, because it’s quite possible someone else has modified some other aspect of the code at the same time and you both would be overwriting each others’ changes.

So instead, what you do is run diff between the two files, and then upload the resulting patch — which others can then apply to their files using the patch command. (And you can apply other people’s patches against your files, without losing your own changes.).

The added benefit of this type of workflow is that changes to the code can easily be tracked — and undone, if necessary — which is essential in a community-developed project such as Drupal.

3. What is difference between innodb and myIsam?

First major difference I see is that InnoDB implements row-level lock while MyISAM can do only a table-level lock. You will find better crash recovery in InnoDB. However, it doesn’t have FULLTEXT search indexes, as does MyISAM. InnoDB also implements transactions, foreign keys and relationship constraints while MyISAM does not.

4. What is difference between update and alter query?

ALTER is a DDL (Data Definition Language) statement. Whereas UPDATE is a DML (Data Manipulation Language) statement. One is used to update the structure of the table (add/remove field/index etc). Whereas UPDATE is used to update data.

Want to test this skill? Checkout Adaface assessments

Drupal Test

View Test