• page

Installing JavaScriptMVC installing

 

Requirements

JavaScriptMVC requires Java JRE 1.6 or greater for:

  • Compression (Google Closure)
  • Running FuncUnit tests with Selenium
  • Easy updating
  • Code Generators

But your backend server can be written in any language.
Download the latest Java JRE here.

Getting JavaScriptMVC

There are 2 ways to get JavaScriptMVC:

Downloading

Download the latest JavaScriptMVC. Unzip the folder on your file system or web server.
If you are using this on a webserver, unzip in a public folder where the server hosts static content.

TIP: Unzip these files as high in your apps folder structure as possible (i.e. don't put them under a javascriptmvc folder in your public directory).

Installing JavaScriptMVC with Git.

JavaScriptMVC is comprised of 7 sub projects:

You want to fork each project and add it as a submodule to your project in a public folder (where your server keeps static content). If these words mean nothing to you, or you'd like more explanation, you might want to read Developing With Git.

Forking the repos looks like:

git submodule add git@github.com:_YOU_/steal.git public/steal
git submodule add git@github.com:_YOU_/canjs.git public/can
git submodule add git@github.com:_YOU_/canui.git public/canui
git submodule add git@github.com:_YOU_/jquerypp.git public/jquerypp
git submodule add git@github.com:_YOU_/documentjs.git public/documentjs
git submodule add git@github.com:_YOU_/funcunit.git public/funcunit
git submodule add git@github.com:_YOU_/jmvc-generators.git public/jmvc

Notice that CanJS is in can folder and jQuery++ is in the jquerypp folder.

After installing the repository, run:

[WINDOWS] > steal\js steal\make.js

[Lin/Mac] > ./steal/js steal/make.js

Verifing the install

In your public (or static) folder, you should have something that looks like:

static
  \documentjs - DocumentJS library
  \funcunit   - FuncUnit testing library
  \canjs      - CanJS MVC Framework
  \canui      - Widgets built on CanJS and jQuery++
  \jquery     - jQuery's missing utils and special events
  \steal      - Compression and build system
  \js.bat     - Windows Rhino shortcut
  \js         - Mac/Linux Rhino shortcut

Open a command line to that folder and run:

[WINDOWS] > js

[Lin/Mac] > ./js

This starts the Rhino JS engine. Type quit() to exit.