Drupal Study Set

Home > Preview

The flashcards below were created by user caldreaming on FreezingBlue Flashcards.


  1. Name and describe the 5 conceptual layers in a Drupal system;
    The five layers, starting from the bottom layer, are as follows:

    1) Data (nodes, etc.). Before anything can be displayed on the site, it must be input as data.

    2) Modules. Modules are functional plugins that are either part of the Drupal core or are contributed modules that build on Drupal’s core functionality.

    3) Blocks and menus.  Blocks can be used to present anything, so just about any piece of content on a Drupal site (other than main content, breadcrumbs, and primary/secondary menus) is usually a block. Blocks are an extensible core feature of Drupal with a simple API provided by the block module. Blocks are similar to “widgets” in content management systems, but are highly generalized.  Menus are a collection of links (menu items) used to navigate a website. The Menu module provides an interface to control and customize the menu system that comes with Drupal. By default, new menu items are placed inside a built-in menu labeled Navigation, but administrators can also create custom menus.

    4) User permissions. User permissions are defined for various roles and users are assigned to these roles in order to grant them the defined permissions.

    5) Themes and templates. The top conceptual layer of the drupal architecture is the theme. This consists primarily of XHTML and CSS, with some PHP variables intermixed, so Drupal-generated content can go in the appropriate spots. Also included with each theme is a set of functions that can be used to override standard functions in the modules in order to provide complete control over how the modules generate their markup at output time. A theme may contain one or more templates, depending on the complexity of the site and the way it has been designed.
  2. What is Drupal's taxonomy system and what are some of it's 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.
  3. Describe the Field API that was introduced into core in Drupal 7;
    The Field API allows custom data fields to be attached to Drupal entities and takes care of storing, loading, editing, and rendering field data. Any entity type (node, user, etc.) can use the Field API to make itself “fieldable” and thus allow fields to be attached to it. Other modules can provide a user interface for managing custom fields via a web browser as well as a wide and flexible variety of data type, form element, and display format capabilities.

    The Field API defines two primary data structures, Field and Instance, and the concept of a Bundle. A Field defines a particular type of data that can be attached to entities. A Field Instance is a Field attached to a single Bundle. A Bundle is a set of fields that are treated as a group by the Field Attach API and is related to a single fieldable entity type.

    For example, suppose a site administrator wants Article nodes to have a subtitle and photo. Using the Field API or Field UI module, the administrator creates a field named ‘subtitle’ of type ‘text’ and a field named ‘photo’ of type ‘image’. The administrator (again, via a UI) creates two Field Instances, one attaching the field ‘subtitle’ to the ‘node’ bundle ‘article’ and one attaching the field ‘photo’ to the ‘node’ bundle ‘article’. When the node system uses the Field Attach API to load all fields for an Article node, it passes the node’s entity type (which is ‘node’) and content type (which is ‘article’) as the node’s bundle. field_attach_load() then loads the ‘subtitle’ and ‘photo’ fields because they are both attached to the ‘node’ bundle ‘article’.

    Field definitions are represented as an array of key/value pairs.

    Note that the above answer has been excerpted from the Drupal API Documentation, where more information can be found.
  4. 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 comments 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.
  5. Describe the features and uses of the Views module;
    Using the Views module, you can fetch content from the database of your site and present it to the user as lists, posts, galleries, tables, maps, graphs, menu items, blocks, reports, forum posts etc. Different content types including nodes, users, and other bundles can be displayed.

    Views UI, a submodule within Views, provides a graphical interface underneath which lies a powerful SQL query builder that can access virtually any information in your database and display it in any format.

    Different displays can present the query results as pages with fixed URLs on your site (or URLs accepting arguments), blocks, feeds, or panel panes.

    You can also use Views to present related content or implement contextual filters. For example, you can display a list of users along with links to the content they have created and/or you can display customized content to a user according to their user ID.
  6. What are the appropriate use cases for Drupal as opposed to lower-level framework like Ruby-on-Rails?
    Drupal is a Content Management System, of which there are hundreds. It happens to be written in PHP, but it’s modular design and large collection of available modules and themes make it possible to design and implement a large variety of web sites without writing a line of code. Most importantly, though, it is fundamntally a CMS. The further your site’s needs are from the CMS sweet-spot, the less likely it is that Drupal will be your best choice.

    Rails is a general purpose web application framework for Ruby. It’s designed to help programmers be more productive in building web sites of all types, not just CMSs. And note that it’s for “programmers”. Unless you intend to write server-side code, you can’t hope to get much done with just Rails alone (but if you do intend to write code, both Ruby and Rails are known to be very productive).
  7. What are the key features of Drupal?
    There are two key features of Drupal;

    Upload Module: It enables users to attach different types of files to node types of your liking.

    Embedding: It enables to embed media within nodes that are hosted on your websites.
  8. Explain how caching work 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
  9. What is a patch?
    A patch is a file that contains a list of differences between one set of files, and another.  Through patches, all the changes in code like additions or deletions to Drupal core can be made. Also, patches can be used to make changes to another copy of the original or main file.
  10. What is PDO in Drupal?
    PDO is an acronym for PHP Data Objects. PDO is a lean, consistent way to access databases. This means developers can write portable code much easier. PDO is not an abstraction layer like PearDB. PDO is a more like a data access layer which uses a unified API (Application Programming Interface).

    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.

    Most Drupal database SELECT queries are performed by a call to db_query() or db_query_range(). Module authors should also consider using the PagerDefault Extender for queries that return results that need to be presented on multiple pages
  11. Describe the Drupal database form;
    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.
  12. What is DRUSH in Drupal?
    DRUSH is a command line shell and UNIX scripting interface for Drupal
  13. What is a Drupal module and what are some examples?
    Modules are like plugin for your site.  It allows you to add different functions to your site such as polls, contact forms and search fields.  Some of the modules recommended are;

    • Views
    • Token
    • Ctools
    • Quicktabs
    • Pathauto
  14. Explain what Drupal distributions are and when to use them?
    Distributions are full copies of Drupal, which includes Drupal Core, along with additional software as modules, themes, libraries and installation profiles. You can use distributions for;

    • Evaluating Drupal
    • Demoing Drupal
    • Learning Drupal
    • Quickly binding Site
  15. List out the SEO modules available in Drupal?
    • Pathauto
    • Meta tags/ Node words
    • Service Links
    • Google Analytics
    • Related Links
    • Search 404
    • Site map
    • Url list
  16. Explain what is Drupal weight?
    The term Drupal weight is used to describe the priority or order in which the function is processed, or block/ node is displayed.A heavier (+10) weights will appear lower in lists while a lower weight (-10) will float to the top of lists.
  17. Explain what is Drupal cron?
    To execute commands or scripts automatically at specified time and date intervals, you have to use Drupal cron.
  18. How does Drupal use databases and which databases are supported?
    Drupal stores its information in the database like individual pages, registered users and so on.  For your Drupal site, database forms the back end; it supports MySQL /MariaDB, PostgreSQL and in Drupal 7, SQLite.
  19. Explain what is 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.
  20. Explain what is the use of Ctools in Drupal?
    This suite is a set of APIs and tools, and it makes easier to handle AJAX requests and tell the client what to do with them.
  21. What are the files required for theme and module?
    Theme: style.css , page.tpl.php , template.php, block.tpl.php

    Module: modulename.info , modulename.module , optional modulename.install
  22. Explain how you can drop a table using a module?
    To drop the table you can use db_drop_table in install file.

    • function db_drop_table($table) {
    • return Database::getConnection()->schema()->dropTable($table);
    • }
  23. 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.
  24. What are hooks in Drupal ?
    hooks are drupal api code which allows module to interact with the Drupal core.Drupal’s module system is based on the concept of “hooks”. A hook is a PHP function that is named foo_bar(), where “foo” is the name of the module (whose file name is thus foo.module) and “bar” is the name of the hook. Each hook has a defined set of parameters and call back functions to trigger functionality on specific event.  For example if you use form with submit button, on submit event you can have specific functionality.
  25. What is template.php in drupal?
    If you want to override a theme function not included in the basic list (block, box, comment, node, page), you need to tell PHPTemplate about it.To do this, you need to create a template.php file in your theme's directory. This file must start with a PHP opening tag but the close tag is not needed and it is recommended that you omit it. Also included in the file are stubs for the theme overrides. These stubs instruct the engine what template file to use and which variables to pass to it.
  26. What are the system requirements for drupal 7 and drupal 8?
    • Drupal 7:
    • Database: MySQL 5.0.15 or PostgreSQL 8.3
    • PHP Version 5.2 or higher
    • PHP Memory: 40M - 64M

    • Drupal 8:
    • Database:
    • MySQL 5.5.3/MariaDB 5.5.20/Percona Server 5.5.8 or higher with PDO and an InnoDB-compatible primary storage engine,PostgreSQL 9.1.2 or higher with PDO,SQLite 3.6.8 or higher
  27. Why you shouldn't modify core drupal files?
    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.
  28. Explain Drupal Architecture;
    Drupal is based on less publicized but still widely used architecture Presentation Abstraction Control, or PAC. The menu system acts as the Controller. It accepts input via a single source (HTTP GET and POST), routes requests to the appropriate helper functions, pulls data out of the Abstraction (nodes and, from Drupal 5 onwards, forms), and then pushes it through a filter to get a Presentation of it (the theme system). It even has multiple, parallel PAC agents in the form of blocks that push data out to a common canvas (page.tpl.php).
  29. What is Bootstrap in drupal?
    The bootstrap is the CPU (central processing unit) of Drupal. In other interactive software environments this is sometimes called the event loop. Drupal's core is a bit like that. It sits around waiting for a path request, and then starts processing that request.
  30. What is drupal trigger?
    Defined by modules, triggers typically result from some characteristic change in an entity maintained by a module. Some examples of triggers are: deleting content, adding a comment that a user has logged in, or adding a term. In addition to the triggers provided by the Drupal core modules, triggers may be added by installed contributed modules.

Card Set Information

Author:
caldreaming
ID:
317806
Filename:
Drupal Study Set
Updated:
2016-03-24 03:39:05
Tags:
drupal cms php data modules blocks menus themes templates
Folders:

Description:
Study of Drupal for interview questions
Show Answers:

Home > Flashcards > Print Preview