Skip to content

An imitation of quora.com -- Built from the ground up with PostgreSQL, Ruby on Rails, backbone.js, Twitter Bootstrap, and Devise.

Notifications You must be signed in to change notification settings

wolverdude/Inquisit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Inquisit!

This is an imitation of quora.com. I built it from the ground using these technologies:

Current features include:

  • Asking and editing questions.
  • Answering said questions.
  • Adding, removing, and editing topics.
  • Viewing questions by topic.
  • User profiles. -- still tweaking this one.
  • Upvoting/downvoting questions.
  • Server-integrated autocomplete.

Featured code:

Unique challenges:

  • There was a 3n+1 queries problem in my Answers model. To solve it, I had to write a farily complex SQL query that I wrote about in my blog.
  • I had a lot of code duplication in my Backbone sub-views, so I created a generic sub-view class that I extended for all my subviews.
  • In Backbone a memory leak will occur if you don't explicitly unbind listeners from an old view. This can be accomplished by executing remove() on the view, but this doesn't remove listeners from any subviews it may have. To solve this, I wrote methods to keep track of subviews and unbind them when the parent view is removed.
  • Backbone-relational has some quirks:
    • You cannot instantiate the same object twice. This makes sense, but it throws an error when you try to do this instead of merging the two objects. There is a way to do this, but only if you have the object's id. I didn't, so I had to come up with a workaround.
    • There's a weird glitch where backbone-relational triggers an event in my Topics sub-view from my Topics router. Simple to fix, but hard to track down.
  • The font I chose for the logo wasn't supported on most browsers, so I had to force-load it with CSS3 @font-face.
  • Immitating (not copying) Quora.com's styling.

Seriously, try it out!

About

An imitation of quora.com -- Built from the ground up with PostgreSQL, Ruby on Rails, backbone.js, Twitter Bootstrap, and Devise.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published