SlideShare ist ein Scribd-Unternehmen logo
1 von 39
5 Common Mistakes you are making
on your Website
Hernâni Borges de Freitas
Technical Consultant
hernani@acquia.com
@hernanibf
About me
• .PT / Uk
• Acquia Professional Services
  EMEA
• Technical Consultant
• Drupal* many things
• Passionate about web and
  communities
• Travel lover
Acquia Professional Services
•   Drupal Jumpstarts
•   Architecture Workshop
•   Discovery workshops
•   Site Audit
•   Performance Audit
•   Security Audit
•   On-site Consulting
Site Audit
• During limited time we look to your
  website assuring it is following best
  practices and do not present risks
  regarding:
   • Architecture (Content , Functionality,
      Display)
   • Security
   • Performance
   • Infrastructure
   • Website Life Cycle (Development,
      Deployment, Maintenance).
This webinar
• Common mistakes we found in site audits
   looking to 5 categories:
   • Architecture (Content , Functionality,
      Display)
   • Security
   • Performance
   • Infrastructure
   • Website Life Cycle (Development,
      Deployment, Maintenance).
Content architecture

  “Editors don’t understand what to create. ”



  “The page content type article is similar to news. We
    just used it during some months to create special
    news in homepage.”


  “We needed to change this template because we
    wanted to show everything in that location and
    we use school_location and teacher_city.”
Content architecture
 Symptoms
 • Similar content types
 • Fields not reused
 • Content types with almost no nodes

 Chasing it
 • Take a look at field report page.
 • Content type structure.
 • Simple database queries
   • Select count(*), type from node group by type
Content architecture
 Best practices
 • Plan your content architecture ahead. This is probably
    the most important part of your site.
 • Think before creating a new field or content type.
 • Reuse and standardize as many content types and fields
    as possible.
  • This will help in maintenance
  • This will help in user experience
  • This will help in performance
Dis play architecture
  “Views_london, views_paris, views_lisbon shows jobs
     available in these cities”


   “The scores block in the sports section ? Some PHP
     code is controlling its visibility in block
     configuration..”


   “We need those node_load() in preprocess_page
     because we need to show those nodes in
     homepage.”
Display architecture
 Chasing it
 • Understand how pages are build.
 • Look at views and how reusable they are.
 • How much custom templates do you have?
 • How much logic do you have in templates.
 • How easy is to switch theme (mobile,
    special occasions?)
 • How long does it take to produce a
    totally new design in your site?
Display architecture
 Best practices
 • Separate very well what is logic and what is
    presentation.
 • No code handling logic in template files (*.tpl.php)
  • Custom logic in modules
  • Custom logic in preprocess functions if needed
 • Customize the right templates.
  • Theme developer module can help.
 • Start with a solid foundation to manage display and
    presentation, excel on it.
Site architecture
 Symptoms
 • Modules installed
  • Number of modules that are not useful at all.
  • Hacked core and modules
 • “There is a module for that” – does not
    mean you need to use it!
 • Modules used for things they were not
    designed to do.
 • PHP Code in database
Reinventing the wheel

   “This is a custom module we designed to create
     forms on the fly that can be sent by email to
     site admins!”



  “ That custom module adds small hidden
     tokens to control SPAM in our website.”
Extra complexity
  “We thought we needed content translation but in
    the end our website is just in english.”


    “Right now we only have one type of users, but
      in the future we might need to have more
      roles, so we already have content_access.”


  “ Authcache module is used to speed up pages
     for our 20 journalists.”
Site architecture
 Chasing it
 • Evaluate number of modules and
    functionality they are providing.
 • Evaluate if all modules are effectively
    used or if better alternatives are present
    from drupal.org
 • Use hacked! module
    (http://drupal.org/project/hacked) to
    compare code versions used.
Custom modules
 Symptoms
 • Not following coding standards
  • Can be a warning for what is coming…
 • Not using the right hooks
  • Excessive usage of hook_init, hook_nodeapi
 • Not using the API
  • Reinventing something that Drupal is already doing
      well

 • Hardcoded strings (nids, tids, vids, urls).
 • All code in .module file
Best practices
 • Balance custom code / contributed code or reusable
    ways of solving problems.
  • Couldn’t that query be a view ?
  • Couldn’t context or panels create that page?
  • Couldn’t that custom action be controlled by a rule?
  • Find the best modules for your use case and excel on
      using them.
  • Search and plan before implementation. Test it in
      short sprints.
  • A site architecture is something that changes
      overtime, reevaluate if periodically.
Security
        “ That webservice path is impossible to find, it
           does not need authentication. Only the mobile
           app uses it.”


          “ You would need to be a administrator to
             access that page.”


          “ We are the only ones we can access the
            server, therefore we are just too worried
            about it.”

The things we found in your website!
Security
 Basic problems
 • Not updated core and contributed modules.
 • Bad configuration
  • Users have permissions to do things they shouldn’t
 • Admins have easy passwords (similar to
    usernames, hacked email accounts..)
 • File upload is not checked
 • Code repository contain extra gifts
  • Database dumps, files with information that should no be
     there ..
Security
 SQL Injection
 • db_query(“select from table where id=$_GET[‘id’]”);
  • Example.com/index.php?id=1;drop database yoursite;--
 XSS – Cross site scripting
 • <?php echo “Your number is “. $_GET[‘id’]; ?>
  • Index.php?id=<script>alert(“UAAAT??”);</script>
 CSRF – Cross site request forgery
  $items[‘admin/cookies/%/delete’] = array(
  $items[‘admin/cookies/%/delete’] = array(
        'access callback' => 'user_access',
         'access callback' => 'user_access',
        'access arguments' => array('access cookies'),
         'access arguments' => array('access cookies'),
        'page callback' => 'cookie_delete'
         'page callback' => 'cookie_delete'
  );
   );
Security
 CSRF – Cross site request forgery


 • HTML Email
    • <img src=“http://example.com/admin/cookies/10/delete” />
 • HTTP Post to forms
    • You expect the request to come from your site but it can
       come from anywhere
 • Drupal protects against both attacks using tokens and Form API
Performance
 What is your website doing


 • How long do most pages take to load
    (common lists, node pages, homepage?)
 • Why do they take so long? DB queries,
    application requests?
 • What about edge cases? Clear cache for
    instance?
 • What is your caching strategy?
 • What are your logs telling you?
Performance
 • How long do most pages take to load ?
  • Devel can show immediately some problems
  • XhProf can do the rest
  • NewRelic (newrelic.com) is pure gold!
 • Why is CPU and memory wasted?
 • Typically
  • Complex queries that take too much time
  • Function called too much times
  • Edge cases that are happening all the time
Performance
   Why is the database so slow? Why is only slow now?

   • Databases not optimized to grow
   • Complex queries made by without indexes usage
   • Complex queries made automatically
SELECT node.nid AS nid, users.picture AS users_picture, users.uid AS users_uid, users.name AS
users_name, users.mail AS users_mail, node.title AS node_title, GREATEST(node.changed,
node_comment_statistics.last_comment_timestamp) AS node_comment_statistics_last_updated
FROM node node
       INNER JOIN users users ON node.uid = users.uid
       INNER JOIN node_comment_statistics node_comment_statistics ON node.nid =
node_comment_statistics.nid
       ORDER BY node_comment_statistics_last_updated DESC
Performance
 Is using InnoDb always better?

    SELECT COUNT(*) FROM (SELECT DISTINCT node.nid AS nid FROM node node
    LEFT JOIN og_ancestry og_ancestry ON node.nid = og_ancestry.nid INNER JOIN
    users users ON node.uid = users.uid INNER JOIN node_comment_statistics
    node_comment_statistics ON node.nid = node_comment_statistics.nid WHERE
    og_ancestry.group_nid = 5 ) count_alias




 • Use views lite pager module instead, if possible.
Performance
 Optmizing before caching


 •“My Site is Slow” - talk in Drupalcamp Madrid/ Drupalcamp
 London
 •http://www.slideshare.net/hernanibf/london2013
Performance
 Can it be cached?
 • Assure caching and aggregation are set. Yes, look at it!
 • Review caching strategy:
   • https://www.acquia.com/blog/when-and-how-caching-can-
       save-your-site-part-2-authenticated-users
 • Guarantee caching is effectively helping you.
   • Don’t clear it too often.
   • Not used only by a minority.
   • Evaluate complexity before choosing a direction.
Infrastructure
 This is where your website ends..


 • What is the right size? How do you grow?
 • Are the different servers well tuned ?
    • Apache / PHP
    • Mysql
    • Varnish
 • What are your logs telling you?
Infrastructure

   “Our DB Server has 48Gb of memory. Enough to
     handle all requests!”

 • My.cnf
   • Innodb_buffer_pool = 1024M
 • Adjust limits according to your resources.
 • http://mysqltuner.pl
 • Your slowest bottleneck represents your overall
    bottleneck.
Infrastructure
  “We don’t need that many web servers. As
    varnish is set in front and working as a reverse
    proxy, most of the traffic will be cached.”
Infrastructure
   “Our external firewall controls all sort of attacks.
     We don’t use any specific firewall in the
     servers.”




 • 50/70% of attacks are internal. Remote connections with DB,
    Memcached, Solr should be forbidden.
 • Hard to remember about details on fast moving environments.
Website Life Cycle
 This is going to be must of the work!


 • What is your deployment architecture?
 • How hard is it too change?
 • How do you test changes?
 • How relaxed do you leave your desk?
Deployment
  “We just copy the code directly to the server by
    FTP.”


  “Any developer can just take a snapshot from
    production and install on their laptop.”


  “Don’t touch that module. We just did some
    changes from what it was originally.”
Development
 Control your code!


 • All piece of code should be under VCS.
   • Git, Mercury, Bazaar, SVN, CVS
   • Copying to backup folders is not VCS.
   • Yes, log messages should not be empty…
   • No, your holidays pictures should not be under VCS.
   • No, your database dumps shouldn’t also be there.
Maintenance

  “We can only test that in production.”



  “Yes we have a staging environment. But its data is
    from last summer.”


   “Sometimes problems occur when we upgrade.
     But we have always a backup.”
Environments
 Do once, prepare many!


 • Several environments should exist
   • Development, Staging and Production.
   • Should be possible to deploy from VCS to them!
 • Environments should be up to date and accessible
 • Environments should be as possible similar to real
    life
 • Environments should be easy to destroy and
    replicate
Maintenance
 This is going to be most of the work!


 • Be prepared for changes
    • You don’t control them most of times!
 • Pay attention to security updates
 • Review your logs periodically
 • Review periodically website architecture
Free site audit ?
QUESTIONS ?

Weitere ähnliche Inhalte

Was ist angesagt?

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
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPressTaylor Lovett
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Webphilogb
 
My first powershell script
My first powershell scriptMy first powershell script
My first powershell scriptDavid Cobb
 
Adobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionAdobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionTekno Point
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsTaylor Lovett
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web DesignMike Wilcox
 
How NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeHow NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeRadosław Scheibinger
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1James Pearce
 
Drupal content editor flexibility
Drupal content editor flexibilityDrupal content editor flexibility
Drupal content editor flexibilityhernanibf
 
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling SoftwareJAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Softwarejazoon13
 
Catch 22: FLex APps
Catch 22: FLex APpsCatch 22: FLex APps
Catch 22: FLex APpsYash Mody
 
Web Components v1
Web Components v1Web Components v1
Web Components v1Mike Wilcox
 
PLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsPLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsAlfresco Software
 
Java EE revisits design patterns
Java EE revisits design patterns Java EE revisits design patterns
Java EE revisits design patterns Alex Theedom
 
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...Sencha
 
Rails Performance Tricks and Treats
Rails Performance Tricks and TreatsRails Performance Tricks and Treats
Rails Performance Tricks and TreatsMarshall Yount
 

Was ist angesagt? (20)

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
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPress
 
Introduction to CQ5
Introduction to CQ5Introduction to CQ5
Introduction to CQ5
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Web
 
My first powershell script
My first powershell scriptMy first powershell script
My first powershell script
 
Adobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionAdobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - Introduction
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
How NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscapeHow NOT to get lost in the current JavaScript landscape
How NOT to get lost in the current JavaScript landscape
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
 
Drupal content editor flexibility
Drupal content editor flexibilityDrupal content editor flexibility
Drupal content editor flexibility
 
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling SoftwareJAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
JAZOON'13 - Abdelmonaim Remani - The Economies of Scaling Software
 
Catch 22: FLex APps
Catch 22: FLex APpsCatch 22: FLex APps
Catch 22: FLex APps
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
PLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsPLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in Grails
 
Java EE revisits design patterns
Java EE revisits design patterns Java EE revisits design patterns
Java EE revisits design patterns
 
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
 
CQ5 and Sling overview
CQ5 and Sling overviewCQ5 and Sling overview
CQ5 and Sling overview
 
Fluxible
FluxibleFluxible
Fluxible
 
Rails Performance Tricks and Treats
Rails Performance Tricks and TreatsRails Performance Tricks and Treats
Rails Performance Tricks and Treats
 

Ähnlich wie 5 Common Mistakes You are Making on your Website

DrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtDrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtNick Santamaria
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterpriseTaylor Lovett
 
Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseTaylor Lovett
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmNigel Price
 
Pearls and Must-Have Tools for the Modern Web / .NET Developer
Pearls and Must-Have Tools for the Modern Web / .NET DeveloperPearls and Must-Have Tools for the Modern Web / .NET Developer
Pearls and Must-Have Tools for the Modern Web / .NET DeveloperOfer Zelig
 
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...Jon Peck
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013hernanibf
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applicationsEugene Lazutkin
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSPC Adriatics
 
Drupal Site Audit - SFDUG
Drupal Site Audit - SFDUGDrupal Site Audit - SFDUG
Drupal Site Audit - SFDUGJon Peck
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsAchievers Tech
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Reviewnetc2012
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownMark Rackley
 
JS - The Unknown Basics.pptx
JS - The Unknown Basics.pptxJS - The Unknown Basics.pptx
JS - The Unknown Basics.pptxParveenSoni21
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!David Hoerster
 
One drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp CaceresOne drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp Cacereshernanibf
 

Ähnlich wie 5 Common Mistakes You are Making on your Website (20)

DrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an AfterthoughtDrupalSouth 2015 - Performance: Not an Afterthought
DrupalSouth 2015 - Performance: Not an Afterthought
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterprise
 
Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in Enterprise
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_Farm
 
Pearls and Must-Have Tools for the Modern Web / .NET Developer
Pearls and Must-Have Tools for the Modern Web / .NET DeveloperPearls and Must-Have Tools for the Modern Web / .NET Developer
Pearls and Must-Have Tools for the Modern Web / .NET Developer
 
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...
Auditing Drupal Sites for Performance, Content and Optimal Configuration - SA...
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013My Site is slow - Drupal Camp London 2013
My Site is slow - Drupal Camp London 2013
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applications
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
 
Drupal Site Audit - SFDUG
Drupal Site Audit - SFDUGDrupal Site Audit - SFDUG
Drupal Site Audit - SFDUG
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Review
 
Javascript for Wep Apps
Javascript for Wep AppsJavascript for Wep Apps
Javascript for Wep Apps
 
SPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have knownSPSDenver - SharePoint & jQuery - What I wish I would have known
SPSDenver - SharePoint & jQuery - What I wish I would have known
 
JS - The Unknown Basics.pptx
JS - The Unknown Basics.pptxJS - The Unknown Basics.pptx
JS - The Unknown Basics.pptx
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!
 
One drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp CaceresOne drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp Caceres
 

Mehr von Acquia

Acquia_Adcetera Webinar_Marketing Automation.pdf
Acquia_Adcetera Webinar_Marketing Automation.pdfAcquia_Adcetera Webinar_Marketing Automation.pdf
Acquia_Adcetera Webinar_Marketing Automation.pdfAcquia
 
Acquia Webinar Deck - 9_13 .pdf
Acquia Webinar Deck - 9_13 .pdfAcquia Webinar Deck - 9_13 .pdf
Acquia Webinar Deck - 9_13 .pdfAcquia
 
Taking Your Multi-Site Management at Scale to the Next Level
Taking Your Multi-Site Management at Scale to the Next LevelTaking Your Multi-Site Management at Scale to the Next Level
Taking Your Multi-Site Management at Scale to the Next LevelAcquia
 
CDP for Retail Webinar with Appnovation - Q2 2022.pdf
CDP for Retail Webinar with Appnovation - Q2 2022.pdfCDP for Retail Webinar with Appnovation - Q2 2022.pdf
CDP for Retail Webinar with Appnovation - Q2 2022.pdfAcquia
 
May Partner Bootcamp 2022
May Partner Bootcamp 2022May Partner Bootcamp 2022
May Partner Bootcamp 2022Acquia
 
April Partner Bootcamp 2022
April Partner Bootcamp 2022April Partner Bootcamp 2022
April Partner Bootcamp 2022Acquia
 
How to Unify Brand Experience: A Hootsuite Story
How to Unify Brand Experience: A Hootsuite Story How to Unify Brand Experience: A Hootsuite Story
How to Unify Brand Experience: A Hootsuite Story Acquia
 
Using Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CX
Using Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CXUsing Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CX
Using Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CXAcquia
 
Improve Code Quality and Time to Market: 100% Cloud-Based Development Workflow
Improve Code Quality and Time to Market: 100% Cloud-Based Development WorkflowImprove Code Quality and Time to Market: 100% Cloud-Based Development Workflow
Improve Code Quality and Time to Market: 100% Cloud-Based Development WorkflowAcquia
 
September Partner Bootcamp
September Partner BootcampSeptember Partner Bootcamp
September Partner BootcampAcquia
 
August partner bootcamp
August partner bootcampAugust partner bootcamp
August partner bootcampAcquia
 
July 2021 Partner Bootcamp
July  2021 Partner BootcampJuly  2021 Partner Bootcamp
July 2021 Partner BootcampAcquia
 
May Partner Bootcamp
May Partner BootcampMay Partner Bootcamp
May Partner BootcampAcquia
 
DRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASY
DRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASYDRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASY
DRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASYAcquia
 
Work While You Sleep: The CMO’s Guide to a 24/7/365 Lead Machine
Work While You Sleep: The CMO’s Guide to a 24/7/365 Lead MachineWork While You Sleep: The CMO’s Guide to a 24/7/365 Lead Machine
Work While You Sleep: The CMO’s Guide to a 24/7/365 Lead MachineAcquia
 
Acquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B Leads
Acquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B LeadsAcquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B Leads
Acquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B LeadsAcquia
 
April partner bootcamp deck cookieless future
April partner bootcamp deck  cookieless futureApril partner bootcamp deck  cookieless future
April partner bootcamp deck cookieless futureAcquia
 
How to enhance cx through personalised, automated solutions
How to enhance cx through personalised, automated solutionsHow to enhance cx through personalised, automated solutions
How to enhance cx through personalised, automated solutionsAcquia
 
DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...
DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...
DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...Acquia
 
Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021
Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021
Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021Acquia
 

Mehr von Acquia (20)

Acquia_Adcetera Webinar_Marketing Automation.pdf
Acquia_Adcetera Webinar_Marketing Automation.pdfAcquia_Adcetera Webinar_Marketing Automation.pdf
Acquia_Adcetera Webinar_Marketing Automation.pdf
 
Acquia Webinar Deck - 9_13 .pdf
Acquia Webinar Deck - 9_13 .pdfAcquia Webinar Deck - 9_13 .pdf
Acquia Webinar Deck - 9_13 .pdf
 
Taking Your Multi-Site Management at Scale to the Next Level
Taking Your Multi-Site Management at Scale to the Next LevelTaking Your Multi-Site Management at Scale to the Next Level
Taking Your Multi-Site Management at Scale to the Next Level
 
CDP for Retail Webinar with Appnovation - Q2 2022.pdf
CDP for Retail Webinar with Appnovation - Q2 2022.pdfCDP for Retail Webinar with Appnovation - Q2 2022.pdf
CDP for Retail Webinar with Appnovation - Q2 2022.pdf
 
May Partner Bootcamp 2022
May Partner Bootcamp 2022May Partner Bootcamp 2022
May Partner Bootcamp 2022
 
April Partner Bootcamp 2022
April Partner Bootcamp 2022April Partner Bootcamp 2022
April Partner Bootcamp 2022
 
How to Unify Brand Experience: A Hootsuite Story
How to Unify Brand Experience: A Hootsuite Story How to Unify Brand Experience: A Hootsuite Story
How to Unify Brand Experience: A Hootsuite Story
 
Using Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CX
Using Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CXUsing Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CX
Using Personas to Guide DAM Results: How Life Time Pumped Up Their UX and CX
 
Improve Code Quality and Time to Market: 100% Cloud-Based Development Workflow
Improve Code Quality and Time to Market: 100% Cloud-Based Development WorkflowImprove Code Quality and Time to Market: 100% Cloud-Based Development Workflow
Improve Code Quality and Time to Market: 100% Cloud-Based Development Workflow
 
September Partner Bootcamp
September Partner BootcampSeptember Partner Bootcamp
September Partner Bootcamp
 
August partner bootcamp
August partner bootcampAugust partner bootcamp
August partner bootcamp
 
July 2021 Partner Bootcamp
July  2021 Partner BootcampJuly  2021 Partner Bootcamp
July 2021 Partner Bootcamp
 
May Partner Bootcamp
May Partner BootcampMay Partner Bootcamp
May Partner Bootcamp
 
DRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASY
DRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASYDRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASY
DRUPAL 7 END OF LIFE IS NEAR - MIGRATE TO DRUPAL 9 FAST AND EASY
 
Work While You Sleep: The CMO’s Guide to a 24/7/365 Lead Machine
Work While You Sleep: The CMO’s Guide to a 24/7/365 Lead MachineWork While You Sleep: The CMO’s Guide to a 24/7/365 Lead Machine
Work While You Sleep: The CMO’s Guide to a 24/7/365 Lead Machine
 
Acquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B Leads
Acquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B LeadsAcquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B Leads
Acquia webinar: Leveraging Drupal to Bury Your Sales Team In B2B Leads
 
April partner bootcamp deck cookieless future
April partner bootcamp deck  cookieless futureApril partner bootcamp deck  cookieless future
April partner bootcamp deck cookieless future
 
How to enhance cx through personalised, automated solutions
How to enhance cx through personalised, automated solutionsHow to enhance cx through personalised, automated solutions
How to enhance cx through personalised, automated solutions
 
DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...
DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...
DRUPAL MIGRATIONS AND DRUPAL 9 INNOVATION: HOW PAC-12 DELIVERED DIGITALLY FOR...
 
Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021
Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021
Customer Experience (CX): 3 Key Factors Shaping CX Redesign in 2021
 

Kürzlich hochgeladen

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Kürzlich hochgeladen (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

5 Common Mistakes You are Making on your Website

  • 1. 5 Common Mistakes you are making on your Website Hernâni Borges de Freitas Technical Consultant hernani@acquia.com @hernanibf
  • 2. About me • .PT / Uk • Acquia Professional Services EMEA • Technical Consultant • Drupal* many things • Passionate about web and communities • Travel lover
  • 3. Acquia Professional Services • Drupal Jumpstarts • Architecture Workshop • Discovery workshops • Site Audit • Performance Audit • Security Audit • On-site Consulting
  • 4. Site Audit • During limited time we look to your website assuring it is following best practices and do not present risks regarding: • Architecture (Content , Functionality, Display) • Security • Performance • Infrastructure • Website Life Cycle (Development, Deployment, Maintenance).
  • 5. This webinar • Common mistakes we found in site audits looking to 5 categories: • Architecture (Content , Functionality, Display) • Security • Performance • Infrastructure • Website Life Cycle (Development, Deployment, Maintenance).
  • 6. Content architecture “Editors don’t understand what to create. ” “The page content type article is similar to news. We just used it during some months to create special news in homepage.” “We needed to change this template because we wanted to show everything in that location and we use school_location and teacher_city.”
  • 7. Content architecture Symptoms • Similar content types • Fields not reused • Content types with almost no nodes Chasing it • Take a look at field report page. • Content type structure. • Simple database queries • Select count(*), type from node group by type
  • 8. Content architecture Best practices • Plan your content architecture ahead. This is probably the most important part of your site. • Think before creating a new field or content type. • Reuse and standardize as many content types and fields as possible. • This will help in maintenance • This will help in user experience • This will help in performance
  • 9. Dis play architecture “Views_london, views_paris, views_lisbon shows jobs available in these cities” “The scores block in the sports section ? Some PHP code is controlling its visibility in block configuration..” “We need those node_load() in preprocess_page because we need to show those nodes in homepage.”
  • 10. Display architecture Chasing it • Understand how pages are build. • Look at views and how reusable they are. • How much custom templates do you have? • How much logic do you have in templates. • How easy is to switch theme (mobile, special occasions?) • How long does it take to produce a totally new design in your site?
  • 11. Display architecture Best practices • Separate very well what is logic and what is presentation. • No code handling logic in template files (*.tpl.php) • Custom logic in modules • Custom logic in preprocess functions if needed • Customize the right templates. • Theme developer module can help. • Start with a solid foundation to manage display and presentation, excel on it.
  • 12. Site architecture Symptoms • Modules installed • Number of modules that are not useful at all. • Hacked core and modules • “There is a module for that” – does not mean you need to use it! • Modules used for things they were not designed to do. • PHP Code in database
  • 13. Reinventing the wheel “This is a custom module we designed to create forms on the fly that can be sent by email to site admins!” “ That custom module adds small hidden tokens to control SPAM in our website.”
  • 14. Extra complexity “We thought we needed content translation but in the end our website is just in english.” “Right now we only have one type of users, but in the future we might need to have more roles, so we already have content_access.” “ Authcache module is used to speed up pages for our 20 journalists.”
  • 15. Site architecture Chasing it • Evaluate number of modules and functionality they are providing. • Evaluate if all modules are effectively used or if better alternatives are present from drupal.org • Use hacked! module (http://drupal.org/project/hacked) to compare code versions used.
  • 16. Custom modules Symptoms • Not following coding standards • Can be a warning for what is coming… • Not using the right hooks • Excessive usage of hook_init, hook_nodeapi • Not using the API • Reinventing something that Drupal is already doing well • Hardcoded strings (nids, tids, vids, urls). • All code in .module file
  • 17. Best practices • Balance custom code / contributed code or reusable ways of solving problems. • Couldn’t that query be a view ? • Couldn’t context or panels create that page? • Couldn’t that custom action be controlled by a rule? • Find the best modules for your use case and excel on using them. • Search and plan before implementation. Test it in short sprints. • A site architecture is something that changes overtime, reevaluate if periodically.
  • 18. Security “ That webservice path is impossible to find, it does not need authentication. Only the mobile app uses it.” “ You would need to be a administrator to access that page.” “ We are the only ones we can access the server, therefore we are just too worried about it.” The things we found in your website!
  • 19. Security Basic problems • Not updated core and contributed modules. • Bad configuration • Users have permissions to do things they shouldn’t • Admins have easy passwords (similar to usernames, hacked email accounts..) • File upload is not checked • Code repository contain extra gifts • Database dumps, files with information that should no be there ..
  • 20. Security SQL Injection • db_query(“select from table where id=$_GET[‘id’]”); • Example.com/index.php?id=1;drop database yoursite;-- XSS – Cross site scripting • <?php echo “Your number is “. $_GET[‘id’]; ?> • Index.php?id=<script>alert(“UAAAT??”);</script> CSRF – Cross site request forgery $items[‘admin/cookies/%/delete’] = array( $items[‘admin/cookies/%/delete’] = array( 'access callback' => 'user_access', 'access callback' => 'user_access', 'access arguments' => array('access cookies'), 'access arguments' => array('access cookies'), 'page callback' => 'cookie_delete' 'page callback' => 'cookie_delete' ); );
  • 21. Security CSRF – Cross site request forgery • HTML Email • <img src=“http://example.com/admin/cookies/10/delete” /> • HTTP Post to forms • You expect the request to come from your site but it can come from anywhere • Drupal protects against both attacks using tokens and Form API
  • 22. Performance What is your website doing • How long do most pages take to load (common lists, node pages, homepage?) • Why do they take so long? DB queries, application requests? • What about edge cases? Clear cache for instance? • What is your caching strategy? • What are your logs telling you?
  • 23. Performance • How long do most pages take to load ? • Devel can show immediately some problems • XhProf can do the rest • NewRelic (newrelic.com) is pure gold! • Why is CPU and memory wasted? • Typically • Complex queries that take too much time • Function called too much times • Edge cases that are happening all the time
  • 24. Performance Why is the database so slow? Why is only slow now? • Databases not optimized to grow • Complex queries made by without indexes usage • Complex queries made automatically SELECT node.nid AS nid, users.picture AS users_picture, users.uid AS users_uid, users.name AS users_name, users.mail AS users_mail, node.title AS node_title, GREATEST(node.changed, node_comment_statistics.last_comment_timestamp) AS node_comment_statistics_last_updated FROM node node INNER JOIN users users ON node.uid = users.uid INNER JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid ORDER BY node_comment_statistics_last_updated DESC
  • 25. Performance Is using InnoDb always better? SELECT COUNT(*) FROM (SELECT DISTINCT node.nid AS nid FROM node node LEFT JOIN og_ancestry og_ancestry ON node.nid = og_ancestry.nid INNER JOIN users users ON node.uid = users.uid INNER JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid WHERE og_ancestry.group_nid = 5 ) count_alias • Use views lite pager module instead, if possible.
  • 26. Performance Optmizing before caching •“My Site is Slow” - talk in Drupalcamp Madrid/ Drupalcamp London •http://www.slideshare.net/hernanibf/london2013
  • 27. Performance Can it be cached? • Assure caching and aggregation are set. Yes, look at it! • Review caching strategy: • https://www.acquia.com/blog/when-and-how-caching-can- save-your-site-part-2-authenticated-users • Guarantee caching is effectively helping you. • Don’t clear it too often. • Not used only by a minority. • Evaluate complexity before choosing a direction.
  • 28. Infrastructure This is where your website ends.. • What is the right size? How do you grow? • Are the different servers well tuned ? • Apache / PHP • Mysql • Varnish • What are your logs telling you?
  • 29. Infrastructure “Our DB Server has 48Gb of memory. Enough to handle all requests!” • My.cnf • Innodb_buffer_pool = 1024M • Adjust limits according to your resources. • http://mysqltuner.pl • Your slowest bottleneck represents your overall bottleneck.
  • 30. Infrastructure “We don’t need that many web servers. As varnish is set in front and working as a reverse proxy, most of the traffic will be cached.”
  • 31. Infrastructure “Our external firewall controls all sort of attacks. We don’t use any specific firewall in the servers.” • 50/70% of attacks are internal. Remote connections with DB, Memcached, Solr should be forbidden. • Hard to remember about details on fast moving environments.
  • 32. Website Life Cycle This is going to be must of the work! • What is your deployment architecture? • How hard is it too change? • How do you test changes? • How relaxed do you leave your desk?
  • 33. Deployment “We just copy the code directly to the server by FTP.” “Any developer can just take a snapshot from production and install on their laptop.” “Don’t touch that module. We just did some changes from what it was originally.”
  • 34. Development Control your code! • All piece of code should be under VCS. • Git, Mercury, Bazaar, SVN, CVS • Copying to backup folders is not VCS. • Yes, log messages should not be empty… • No, your holidays pictures should not be under VCS. • No, your database dumps shouldn’t also be there.
  • 35. Maintenance “We can only test that in production.” “Yes we have a staging environment. But its data is from last summer.” “Sometimes problems occur when we upgrade. But we have always a backup.”
  • 36. Environments Do once, prepare many! • Several environments should exist • Development, Staging and Production. • Should be possible to deploy from VCS to them! • Environments should be up to date and accessible • Environments should be as possible similar to real life • Environments should be easy to destroy and replicate
  • 37. Maintenance This is going to be most of the work! • Be prepared for changes • You don’t control them most of times! • Pay attention to security updates • Review your logs periodically • Review periodically website architecture