SlideShare uma empresa Scribd logo
1 de 29
Baixar para ler offline
Top 20 mistakes you will make on your 1st Drupal project
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.
Top 20 mistakes you will make on your 1st Drupal project
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.
Top 20 mistakes you will make on your 1st Drupal project
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
Top 20 mistakes you will make on your 1st Drupal project
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
Top 20 mistakes you will make on your 1st Drupal project
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; ?>
Top 20 mistakes you will make on your 1st Drupal project
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

Mais conteúdo relacionado

Mais procurados

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 DummiesKoen Delvaux
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupalmayank.grd
 
Introduction to drupal
Introduction to drupalIntroduction to drupal
Introduction to drupalmayank.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 DrupalBalance 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 ConceptsMicky Metts
 
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHPDeployer - Deployment tool for PHP
Deployer - Deployment tool for PHPhernanibf
 
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 DrupalVibrant Technologies & Computers
 
Introduction to Drupal
Introduction to DrupalIntroduction to Drupal
Introduction to Drupalsdmaxey
 
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 8Suzanne 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 OttawaSuzanne 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 Barcelonahernanibf
 
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 foundationMelanie 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 MultilingualSuzanne Dergacheva
 
Intro to drupal
Intro to drupalIntro to drupal
Intro to drupalhernanibf
 
Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Exove
 

Mais procurados (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
 

Destaque

Top 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies makeTop 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies makeIztok 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 monthsIztok 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 fieldIvan Zugec
 
Prezentacja komunikacji niewerbalnej
Prezentacja komunikacji niewerbalnejPrezentacja komunikacji niewerbalnej
Prezentacja komunikacji niewerbalnejbulinek
 
Attacking Drupal
Attacking DrupalAttacking Drupal
Attacking DrupalGreg 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 8Iztok 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 - WebinarSuzanne 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 DublinSuzanne 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 LightningAcquia
 
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
 

Destaque (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
 

Semelhante a 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 moduletedbow
 
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.2Anil Sagar
 
Rapid site production with Drupal
Rapid site production with DrupalRapid site production with Drupal
Rapid site production with DrupalRob Sawyer
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
The Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueThe Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueAlexandre 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 8Acquia
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Angela Byron
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an OverviewMatt Weaver
 
Intro to Drupal Module Developement
Intro to Drupal Module DevelopementIntro to Drupal Module Developement
Intro to Drupal Module DevelopementMatt Mendonca
 
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 versionDavid 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-mumbaivibrantuser
 
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 Londonhernanibf
 

Semelhante a 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
 

Último

OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideIEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideHironori Washizaki
 
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...Daniel Zivkovic
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdfPaige Cruz
 
Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024Alexander Turgeon
 
The Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementThe Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementNuwan Dias
 
UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5DianaGray10
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
Governance in SharePoint Premium:What's in the box?
Governance in SharePoint Premium:What's in the box?Governance in SharePoint Premium:What's in the box?
Governance in SharePoint Premium:What's in the box?Juan Carlos Gonzalez
 

Último (20)

OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideIEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
 
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024
 
The Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementThe Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API Management
 
UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
Governance in SharePoint Premium:What's in the box?
Governance in SharePoint Premium:What's in the box?Governance in SharePoint Premium:What's in the box?
Governance in SharePoint Premium:What's in the box?
 

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

  • 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.
  • 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.
  • 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
  • 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
  • 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; ?>
  • 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

Notas do Editor

  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.