Authorship
Currently, posts have an author name associated with them, but there’s no association with an account. Let’s add that relationship so that we can enhance posts to include elements from the author’s profile.
Associate Messages with Accounts
Let’s think about what the author relationship will look like. Is an author always present? Not necessarily. What if an account is deleted? What if we want to allow anonymous posts? All these concerns can be addressed by creating an optional foreign key and handling posts without it.
Also, since we’re constructing the expected message rather than getting it back from the save-message! function, we need to update this behavior in two different places: Ajax and WebSockets. We can do better than this, ...
Get Web Development with Clojure, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.