Answer the question
In order to leave comments, you need to log in
Repository or CQRS?
Hello!
I am developing one project (ASP.NET MVC) and I have a question regarding the architecture of the application. On the Internet, I found a lot of material on this issue, but still I have some questions. Most of all I liked the idea of CQRS, but it remained unclear to me how best to implement this in the project (I would like it without repositories and eventsourcing). I'm a lousy designer and that's why I decided to ask a question here. + I would like to know what design patterns you recommend.
Answer the question
In order to leave comments, you need to log in
It’s always like this, they were fascinated by a beautiful idea, they liked something somewhere, their hands itch to apply ... Whether it’s necessary or not ... Start from what you want to do, but you haven’t told about it, and already then you can move on to which paradigm to choose, then choose patterns, frameworks, libraries (but it’s better to have as few of them as possible, of course). That's why you CQRS? What will he decide and why is it not better without him? You will not be able to answer these questions if you do not go from the task. And then it goes like this: "whatever I don't write - the whole controller comes out, this is probably because I think about controllers all the time")))
Good afternoon!
To be honest, I don't know what exactly you liked about CQRS and EventSourcing. In my opinion, this is too complicated, unusual approach, which can be used in exceptionally rare cases (as Timur Shemsedinov said , everything depends on the task). Application design approaches should be applied not when you like them, but when you need to solve a specific problem. If you always do "all sorts of such interesting things" when developing applications, then the development process will go to infinity ... Design according to the principle: there is a task - how best (by "better" I mean: simple , effective , fast) solve it. Everything. If the project is "exclusively" for educational purposes - then please, here you are free to use whatever your heart desires. But if the project is real, and it "feeds" you, then you should restrain your zeal for new approaches and always ask the question: will this technology/pattern/mechanism/approach help me solve this problem? Yes - it means we take, teach, use, implement. No, it means fuck. Then there will be more hemorrhoids with maintaining and changing the code (and always think about the developer who will get your code after you).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question