Skip to content

Assignment 4: Backend Design & Implementation

Data Model

Article[User]

articlePoster: Article -> one User
articleContent: Article -> one String
articleDate: Article -> one Date
articlePoster: Article -> one User
articleContent: Article -> one String
articleDate: Article -> one Date

Comment[Target, User]

commentPoster: Comment -> one User
commentContent: Comment -> one String
commentDate: Comment -> one Date
commentTarget: Comment -> one Target
commentPoster: Comment -> one User
commentContent: Comment -> one String
commentDate: Comment -> one Date
commentTarget: Comment -> one Target

User

username: User -> one String
password: User -> one Password
username: User -> one String
password: User -> one Password

Validation[User]

validatedUser: Validation -> one User
validationDate: Validation -> one User
validationRequests: set User
validatedUser: Validation -> one User
validationDate: Validation -> one User
validationRequests: set User

Bio[User]

bioUser: Bio -> one User
bioContent: Bio -> one String
bioUser: Bio -> one User
bioContent: Bio -> one String

Subscription[User, Content]

subscribers: User -> set User
paidContent: set Content
subscribers: User -> set User
paidContent: set Content

App as a List of Concepts

User = User
Article = Article[User]
CommentToArticle = Comment[Article, User]  
CommentToComment = Comment[Comment, User]
Validation = Validation[user]
Bio = Bio[User]
Subscription = Subscription[User, Article]
User = User
Article = Article[User]
CommentToArticle = Comment[Article, User]  
CommentToComment = Comment[Comment, User]
Validation = Validation[user]
Bio = Bio[User]
Subscription = Subscription[User, Article]

Data Diagram

https://github.com/egekabas/61040Assignment4

https://vercel.com/eges-projects/61040-assignment4

Design Reflection

While implementing the concepts, I realized my app could do with a few more syncs than first mentioned in the previous assignment. For example, we really shouldn't allow users to comment on an article they don't have view access to, which adds a synchronization between the Comment and Subscription concepts. Also, in the previous assignment, I consciously made the decision to not allow any updates or deletes to posts on the website, for transparency, free speech, and consistency. During implementation, I considered and also prototyped some deletes and updates anyway, just because it would be convenient to have them, but eventually decided against them, thinking design values were more important than convenience for the context of this assignment. Also got rid of the ContentAuthoring concept for simplicity in implementation for this context and after the feedback to the previous assignment.