SlideShare a Scribd company logo
WHO IS THIS GUY?
• @iztok
www.twitter.com/iztok
• Drupal site builder, themer
and developer
• Passion about UX and design
• Drupal consultant
www.iztoksmolic.com
• Manager at Agile Drop
www.agiledrop.com
• Drupal Slovenia Association
organizing meetups in Ljubljana
THE COMMON WRONG DISPOSITIONS
• I know MySQL/PHP, I know Drupal
• There is a module for anything like in Joomla/Wordpress
• Drupal has a long and steep learning curve
After 5 years I am here.
1. NOT KNOWING THE FURNITURE
Designer must be
aware of the
common elements.
Check this blog post
from Chapter Three
2. OVER-DESIGNING FORMS
• HTML markup is predefined for form
• altering markup requires development skills
Solution
• Style forms: http://drupal.org/project/uniform
• Group
fields: http://drupal.org/project/field_group
• Add element (and wrappers) with
hook_form_alter
3. BAD CONTENT ARCHITECTURE DECISIONS
• using too much content types
(e.g. is Article really so different from Public release? Maybe
we can use category to separate them)
• not using node types
(e.g. instead of listing staff as a table in the Page body,
maybe build the page with Views and content type Staff
member)
No real formula, just practice and experiences.
4. WRONG FOLDER STRUCTURE
If using single site installation (one Drupal core, one
website) put:
• themes in /sites/default/themes
• modules from drupal.org in /sites/default/modules/contrib
• custom modules in /sites/default/modules/custom
Do not put themes and modules in the folder on the root
level.
Never. You can use all folder instead of default – your call.
More about this: http://drupal.org/node/120641
5. CHOOSING UNSUPPORTED MODULE
• Check the usage/download counter, last update, open
issues counter, all that can give a idea about the module
status.
• Read the description, in many cases authors let the
people know that module will be deprecated in favor of
some other more comprehensive module.
6. ORPHANED MODULES
• Clean your environment, or even better, test modules on
other installations!
• Leaving old, unused modules can confuse you latter on,
not to mention other developers.
7. USING DEFAULT BLOCKS SYSTEM
Use default blocks system
only if project is very very
simple.
A couple of attempts were
made to improve block
system, I bet on the
following two:
• Context, which is block
system on steroids
• Panels, introduces new
block-like concept
8. PUTTING CONTENT/CODE IN BLOCKS
Default blocks allow user generated content, but you can't set permissions
for editing different blocks
• Bean, you can add fields to different blocks types, which have separate
permissions (like content types do)
• Boxes, blocks with a unique machine names
9. HACKING CORE/CONTRIB THEME
if you decided to use a theme from core or from drupal.org,
there is no need to go and edit its code. Make a sub-
theme
• more about creating sub-
theme: http://drupal.org/node/225125
10. USING PAGE TEMPLATES FOR EACH SUB PAGE
Try to omit page--xxx-tpl.php templates. It duplicates the
code, and makes maintenance difficult.
Try using Context Layout or Panels if variations are really
needed.
Panels have dragable user
interface system and a
layout generator tool.
No code needed!
11. LOGIC IN TEMPLATES
SQL queries and calculations don't belong to the template
layer. If logic is not so advance it can be placed in the
preprocess function in template.php file.
• About process &
preprocess: http://drupal.org/node/223430
12. USING TOO COMMON CSS TARGETING
Drupal outputs a LOT of markup with specific HTML classes
and ids. Knowing which class is appropriate to target is
the key.
• Ids are usually unique identifiers for blocks/nodes/views
• views have classes with view name and display name
seperated. Don’t target displays (e.g. .views-display-id-
block)
• .items-list, .content, .view-content etc. are used all over
your Drupal site, don’t use for specific targeting.
13. NOT USING THE BASIC DRUPAL FUNCTIONS
Drupal comes with some very handy functions, we should
use them
- l() and url() - in contrast of hardcoded relative URL address
can outputs aliased URL path
- base_path(), returns base URL of the Drupal installation
- theme() functions like theme('image_style',array()) to out
put styled image
14. CODING
There is a 80% possibility that what you want to build can be
build with a combination of modules.
Usual suspects:
• Views (your UI for SQL queries)
• views_field_view, views_bulk_operations
• Rules (executing commands on events)
• Panels (overriding default paths like node/%nid)
• Filed collection (join fields into one field)
15. HACKING CORE AND CONTRIB MODULES
Fixing code directly in the module files makes the website
impossible to update. Instead Drupal provides hooks and
preprocess functions.
• More about hooks:
http://api.drupal.org/api/drupal/includes!module.inc/group
/hooks/7
16. NOT USING API FUNCTIONS
• Database API, dynamic queries:
http://drupal.org/node/310075
• Entity query API: http://drupal.org/node/1343708
Bets to learn from examples:
http://drupal.org/project/examples
17. NOT KNOWING HOW TO DEBUG
When you would usually use print_r() to get the content of a array
or object to your browser, Drupal has Devel
(http://drupal.org/project/devel):
• dpm($variable) – prints content of variable in human friendly
way
You can also store info to a log: http://drupal.org/project/object_log
Can’t find the right template?
Use Devel Themer (http://drupal.org/project/devel_themer)
18. NOT RESPECTING THE CODING STANDARDS
Different approaches and coding styles make code less
organized and makes the job for other developers mode
difficult.
• two spaces indentation
• $var = foo($bar, $baz, $quux);
• $some_array = array('hello', 'world', 'foo' => 'bar');
• <?php print $title; ?>
19. FORGETTING ABOUT BACK-END UX
Drupal is criticized for having a bad user experience for end
users.
I argue that with the argument that since Drupal is a
framework, back end should be part of out efforts when
building a website.
20. FORGETTING ABOUT YOU DRUPAL WEBSITE
Drupal needs love even after you have finished your website. Keeping core
and modules updates makes it easier to upgrade at some time and
keeps the system safe.
• Read books
• Get a mentor
• Fail & learn
from it

More Related Content

What's hot

Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal BasicsJuha Niemi
 
Drupal For Dummies
Drupal For DummiesDrupal For Dummies
Drupal For Dummies
Koen Delvaux
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
mayank.grd
 
Introduction to drupal
Introduction to drupalIntroduction to drupal
Introduction to drupal
mayank.grd
 
Complex Content Structures and Workflow with Drupal
Complex Content Structures and Workflow with DrupalComplex Content Structures and Workflow with Drupal
Complex Content Structures and Workflow with Drupal
Balance Interactive
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal Concepts
Micky Metts
 
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHPDeployer - Deployment tool for PHP
Deployer - Deployment tool for PHP
hernanibf
 
Drupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using DrupalDrupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using Drupal
Vibrant Technologies & Computers
 
Introduction to Drupal
Introduction to DrupalIntroduction to Drupal
Introduction to Drupal
sdmaxey
 
Drupal
DrupalDrupal
An Introduction to Drupal
An Introduction to DrupalAn Introduction to Drupal
An Introduction to Drupal
Tobias Ratschiller
 
What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8
Suzanne Dergacheva
 
Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Ivan Zugec
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp Ottawa
Suzanne Dergacheva
 
Drupal architectures for flexible content - Drupalcon Barcelona
Drupal architectures for flexible content - Drupalcon BarcelonaDrupal architectures for flexible content - Drupalcon Barcelona
Drupal architectures for flexible content - Drupalcon Barcelona
hernanibf
 
Getting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundationGetting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundation
Melanie Archer
 
The Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualThe Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 Multilingual
Suzanne Dergacheva
 
Intro to drupal
Intro to drupalIntro to drupal
Intro to drupal
hernanibf
 
Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8
Exove
 

What's hot (20)

Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal Basics
 
Drupal For Dummies
Drupal For DummiesDrupal For Dummies
Drupal For Dummies
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
 
Introduction to drupal
Introduction to drupalIntroduction to drupal
Introduction to drupal
 
Complex Content Structures and Workflow with Drupal
Complex Content Structures and Workflow with DrupalComplex Content Structures and Workflow with Drupal
Complex Content Structures and Workflow with Drupal
 
Beginners Guide to Drupal
Beginners Guide to DrupalBeginners Guide to Drupal
Beginners Guide to Drupal
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal Concepts
 
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHPDeployer - Deployment tool for PHP
Deployer - Deployment tool for PHP
 
Drupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using DrupalDrupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using Drupal
 
Introduction to Drupal
Introduction to DrupalIntroduction to Drupal
Introduction to Drupal
 
Drupal
DrupalDrupal
Drupal
 
An Introduction to Drupal
An Introduction to DrupalAn Introduction to Drupal
An Introduction to Drupal
 
What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8
 
Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp Ottawa
 
Drupal architectures for flexible content - Drupalcon Barcelona
Drupal architectures for flexible content - Drupalcon BarcelonaDrupal architectures for flexible content - Drupalcon Barcelona
Drupal architectures for flexible content - Drupalcon Barcelona
 
Getting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundationGetting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundation
 
The Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualThe Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 Multilingual
 
Intro to drupal
Intro to drupalIntro to drupal
Intro to drupal
 
Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8
 

Viewers also liked

Top 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies makeTop 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies make
Iztok Smolic
 
Web Mapping with Drupal
Web Mapping with DrupalWeb Mapping with Drupal
Web Mapping with DrupalRanel Padon
 
Drupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsDrupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 months
Iztok Smolic
 
Fields in Core: How to create a custom field
Fields in Core: How to create a custom fieldFields in Core: How to create a custom field
Fields in Core: How to create a custom field
Ivan Zugec
 
Prezentacja komunikacji niewerbalnej
Prezentacja komunikacji niewerbalnejPrezentacja komunikacji niewerbalnej
Prezentacja komunikacji niewerbalnejbulinek
 
Attacking Drupal
Attacking DrupalAttacking Drupal
Attacking Drupal
Greg Foss
 
Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8
Iztok Smolic
 
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - WebinarCreating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
Suzanne Dergacheva
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Suzanne Dergacheva
 
Drupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of LightningDrupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of Lightning
Acquia
 
Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)
Sergiu Savva
 
5 Important Tools for Drupal Development
5 Important Tools for Drupal Development5 Important Tools for Drupal Development
5 Important Tools for Drupal Developmentjcarrig
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
Natasha Murashev
 

Viewers also liked (14)

Top 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies makeTop 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies make
 
Web Mapping with Drupal
Web Mapping with DrupalWeb Mapping with Drupal
Web Mapping with Drupal
 
20130417124022809
2013041712402280920130417124022809
20130417124022809
 
Drupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsDrupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 months
 
Fields in Core: How to create a custom field
Fields in Core: How to create a custom fieldFields in Core: How to create a custom field
Fields in Core: How to create a custom field
 
Prezentacja komunikacji niewerbalnej
Prezentacja komunikacji niewerbalnejPrezentacja komunikacji niewerbalnej
Prezentacja komunikacji niewerbalnej
 
Attacking Drupal
Attacking DrupalAttacking Drupal
Attacking Drupal
 
Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8
 
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - WebinarCreating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
 
Drupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of LightningDrupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of Lightning
 
Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)
 
5 Important Tools for Drupal Development
5 Important Tools for Drupal Development5 Important Tools for Drupal Development
5 Important Tools for Drupal Development
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Similar to Top 20 mistakes you will make on your 1st Drupal project

Drupal module development
Drupal module developmentDrupal module development
Drupal module developmentRachit Gupta
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 module
tedbow
 
Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!
Adelle Frank
 
Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2
Anil Sagar
 
Rapid site production with Drupal
Rapid site production with DrupalRapid site production with Drupal
Rapid site production with Drupal
Rob Sawyer
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
Philip Norton
 
The Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueThe Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices Catalogue
Alexandre Israël
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
Acquia
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
Angela Byron
 
Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs
Ahmad Mohamad Zain
 
Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
Vibrant Technologies & Computers
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
Matt Weaver
 
Intro to Drupal Module Developement
Intro to Drupal Module DevelopementIntro to Drupal Module Developement
Intro to Drupal Module Developement
Matt Mendonca
 
Using Features
Using FeaturesUsing Features
Using Features
Alexandru Badiu
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 version
David Lanier
 
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...
Anson Han
 
Drupal training-1-in-mumbai
Drupal training-1-in-mumbaiDrupal training-1-in-mumbai
Drupal training-1-in-mumbai
vibrantuser
 
Drupal
DrupalDrupal
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp London
hernanibf
 

Similar to Top 20 mistakes you will make on your 1st Drupal project (20)

Drupal module development
Drupal module developmentDrupal module development
Drupal module development
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 module
 
Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!
 
Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2
 
Rapid site production with Drupal
Rapid site production with DrupalRapid site production with Drupal
Rapid site production with Drupal
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
The Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueThe Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices Catalogue
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 
Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs
 
Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
 
Intro to Drupal Module Developement
Intro to Drupal Module DevelopementIntro to Drupal Module Developement
Intro to Drupal Module Developement
 
Using Features
Using FeaturesUsing Features
Using Features
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 version
 
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...
 
72d5drupal
72d5drupal72d5drupal
72d5drupal
 
Drupal training-1-in-mumbai
Drupal training-1-in-mumbaiDrupal training-1-in-mumbai
Drupal training-1-in-mumbai
 
Drupal
DrupalDrupal
Drupal
 
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp London
 

Recently uploaded

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 

Top 20 mistakes you will make on your 1st Drupal project

  • 1.
  • 2. WHO IS THIS GUY? • @iztok www.twitter.com/iztok • Drupal site builder, themer and developer • Passion about UX and design • Drupal consultant www.iztoksmolic.com • Manager at Agile Drop www.agiledrop.com • Drupal Slovenia Association organizing meetups in Ljubljana
  • 3. THE COMMON WRONG DISPOSITIONS • I know MySQL/PHP, I know Drupal • There is a module for anything like in Joomla/Wordpress • Drupal has a long and steep learning curve After 5 years I am here.
  • 4.
  • 5. 1. NOT KNOWING THE FURNITURE Designer must be aware of the common elements. Check this blog post from Chapter Three
  • 6. 2. OVER-DESIGNING FORMS • HTML markup is predefined for form • altering markup requires development skills Solution • Style forms: http://drupal.org/project/uniform • Group fields: http://drupal.org/project/field_group • Add element (and wrappers) with hook_form_alter
  • 7. 3. BAD CONTENT ARCHITECTURE DECISIONS • using too much content types (e.g. is Article really so different from Public release? Maybe we can use category to separate them) • not using node types (e.g. instead of listing staff as a table in the Page body, maybe build the page with Views and content type Staff member) No real formula, just practice and experiences.
  • 8.
  • 9. 4. WRONG FOLDER STRUCTURE If using single site installation (one Drupal core, one website) put: • themes in /sites/default/themes • modules from drupal.org in /sites/default/modules/contrib • custom modules in /sites/default/modules/custom Do not put themes and modules in the folder on the root level. Never. You can use all folder instead of default – your call. More about this: http://drupal.org/node/120641
  • 10. 5. CHOOSING UNSUPPORTED MODULE • Check the usage/download counter, last update, open issues counter, all that can give a idea about the module status. • Read the description, in many cases authors let the people know that module will be deprecated in favor of some other more comprehensive module.
  • 11. 6. ORPHANED MODULES • Clean your environment, or even better, test modules on other installations! • Leaving old, unused modules can confuse you latter on, not to mention other developers.
  • 12. 7. USING DEFAULT BLOCKS SYSTEM Use default blocks system only if project is very very simple. A couple of attempts were made to improve block system, I bet on the following two: • Context, which is block system on steroids • Panels, introduces new block-like concept
  • 13. 8. PUTTING CONTENT/CODE IN BLOCKS Default blocks allow user generated content, but you can't set permissions for editing different blocks • Bean, you can add fields to different blocks types, which have separate permissions (like content types do) • Boxes, blocks with a unique machine names
  • 14.
  • 15. 9. HACKING CORE/CONTRIB THEME if you decided to use a theme from core or from drupal.org, there is no need to go and edit its code. Make a sub- theme • more about creating sub- theme: http://drupal.org/node/225125
  • 16. 10. USING PAGE TEMPLATES FOR EACH SUB PAGE Try to omit page--xxx-tpl.php templates. It duplicates the code, and makes maintenance difficult. Try using Context Layout or Panels if variations are really needed. Panels have dragable user interface system and a layout generator tool. No code needed!
  • 17. 11. LOGIC IN TEMPLATES SQL queries and calculations don't belong to the template layer. If logic is not so advance it can be placed in the preprocess function in template.php file. • About process & preprocess: http://drupal.org/node/223430
  • 18. 12. USING TOO COMMON CSS TARGETING Drupal outputs a LOT of markup with specific HTML classes and ids. Knowing which class is appropriate to target is the key. • Ids are usually unique identifiers for blocks/nodes/views • views have classes with view name and display name seperated. Don’t target displays (e.g. .views-display-id- block) • .items-list, .content, .view-content etc. are used all over your Drupal site, don’t use for specific targeting.
  • 19. 13. NOT USING THE BASIC DRUPAL FUNCTIONS Drupal comes with some very handy functions, we should use them - l() and url() - in contrast of hardcoded relative URL address can outputs aliased URL path - base_path(), returns base URL of the Drupal installation - theme() functions like theme('image_style',array()) to out put styled image
  • 20.
  • 21. 14. CODING There is a 80% possibility that what you want to build can be build with a combination of modules. Usual suspects: • Views (your UI for SQL queries) • views_field_view, views_bulk_operations • Rules (executing commands on events) • Panels (overriding default paths like node/%nid) • Filed collection (join fields into one field)
  • 22. 15. HACKING CORE AND CONTRIB MODULES Fixing code directly in the module files makes the website impossible to update. Instead Drupal provides hooks and preprocess functions. • More about hooks: http://api.drupal.org/api/drupal/includes!module.inc/group /hooks/7
  • 23. 16. NOT USING API FUNCTIONS • Database API, dynamic queries: http://drupal.org/node/310075 • Entity query API: http://drupal.org/node/1343708 Bets to learn from examples: http://drupal.org/project/examples
  • 24. 17. NOT KNOWING HOW TO DEBUG When you would usually use print_r() to get the content of a array or object to your browser, Drupal has Devel (http://drupal.org/project/devel): • dpm($variable) – prints content of variable in human friendly way You can also store info to a log: http://drupal.org/project/object_log Can’t find the right template? Use Devel Themer (http://drupal.org/project/devel_themer)
  • 25. 18. NOT RESPECTING THE CODING STANDARDS Different approaches and coding styles make code less organized and makes the job for other developers mode difficult. • two spaces indentation • $var = foo($bar, $baz, $quux); • $some_array = array('hello', 'world', 'foo' => 'bar'); • <?php print $title; ?>
  • 26.
  • 27. 19. FORGETTING ABOUT BACK-END UX Drupal is criticized for having a bad user experience for end users. I argue that with the argument that since Drupal is a framework, back end should be part of out efforts when building a website.
  • 28. 20. FORGETTING ABOUT YOU DRUPAL WEBSITE Drupal needs love even after you have finished your website. Keeping core and modules updates makes it easier to upgrade at some time and keeps the system safe.
  • 29. • Read books • Get a mentor • Fail & learn from it

Editor's Notes

  1. I know MySQL/PHP, I know Drupal I confess that I still suck at PHP, but I can still build an advance Drupal project (even coding with Drupal “API”) There is a module for anything like in Joomla/Wordpress Drupal modules rarely bring full features like Image gallery or Slideshow, but together with Field UI, Views, Views Slideshow and Colorbox you can build a Slideshow video gallery. Drupal has a long and steep learning curve 5 years ago I was designing posters and now I help senior PHP developers understand Drupal.