I have been reading about the Domain driven design lately but I rarely see it in the web applications(or I may have failed to google it), I think we now have enough complexity to deal with in web application too.
I need a way to keep my models and business logic clean and least coupled and framework/library agnostic. For example today I am using AngularJS and tomorrow I may switch the UI to ReactJS.
Having said that I am trying to learn this with a simple example. Suppose I am trying to create Quote application with the following features:
Given a Quote
- Can be upvoted / downvoted.
- Can be starred.
- Can be created by User (Goes in the review Queue).
- An user can share it via (Twitter, Facebook etc).
Given an User
When not logged:
- Can see random quote.
- Can upvote / downvote a quote.
- Can search a Quote by Title or Author.
When logged in:
- Can create a Quote.
- Can star a quote.
I am interested in how the above requirements can be achieved in keeping UI and business logic clean and separate.
I am not an expert but at present I can come with these requirements which may well change in future.
Aucun commentaire:
Enregistrer un commentaire