SlideShare une entreprise Scribd logo
1  sur  9
Let’s write less Drupal code. Alex Barth (alex_b)
Much of the code we are maintaining  isn’t actually Drupal-specific.
jquery.js aggregator.parser.inc valid_url() filter_xss() check_plain() drupal_parse_info_format() jquery.once.js drupal_http_request() drupal_depth_first_search() password.inc
Some of these don’t seem to be a big deal: check_plain()
Others do: openid.inc (609 lines)
PubsubHubbub
If I had had  check_plain()  drupal_http_request() valid_url() my code would be shorter now and  I could have written it in less time.
RSS/Atom parser RDF parser OAuth Activity Streams Saman Pub/sub Ever more jQuery for UI Some existing challenges that will benefit form  good external library support:
[object Object],[object Object],[object Object],(Some) solutions

Contenu connexe

Tendances

SQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & TricksSQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & Tricks
Guillermo Caicedo
 
Search domain basics
Search domain basicsSearch domain basics
Search domain basics
pmanvi
 
Elasticsearch in Production
Elasticsearch in ProductionElasticsearch in Production
Elasticsearch in Production
foundsearch
 

Tendances (20)

Go, memcached, microservices
Go, memcached, microservicesGo, memcached, microservices
Go, memcached, microservices
 
Hadoop enhancements using next gen IA technologies
Hadoop enhancements using next gen IA technologiesHadoop enhancements using next gen IA technologies
Hadoop enhancements using next gen IA technologies
 
Workshop: Learning Elasticsearch
Workshop: Learning ElasticsearchWorkshop: Learning Elasticsearch
Workshop: Learning Elasticsearch
 
Scala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologistScala and jvm_languages_praveen_technologist
Scala and jvm_languages_praveen_technologist
 
Elastic search overview
Elastic search overviewElastic search overview
Elastic search overview
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
SQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & TricksSQL Server Integration Services Tips & Tricks
SQL Server Integration Services Tips & Tricks
 
Easy Copy with AZ Copy
Easy Copy with AZ CopyEasy Copy with AZ Copy
Easy Copy with AZ Copy
 
Drupal and Elasticsearch
Drupal and ElasticsearchDrupal and Elasticsearch
Drupal and Elasticsearch
 
Intergalactic data speak_highload++_20131028
Intergalactic data speak_highload++_20131028Intergalactic data speak_highload++_20131028
Intergalactic data speak_highload++_20131028
 
Search domain basics
Search domain basicsSearch domain basics
Search domain basics
 
When all you have is a hammer, everything looks like Javascript - ebookcraft ...
When all you have is a hammer, everything looks like Javascript - ebookcraft ...When all you have is a hammer, everything looks like Javascript - ebookcraft ...
When all you have is a hammer, everything looks like Javascript - ebookcraft ...
 
David Fetter, Disqus
David Fetter, DisqusDavid Fetter, Disqus
David Fetter, Disqus
 
Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014Drupal meets PostgreSQL for DrupalCamp MSK 2014
Drupal meets PostgreSQL for DrupalCamp MSK 2014
 
企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用
企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用
企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用
 
Elasticsearch 5.0
Elasticsearch 5.0Elasticsearch 5.0
Elasticsearch 5.0
 
Schema-free Microsoft Azure development
Schema-free Microsoft Azure developmentSchema-free Microsoft Azure development
Schema-free Microsoft Azure development
 
Elasticsearch in Production
Elasticsearch in ProductionElasticsearch in Production
Elasticsearch in Production
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Google cloud platform (for those who know Microsoft Azure)
Google cloud platform (for those who know Microsoft Azure)Google cloud platform (for those who know Microsoft Azure)
Google cloud platform (for those who know Microsoft Azure)
 

En vedette (8)

Sophie photo album
Sophie photo albumSophie photo album
Sophie photo album
 
Research project gender roles
Research project gender rolesResearch project gender roles
Research project gender roles
 
Presentation1
Presentation1Presentation1
Presentation1
 
April And May Specials
April And May SpecialsApril And May Specials
April And May Specials
 
Gender roles and household tasks
Gender roles and household tasksGender roles and household tasks
Gender roles and household tasks
 
Artwork Samples
Artwork SamplesArtwork Samples
Artwork Samples
 
Leucocitos
LeucocitosLeucocitos
Leucocitos
 
Adaptive Learning In Games
Adaptive Learning In GamesAdaptive Learning In Games
Adaptive Learning In Games
 

Similaire à Write Less Drupal Code

Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management Systems
Matthew Turland
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
BigBlueHat
 
Creating Drupal A Module
Creating Drupal A ModuleCreating Drupal A Module
Creating Drupal A Module
arcaneadam
 
Hadoop cluster configuration
Hadoop cluster configurationHadoop cluster configuration
Hadoop cluster configuration
prabakaranbrick
 

Similaire à Write Less Drupal Code (20)

Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management Systems
 
Survive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksSurvive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and Tricks
 
SynapseIndia drupal presentation on drupal
SynapseIndia drupal  presentation on drupalSynapseIndia drupal  presentation on drupal
SynapseIndia drupal presentation on drupal
 
Hands on Hadoop and pig
Hands on Hadoop and pigHands on Hadoop and pig
Hands on Hadoop and pig
 
Hadoop Frameworks Panel__HadoopSummit2010
Hadoop Frameworks Panel__HadoopSummit2010Hadoop Frameworks Panel__HadoopSummit2010
Hadoop Frameworks Panel__HadoopSummit2010
 
Drupal distribution
Drupal distributionDrupal distribution
Drupal distribution
 
Escalando Aplicaciones Web
Escalando Aplicaciones WebEscalando Aplicaciones Web
Escalando Aplicaciones Web
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
 
Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...
Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...
Near Real Time Indexing Kafka Messages into Apache Blur: Presented by Dibyend...
 
Creating Drupal A Module
Creating Drupal A ModuleCreating Drupal A Module
Creating Drupal A Module
 
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data Platforms
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data PlatformsCassandra Summit 2014: Apache Spark - The SDK for All Big Data Platforms
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data Platforms
 
Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011Drupal Theme Development - DrupalCon Chicago 2011
Drupal Theme Development - DrupalCon Chicago 2011
 
Introduction à DocumentDB
Introduction à DocumentDBIntroduction à DocumentDB
Introduction à DocumentDB
 
Untangling spring week4
Untangling spring week4Untangling spring week4
Untangling spring week4
 
WordPress option panel and metaboxes 101
WordPress option panel and metaboxes 101WordPress option panel and metaboxes 101
WordPress option panel and metaboxes 101
 
Hadoop cluster configuration
Hadoop cluster configurationHadoop cluster configuration
Hadoop cluster configuration
 
Rapidly prototyping web applications using BackPress
Rapidly prototyping web applications using BackPressRapidly prototyping web applications using BackPress
Rapidly prototyping web applications using BackPress
 
Ruby on rails for beginers
Ruby on rails for beginersRuby on rails for beginers
Ruby on rails for beginers
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
 

Dernier

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
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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...
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Write Less Drupal Code

Notes de l'éditeur

  1. Much of the code we are maintaining in Drupal today isn’t actually Drupal specific.
  2. All these are functions or libraries that are either external libraries or that could very easily be part of an external library. None of them is Drupal-specific.
  3. Recently we found a series of problems with Drupal’s OpenID implementation. We should share our implementation with other projects to minimize these sorts of glitches.
  4. It would be not just beneficial to use more of other project’s code but to also make Drupal’s code available to other projects where it makes sense. Consider this example. I have written a PubsubHubbub subscriber and hub in a non-Drupal specific manner. In a nascent technology like PubsubHubbub it is crucial to share on the lowest common denominator: in this case, PHP. It was actually easy to write the library Drupal independent, but it was also a pain not to be able to rely on Drupal’s convenient library: drupal_http_request(), valid_url(), check_plain().
  5. I couldn’t use any of the useful Drupal helper functions like check_plain() although they’re is no reason why they would be Drupal specific.
  6. The application layer on the web is getting shaped by more and more standards and common best practices. We can’t afford to have a Drupal-only implementation for all of them. We need to get better in integrating with non-Drupal specific code. Let’s open the doors.