Replies: 2 comments 1 reply
-
What do you think about this proof of concept I've been working on? https://github.com/krakphp/admin/tree/v0/demo/src/Catalog/UI/Component/SizeScale Your concern around untyped data passing between controllers to views is one of the main reasons I started playing with html in php components. |
Beta Was this translation helpful? Give feedback.
-
So, I don't think components necessarily remove the need for a presentation layer. Having presenters for specific entities would still be helpful. You could use components to just receive simple arguments that define the contract for the template within as well. The main thing I appreciate is that the tooling works pretty well with this paradigm, so things like auto complete on fields are all available. |
Beta Was this translation helpful? Give feedback.
-
I don't know if any templating engine implements this, but I imagine it would greatly minimize the risk of incompatible datasets being sent into a view. If templates can state beforehand what contract they require, it helps towards a cleaner code and better testability. Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions