an introduction to drupal & how to use it by sanket jain

42
Say Hi , To Drupal

Upload: innoraft

Post on 15-Apr-2017

167 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: An Introduction to Drupal & How to Use It by Sanket Jain

Say Hi , To Drupal

Page 2: An Introduction to Drupal & How to Use It by Sanket Jain

How Web Works?

Page 3: An Introduction to Drupal & How to Use It by Sanket Jain

How Web Works ?

The server: This is the “where” – It tells your computer the name of the computer serving the requested page.

The path: This is the “what” – It indicates which page you’re interested in accessing on the requested website.

The protocol (HTTP stands for HyperText Transfer Protocol) - This is the “how”- It tells your computer which conventions to use when talking to the computer serving the requested page.

Page 4: An Introduction to Drupal & How to Use It by Sanket Jain

What is CMS?A content management system (CMS) is a computer application that supports the creation and modification of digital content using a common user interface and thus usually supporting multiple users working in a collaborative environment.

Page 5: An Introduction to Drupal & How to Use It by Sanket Jain

What does using a Content Management System (CMS) buy you?

It’s easy for the non-technically minded.

Page 6: An Introduction to Drupal & How to Use It by Sanket Jain

What does using a Content Management System (CMS) buy you?

It allows multiple users.

Page 7: An Introduction to Drupal & How to Use It by Sanket Jain

What does using a Content Management System (CMS) buy you?

It streamlines scheduling.

Page 8: An Introduction to Drupal & How to Use It by Sanket Jain

What does using a Content Management System (CMS) buy you?

It improves site maintenance.

Page 9: An Introduction to Drupal & How to Use It by Sanket Jain

What does using a Content Management System (CMS) buy you?

Design changes are simple.

Page 10: An Introduction to Drupal & How to Use It by Sanket Jain

What does using a Content Management System (CMS) buy you?

It helps you manage content.You’re in control.

Page 11: An Introduction to Drupal & How to Use It by Sanket Jain

What are your options?Many Content Management Systems (CMS) are available:

DrupalJoomlaWordPressExpression EngineWebGUIPlone

Page 12: An Introduction to Drupal & How to Use It by Sanket Jain

DRUPAL

Page 13: An Introduction to Drupal & How to Use It by Sanket Jain

Drupal× Drupal is a modular framework written in the

PHP scripting language that contains a CMS, a module system, and an API for rapid development of websites and web applications.

× It can be used to create a web blog, e-commerce store, photo gallery, or social networking website.

Page 14: An Introduction to Drupal & How to Use It by Sanket Jain

Open SourceFree and Open Source softwareYou can modify the software

Why Drupal?Community Large and vibrant community of users and developersMany people testing it, finding security issues, etc.

ArchitectureIt has Flexible architecture, You can create your own modules for custom features and own design

StandardsCore software is PHP/MySQL, giving many hosting options.Output uses XHTML, CSS, JavaScript, so compatible with most browsers

Page 15: An Introduction to Drupal & How to Use It by Sanket Jain

Drupal Community

Forums on Drupal.org ( http://drupal.org/forum )

IRC channels

Drupal Groups at http://groups.drupal.org

Regional and language-based websites

Camps and conferences

Page 16: An Introduction to Drupal & How to Use It by Sanket Jain

Disadvantages of Drupal× Flexibility = Complexity

× May not be the best alternative for simple or single-functionality sites

× Takes some time to learn× Takes some time to set up

× Free and Open Source = No guarantees× Free support options may or may not be

responsive.× Features you need may or may not be

available.× Your feature requests and bug reports may

or may not be acted upon

Page 17: An Introduction to Drupal & How to Use It by Sanket Jain

Lets Dive into Drupal !!

Page 18: An Introduction to Drupal & How to Use It by Sanket Jain

PHP× Drupal is written in PHP

× Web application scripting language

× Open source language sponsored by Zend

× PHP is actually written in C

× Easy to learn

× Great for rapid application development

× One of the most popular languages for web applications

Page 19: An Introduction to Drupal & How to Use It by Sanket Jain

How PHP Works× PHP is run by the web server

× PHP code embedded in web pages is compiled and interpreted when the page is requested

× Uncompiled code means portability and rapid refactoring

× PHP is truly dynamic

× Even variable names can be dynamic

× Code can include other scripts or libraries

Page 20: An Introduction to Drupal & How to Use It by Sanket Jain

Data Persistence× Like most web applications Drupal needs to

store data× Data is in a database (MySQL)× Database means content changes happen in

the database rather than in code or on files× Makes for easy portability and backup× Access via code, or directly at command line× SQL is a standard, popular, well understood

language

Page 21: An Introduction to Drupal & How to Use It by Sanket Jain

“You don’t learn to walk by following rules. You learn by doing and falling over.

Page 22: An Introduction to Drupal & How to Use It by Sanket Jain

How to install Drupal× You need a database and a web server with PHP

already running

× Create a database for the Drupal site

× Download the Drupal code from Drupal.org

× Point web browser and Drupal root and the rest is automated

Page 23: An Introduction to Drupal & How to Use It by Sanket Jain

Composition of Drupal× Drupal includes a common set of files used to

“bootstrap” Drupal.

× Set up database connections, provide authentication, present output, etc.

× Drupal has additional modules

× These are dynamically included depending on configuration

× 33 modules are included in the Drupal core

Page 24: An Introduction to Drupal & How to Use It by Sanket Jain

Running Drupal× Every Drupal request goes to index.php, even if

the URL looks like a different location

× Index.php does bootstrapping× checks database for enabled modules× loads modules that are appropriate× checks permissions× queries database for content× applies theme× renders the page

Page 25: An Introduction to Drupal & How to Use It by Sanket Jain

Drupal file-system structure× /includes - Drupal core PHP files

× /misc - Various image and js files

× /modules - Core modules

× /profiles - Profile settings (own tree)

× /scripts - Maintenance non-web scripts

× /sites - Site definitions

× /themes - Core themes

Page 26: An Introduction to Drupal & How to Use It by Sanket Jain

Top Level Files× Several critical php files:

× cron.php - web interface for scheduled tasks

× index.php - everything flows through index.php

× install.php - installation file × update.php - update install (for new

modules)× xmlrpc.php - provide remote

procedures (opt.)× Various other text files

Page 27: An Introduction to Drupal & How to Use It by Sanket Jain

Drupal terminology× Drupal uses a lot of words that have very

specific meaning:

× Module

× Theme

× Block

× Node

× Menu

Page 28: An Introduction to Drupal & How to Use It by Sanket Jain

What is a “module”× Modular piece of code that extends Drupal

× Uses the Drupal API

× Just a set of functions defined in the Drupal core (or other modules)

× Provide drop in functionality

× Can be enabled/disabled (in the database)

× Provide additional functionality without altering the Drupal core

Page 29: An Introduction to Drupal & How to Use It by Sanket Jain

Themes× Drupal takes a similar approach to display

× Display is a separate area of Drupal

× Many components of Drupal are defined in the “theme”

× Themes are comprised of HTML, CSS, PHP and imagery

× Themes utilize the same hierarchy as modules

× Theme files are called “templates”

Page 30: An Introduction to Drupal & How to Use It by Sanket Jain

Advantage of Themes

× Themes follow a convention (standardization)

× Can easily be swapped out to quickly change or upgrade the look of a site

× Useful because theme developers need not necessarily be Drupal developers (or PHP programmers)

× Can provide powerful filters to screen output in Drupal

Page 31: An Introduction to Drupal & How to Use It by Sanket Jain

Blocks× Blocks are pieces of content placed in regions of

Drupal pages

× Blocks are arbitrary pieces of content

× Usually the stuff that appears in sidebar, header and footer content

× Blocks can be content, forms, special lists, polls, or arbitrary HTML

× Themes define regions for blocks

Page 32: An Introduction to Drupal & How to Use It by Sanket Jain

Content Types× “Page” and “Article” are two default content

types

× The titles are arbitrary

× Content types define input fields and how the content is displayed

× New content types can easily be created

× Content type creation should follow careful consideration of site architecture and purpose

Page 33: An Introduction to Drupal & How to Use It by Sanket Jain

Nodes× Drupal organizes most content around the

concept of a “node”

× Nodes are just pieces of content

× Only a few things aren't nodes – users, groups, modules, and themes being the main ones

× Other stuff, from calendar events, to RSS feed items, to page content is a node

Page 34: An Introduction to Drupal & How to Use It by Sanket Jain

How Nodes Work× Nodes support versioning

× As a result node content is stored in the node_revisions table

× The Drupal “node” table only stores metadata about nodes

× Nodes can have various modules applied to them to adjust input and output handling

Page 35: An Introduction to Drupal & How to Use It by Sanket Jain

Organizing Nodes× There are all sorts of nodes, how do we keep them

organized?

× Drupal supports a categorization of nodes that allows for various node “definitions”

× Content types allow Drupal users to define various fields for different types of nodes

× For instance, one node might include a URL, another a title

× Using “fields” specific to node types allows sorting and display (rather than having the data stuck in a node “body”)

Page 36: An Introduction to Drupal & How to Use It by Sanket Jain

Taxonomy

× Taxonomy is another way to organize content

× Taxonomy are “tags” that are applied to content

× “Vocabularies” set up as taxonomies

× Vocabularies then contain terms

× Taxonomies can be extended and used for various rules in the Drupal back end

× Taxonomy can also be used for display purposes

Page 37: An Introduction to Drupal & How to Use It by Sanket Jain

Menus× Drupal menu system is also fairly arbitrary

× Display and positioning is controlled by themes

× Three default menus:

× Navigation

× Primary links

× Secondary links

Page 38: An Introduction to Drupal & How to Use It by Sanket Jain

Users and Roles× Drupal allows users to create accounts

× Users are assigned to roles

× Create a new role if required.

× By default three roles are defined in Drupal

× Authenticated User

× Anonymous User

× Administrator

Page 39: An Introduction to Drupal & How to Use It by Sanket Jain

Permissions× Drupal utilizes a Role Based Access Control

(RBAC) system

× Users are assigned to roles, roles receive permissions

× Permissions are set through the Drupal administration interface

× Uid 1 user (created during install) has all permissions

× When in doubt: it's a permissions issue :)

Page 40: An Introduction to Drupal & How to Use It by Sanket Jain

Got Drupal, now what?× Drupal out of the box doesn't look like much

× Drupal is extremely flexible but requires a lot of configuration

× Changing Drupal after deployment is a pain, so you must plan carefully

× Drupal is a framework that doesn't make assumptions about use cases

× Drupal requires lots of tweaks to enable functionality the way you want it

Page 41: An Introduction to Drupal & How to Use It by Sanket Jain

Next Session× More than Basics in Drupal

× Blogs

× Comments

× Dynamic Listing of your Content

× Configure a Drupal 8 site

Page 42: An Introduction to Drupal & How to Use It by Sanket Jain

Thanks!Any questions?

You can find me [email protected]