Source Code of MediaGrid-Chat

The source code of MediaGrid consists of two parts: chat and media. The function of chat is to post in public or private rooms, and the function of media is to sharing files among users. The source code tree of chat is shown in the figure.

The main function code lies in the fold script. As you can see, the fold contains several JavaScript files. Here’s a brief introduction to these files:

  • app.js:  Main router of a request, and returns desktop.html.
  • build.js: A compressed math library, contains some crypto algorithm.
  • chat.js: An outdated implementation of MediaGrid.
  • controllers.js: Controllers of the dialogs and chatting desktop.
  • directives.js: ???
  • filters.js: ???
  • jquery.couch.js: Jquery interface for couchdb.
  • jquery-1.7.2.min.js: jQuery library.
  • services.js: CouchDB database services.
  • utils.js: cryptocat functions and random number generation.

Except these files, index.html is the file to include all related JavaScript files, and provide an entry point of the application.
Among these files, controller.js and services.js provides are most important. So here comes a more detailed introduction to these files.









Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s