This blog post is based on my experiences developing a Commentable widget (more on this later) first using Backbone.js and more recently, AngularJS.

A Polymorphic Commentable Widget?

To be specific, it is:

  • some Javascript + HTML that allows a website visitor to add a comment on a specific page
  • the commenting functionality is not tied to any specific object. In other words, the same code can be used to comment against an Article, a Cat Photo or any business object without any modification
  • the same code should display previous comments in a nested fashion
  • provide a facility to reply to a comment
  • provide a facility to edit or delete any of your own comments

Read More