How NOT to build Drupal Sites - Sai Tanay

901
-1

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
901
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

How NOT to build Drupal Sites - Sai Tanay

  1. 1. NOTE: This presentation is a Work in Progress. The current copy shared is intended only for review purposes by the DCD panel.
  2. 2. How “N O T” to build Drupal Sites Tanay Sai Technical Account Manager Acquia
  3. 3. Do “NOT” code too much ● Do not program too much ● When you have a hammer everything looks like a nail ● Don't be in a rush to become a Drupal "Programmer" ● Do not try to solve the Problem by Programming
  4. 4. Do “NOT” custom code too much ● Hard to Maintain ● Leverage existing good contrib modules ● You are just re-inventing the wheel ● Contrib code tested and reviewed by many
  5. 5. Do “NOT” hack core ● Why? ● Use Hooks, APIs from core and contrib
  6. 6. Do “NOT” be too generic ● ● ● ● ● hook_init, hook_boot form_alters without check for form if Including JS, CSS through these init hook 403 - Use Drupal's permissions system instead Overriding other module’s behaviour - Use hook_menu_alter, hook_form_alter etc instead of hook_init
  7. 7. Do “NOT” get into trouble ● ● ● hook_init hook_boot hook_exit() ● ● ● hook_node_access() hook_node_access_records() hook_node_access_alter() ● ● hook_node_grants() hook_node_grants_alter()
  8. 8. Do “NOT” put code in database ● PHP Filter ● Views PHP module ● Why? ● Common Scenarios ● Alternative better approaches
  9. 9. Do “NOT” clutter your site ● Dozens of unused modules, content types, vocabularies ● Be a miser
  10. 10. Do “NOT” Content Typify Everything ● Use Custom Entities wherever Appropriate
  11. 11. Do “NOT” just MYISAM ● InnoDB vs MyISAM
  12. 12. Do “NOT” default PERMISSIONS ● ● ● Do not leave any permission checked or unchecked by default Uncheck all and start checking one by one after putting some thought Whenever is new module is added check the permissions added and see the roles that these permissions were granted to
  13. 13. Do “NOT” default your FILTERS ● Input Formats ● Filters
  14. 14. Do “NOT” leave out CACHING ● ● ● ● ● ● ● Block Caching Page Caching Views Caching Entity Cache module Boost/Varnish Memcache APC ● ● ● Set appropriate cache lifetimes Page Compression CSS/JS Aggregation
  15. 15. Do “NOT” Log Everything Everywhere ● ● ● Disable DB Log Enable Syslog Disable Statistics, Use GA or similar
  16. 16. Do “NOT” leave UI modules enabled ● UI Modules ● Simpletest ● Migrate ● Migrate Extras ● Coder ● Devel
  17. 17. Do “NOT” Use them. Stay Away! ● Statistics ● .. ● .. ●
  18. 18. Do “NOT” Leave behind 404 ● Use Fast 404 ● Prevent Bootstrap and Database operations for that favicon which is always missing
  19. 19. Do “NOT”
  1. ¿Le ha llamado la atención una diapositiva en particular?

    Recortar diapositivas es una manera útil de recopilar información importante para consultarla más tarde.

×