oliverdavies.uk/content/node.a5edab26-6910-43c9-ba33-3f482849596a.yml

73 lines
2.9 KiB
YAML

uuid:
- value: a5edab26-6910-43c9-ba33-3f482849596a
langcode:
- value: en
type:
- target_id: daily_email
target_type: node_type
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
revision_timestamp:
- value: '2025-05-11T09:00:36+00:00'
revision_uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
revision_log: { }
status:
- value: true
uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
title:
- value: |
Stick to conventions
created:
- value: '2023-07-27T00:00:00+00:00'
changed:
- value: '2025-05-11T09:00:36+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2023/07/27/stick-to-conventions
langcode: en
body:
- value: |
<p>If you're performing a task as there's already a convention on how to do it, stick to it.</p>
<p>If the codebase follows a particular coding standard, use it.</p>
<p>If a project uses repository classes instead of interacting directly with a database, do that with your code too.</p>
<p>If you use a framework with a service container and uses dependency injection, do that instead of manually creating classes.</p>
<p>If you need additional functionality for a Drupal project and there's an established and well-known module that adds it, use it. Unless it doesn't meet your needs, in which case, document why that's the case and why you used a different module or wrote a custom implementation.</p>
<p>If you need to create a content listing page, use the Views module, which is a standard approach. If not, document why and then explore other solutions.</p>
<p>If you don't follow a convention, it will be harder for you or others to work on it in the future.</p>
format: full_html
processed: |
<p>If you're performing a task as there's already a convention on how to do it, stick to it.</p>
<p>If the codebase follows a particular coding standard, use it.</p>
<p>If a project uses repository classes instead of interacting directly with a database, do that with your code too.</p>
<p>If you use a framework with a service container and uses dependency injection, do that instead of manually creating classes.</p>
<p>If you need additional functionality for a Drupal project and there's an established and well-known module that adds it, use it. Unless it doesn't meet your needs, in which case, document why that's the case and why you used a different module or wrote a custom implementation.</p>
<p>If you need to create a content listing page, use the Views module, which is a standard approach. If not, document why and then explore other solutions.</p>
<p>If you don't follow a convention, it will be harder for you or others to work on it in the future.</p>
summary: null
field_daily_email_cta: { }