100 lines
No EOL
4.4 KiB
JSON
100 lines
No EOL
4.4 KiB
JSON
{
|
|
"uuid": [
|
|
{
|
|
"value": "4c0b0072-4046-48aa-b481-84515c265ca0"
|
|
}
|
|
],
|
|
"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:10+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": "Do you separate your logic?"
|
|
}
|
|
],
|
|
"created": [
|
|
{
|
|
"value": "2024-06-11T00:00:00+00:00"
|
|
}
|
|
],
|
|
"changed": [
|
|
{
|
|
"value": "2025-05-11T09:00:10+00:00"
|
|
}
|
|
],
|
|
"promote": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"sticky": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"default_langcode": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"revision_translation_affected": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"path": [
|
|
{
|
|
"alias": "\/daily\/2024\/06\/11\/do-you-separate-your-logic",
|
|
"langcode": "en"
|
|
}
|
|
],
|
|
"body": [
|
|
{
|
|
"value": "\n <p>I recently watched <a href=\"https:\/\/www.youtube.com\/watch?v=DuozyaJQQ1U\">a video about separating logic<\/a> into different categories within your custom code.<\/p>\n\n<p>It wasn't a PHP video, but the concept applies to any programming language or framework.<\/p>\n\n<p>This was the final structure of the directories:<\/p>\n\n<pre><code class=\"plain\">src\/\n Controllers\/\n Domain\/\n Persistence\/\n Properties\/\n Services\/\n<\/code><\/pre>\n\n<p>It was described as using <code>Controllers<\/code> for presentational logic, <code>Domain<\/code> for domain logic, and <code>Services<\/code> for application logic, and reminds me of a domain-driven design (DDD) approach to organising code.<\/p>\n\n<p>I remember watching other older videos showing separating business and presentational logic in React into different components (if I remember correctly).<\/p>\n\n<p>This isn't an approach I see in Drupal code, maybe more-so in other PHP framework-based projects like Symfony or Laravel.<\/p>\n\n<p>It's something I've been thinking of trying, potentially on my website codebase.<\/p>\n\n<p>Do you organise your code in this or a similar way?<\/p>\n\n<p>If so, why?<\/p>\n\n<p>What advantages does it bring?<\/p>\n\n ",
|
|
"format": "full_html",
|
|
"processed": "\n <p>I recently watched <a href=\"https:\/\/www.youtube.com\/watch?v=DuozyaJQQ1U\">a video about separating logic<\/a> into different categories within your custom code.<\/p>\n\n<p>It wasn't a PHP video, but the concept applies to any programming language or framework.<\/p>\n\n<p>This was the final structure of the directories:<\/p>\n\n<pre><code class=\"plain\">src\/\n Controllers\/\n Domain\/\n Persistence\/\n Properties\/\n Services\/\n<\/code><\/pre>\n\n<p>It was described as using <code>Controllers<\/code> for presentational logic, <code>Domain<\/code> for domain logic, and <code>Services<\/code> for application logic, and reminds me of a domain-driven design (DDD) approach to organising code.<\/p>\n\n<p>I remember watching other older videos showing separating business and presentational logic in React into different components (if I remember correctly).<\/p>\n\n<p>This isn't an approach I see in Drupal code, maybe more-so in other PHP framework-based projects like Symfony or Laravel.<\/p>\n\n<p>It's something I've been thinking of trying, potentially on my website codebase.<\/p>\n\n<p>Do you organise your code in this or a similar way?<\/p>\n\n<p>If so, why?<\/p>\n\n<p>What advantages does it bring?<\/p>\n\n ",
|
|
"summary": null
|
|
}
|
|
],
|
|
"feeds_item": [
|
|
{
|
|
"imported": "2025-05-11T09:00:10+00:00",
|
|
"guid": null,
|
|
"hash": "a59b6f540ddfce9e980f906b5921178c",
|
|
"target_type": "feeds_feed",
|
|
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
|
|
}
|
|
]
|
|
} |