Remove the feeds module
This commit is contained in:
parent
acfd1cca8d
commit
0c98be96eb
851 changed files with 840 additions and 10348 deletions
|
@ -87,14 +87,5 @@
|
|||
"processed": "\n <p>When creating a custom module, where do you put your business logic?<\/p>\n\n<p>You want to keep classes like Controllers and Commands simple and move any reusable logic into separate files.<\/p>\n\n<p>Usually, this means 'Service' classes, but another approach I like is to use 'Action' classes.<\/p>\n\n<h2 id=\"what-is-an-action-class%3F\">What is an Action class?<\/h2>\n\n<p>An Action is a PHP class representing a single action that must be performed.<\/p>\n\n<p>It usually contains a single method with a descriptive name summarising the task, such as <code>GetAccessToken<\/code>.<\/p>\n\n<p>This differs from a generic service like <code>ApiService<\/code> with multiple methods like <code>getAccessToken()<\/code>.<\/p>\n\n<h2 id=\"using-action-classes\">Using Action classes<\/h2>\n\n<p>I'll register Action classes in the service container to use dependency injection and autowiring and easily inject the Action into other classes that need it, like Controllers and Commands.<\/p>\n\n<p>If you need multiple implementations, multiple actions can implement the same Interface and make them swappable, such as having <code>GetAccessToken<\/code> and <code>GetAndCacheAccessToken<\/code> implement the same <code>GetsAccessToken<\/code> interface.<\/p>\n\n<p>That also enables using design patterns like Decorators with Actions.<\/p>\n\n<h2 id=\"why-i-like-actions\">Why I like Actions<\/h2>\n\n<p>I like more readable and meaningful class names and prefer working with multiple simpler classes than those with fewer complex ones.<\/p>\n\n<p>I like leveraging design patterns I'm used to, such as the Decorator pattern, by having common interfaces and contracts.<\/p>\n\n<p>I like that if I need to add another implementation, I can add it without changing the existing code, so it follows the SOLID principles.<\/p>\n\n<h2 id=\"what-about-you%3F\">What about you?<\/h2>\n\n<p>Do you use Action classes in your code, or do you use Services or something else?<\/p>\n\n<p>Reply to this email and let me know.<\/p>\n\n ",
|
||||
"summary": null
|
||||
}
|
||||
],
|
||||
"feeds_item": [
|
||||
{
|
||||
"imported": "1970-01-01T00:32:50+00:00",
|
||||
"guid": null,
|
||||
"hash": "f43fe44d7a6115a84e3ad56bda9fb804",
|
||||
"target_type": "feeds_feed",
|
||||
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue