#I-SEARCH
Welcome, this is an I-SEARCH (strange apple-like acronym meaning A unIfied framework for multimodal SEARCH) repo. This space is used to build the GUI part of I-SEARCH.
##Some info:
##Try to be compliant with the Google JS Style guide:
It can be found here (e.g, indentation = 2 spaces, no tabs, or opening bracket on the same line, etc)
##Use of requireJS for dependancy management
RequireJS (check the official website) is a dependancy management system, which will need at some point (loading all the scripts at the beginning is just not an option when there will be heavy visualization scripting)
Let's also embrace the use of module pattern. Example:
define("the/path/to/my/module", ["dependency1", "dependency2"], function(dependency1, dependency2){
//This will execute when the dependancies are loaded
var privateVariable = "secret";
var privateStuff = function(){
dependency1.aUsefulFunction();
dependency2.util(privateVariable);
//do stuff
};
var publicThing = "hooray";
var iAmPublic = function(){
//do stuff
};
//This is where you decide which method/variable is public or
//private. It defines the module API.
return {
moduleVar: publicThing,
moduleFunction: iAmPublic,
};
})
##Install guide
###Linux
The GUI framework for I-SEARCH is based on client and server side Javascript. Which means, that a NodeJS server is needed with several module dependencies in order to run all components of the I-SEARCH GUI Framework. Here is a little step-by-step setup guide in order to run this code on your Linux server:
npm install connect -g
npm install connect-redis -g
npm install express -g
npm install jsdom -g
npm install now -g
npm install restler -g
npm install webservice -g
npm install step -g
npm install forever -g
npm install http-proxy -g
git clone git://github.com/tomayac/isearch.git
forever start index-ptag.js
forever start index.js
forever start isearch-proxy.js
npm install <module_name>
in the folder###Windows
NodeJS can also run on Windows, but it's not as nice as Linux. There is quite a lot going on right now. You can find the newest Windows binary here: http://nodejs.org/ and click the Download" button.
Some guidiance in how to set up nodeJS on Windows 7 can be found here. After you installed the binary for Windows from nodejs.org do the following steps:
nodejs is basically installed into "C:\Program Files (x86)\nodejs", add this path to your PATH enviroment variable via System Settings > System > Enhanced System Settings.
Set up a new enviroment variavle called "NODE_PATH" with the value of your node directory - basically it's "C:\Program Files (x86)\nodejs"
your global node modules will be installed under in the npm data directory which is mostly found under "C:\Users\USERNAME\AppData\Roaming\npm\node_modules"
Install the modules listed in the Linux instructions within the cmd.exe
in admin mode by just
entering npm install MODULENAME -g
- so the same procedure like under Linux.
Problems: some modules want install now, since they need to be compiled. A trick can be to go directly to the GitHub pages of the module creators and download the sources as ZIP file. Some modules creators provide already compiled versions of there modules for Windows builds of nodeJS. The process is as follows:
The jsdom module is an example of the problems currently seen with Windows installations of nodeJS. Here is an example: https://github.com/tmpvar/jsdom/issues/378 for reference.
##Other matters:
Have fun!
##License:
This software is released under the DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, version 2 (http://sam.zoy.org/wtfpl/COPYING):
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004
Copyright (C) 2004 Sam Hocevar [email protected]
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION