0

I am pretty new to Clean Architecture / Onion Achitecture, I actually not sure if the 2 terms are exchangeable. So it pretty clear to me, considering is a few days I am reading and study about it. It get even more clear after have read this one article and Clean Architecture on Frontend.

On that one, actually I use the same framework(React) and Typescript.

The challenge I ma facing is indeed find those entities for the particular task I am facing, build the UI for a search tool. This assuming all the codebase has still yet to be refactored but as we are going to approach the change with small refactoring, somehow this make thing more complicate, at least at this stage where teams knowledge is still to be built.

Try to explaining, with an example, let' assume you work for a cars producer company and your task

indeed to build the UI of an internal tool that let you search for a car searching via model or phone of the dealer, and then visualize in a table all the information regarding the car dealer, along with medel infos.

So far I come up with kind of my model representation for which I should write TS interface as the model inside the "core", the input for the "model" and one for the phone. Nevertheless as in the application there are others form and I am using Material UI, those are already "done" in the UI, is just a matter or reuse them, that are I guess the "services".

Not sure what the best approach would be as this "search tool" should use other models that are not even implemented in such way, but let's assume that at least the onion architecture for the cars UI is ready.enter image description here

As said I am struggling to find the entities for the model, and it is the most important thing as I have read.

3
  • Is the purpose of your tool solely how to search through existing data, and not to create/update/delete this data? Because if it is, the CRUD abilities should be significantly more indicative of your domain design than an arbitrary query will be.
    – Flater
    Jun 27 at 7:12
  • 'Is the purpose of your tool solely how to search through existing data' exactly. Jun 27 at 14:58
  • Requirements could change and require some crud that is still done via RTK but I don't see how such information add to me to understand my entities in the model that should be independent as from the goal of clean architecture from uses cases and more over infrastructure. Jun 27 at 21:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.