GithubHelp home page GithubHelp logo

wolverdude / inquisit Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 1.0 656 KB

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

Home Page: inquisit.herokuapp.com/users/sign_in

Ruby 13.66% CoffeeScript 0.38% JavaScript 45.00% CSS 40.97%

inquisit's Introduction

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!

inquisit's People

Contributors

wolverdude avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

arunprabu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.