3

I want to make simple authorization & authentification server (with proper audit logging).

I used to see on my job or in many examples classic CRUD approach for this purposes.

But now I'm thinking about try to use CQRS (+ ES maybe) approach for my simple web-app. But this app requires authorization & authentification (of course). And I want to keep it as separate deployed app with UI for admin.

But the question is, should I implement this separate server with CQRS approach as well? Or it will be an overkill for that?

It simply should return is current user is valid and user session time left.

P.S.

Server will be implemented via C# .NET


term definitions:

CRUD: Create, read, update and delete.

CQRS + ES: Command Query Responsibility Segregation + Event Sourcing

4

You can agonize over this issue but I've found the easiest path to a good design is to come at it from the using code.

Don't worry about how easy / hard it is to write. Worry about how it is to use. Can you provide a meaningful abstraction that hides details yet doesn't surprise people? The more effort it takes to explain its use to others the less helpful it is.

What you should be taking advantage of is that, unlike the people who designed SQL or your database, you know what your use cases are. So you can specialize and simplify.

If doing all that ends up no better than CRUD then just use CRUD.

  • Yes priority on usability, but still be carefull about poor implementation. – Walfrat May 29 '17 at 21:40
  • @walfrat Wont argue with that. – candied_orange May 29 '17 at 21:47
  • Oh, well, thank you, guys! Seems like CRUD is beter in this case, been talking with some seniors on my job as well, and got to many "whys" on CQRS :) – Danil Gholtsman May 30 '17 at 5:38
  • 1
    Getting "whys" shouldn't be the end of the conversation. Get an answer to "why not". Because the worst is to program on faith. Don't choose either without knowing why. Someday you'll be the senior dealing with a newbie asking you why. Don't let the newbie down. – candied_orange May 30 '17 at 5:46

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.