Home > mysystem

mysystem

Mysystem is a project mainly written in JAVASCRIPT and RUBY, it's free.

system diagram tool for use in CLEAR project.

h1. Overview

This project consists of two components: MySystem and the Sinatra app.

MySystem is the core product that described below in the section "MySystem", and it gets built from src/ and other directories into public/.

The whole thing is a sinatra app (called MySystem-Sinatra here on) runnable from the top directory, which gets built to the appspot/ directory and deployed from there to Google App Engine.


h1. MySystem

Part of the CLEAR project, MySystem is a system diagraming tool. Part of the goal is to be a light-weight javascript component to be used inside something like mozSwing (?)

See the basecamp docs for the project description for "CLEAR":http://concordconsortium.basecamphq.com/projects/2939067/project/log See Alex' Narratives in "this spreadsheet":http://concordconsortium.basecamphq.com/projects/2939067/file/30061007/CLEAR%20Narrative%20Linking%205_28.xls

h3. Ruby & Gem dependencies

The application uses bundler to manage gem dependencies. This is required to run on googles app engine.
You can also run sinatra locally using the bundled gems using

bundler exec ruby app.rb

You can also setup a gemset using rvm

rvm use 
rvm gemset create mysystem
rvm gemset use mysystem
rvm gemset import mysystem.gems

If you are not using RVM, you can roll the dice and try: rake gems:install -- which isn't very verbose, but should install tall the gems listed in mysystem.gems

h3. Javascript Dependencies

Mysystem is derived from "WireIt":http://http://javascript.neyric.com/wireit/ Which uses "YUI":http://developer.yahoo.com/yui/

We just switched to JQuery and JQuery UI for our own work.

(note: that currently all dependent libraries are included in this repo, and thats not good....) (note: We are working on reducing dependancies on these libraries.)

h3. Building for distribution

If you have ruby installed, you should also install a few gems to run the distro rake task

  • @sudo gem install --remote sprockets@
  • @sudo gem sources -a http://gems.opscode.com@ (Not clear as of 04/14/2010 why/whether we need this)

If you need to make a compact and easy to distribute version of MySystem, you can use Rake to build the system into public/ directory. Building is not required; You can preview the work simply by opening src/mysystem-dev.html in your browser.

  • @rake combine:all@
  • @open ./public/mysystem.html@*

h3. Testing

JavaScript lint: @rake jslint@ (JavaScript lint must be installed, with jsl in path: "http://www.javascriptlint.com":http://www.javascriptlint.com)

I had installed visionmedia-jspec with @sudo gem install visionmedia-jspec@ but then I copied the spec javascripts and css flies into the tests/ directory.

All test can be run by opening ./test/spec.dev.html in a browser. After you have built the dist directory, you can run test on the dist opening ./test/spec.dist.html.

h3. Todo

authorable pallet of icons / node types.

decouple view from models

code documentation

more tests

google gears integration.

means to handle page-out data saving.

Subsystems: The ability to add 'sub-modules' inside of modules (nested modules)

Clean up dependencies on YUI if possible.

restructure this repository

?? more!


h1. MySystem-Sinatra

This is a simple server container/backend for the MySystem pre-prototype demo. It uses Google App-Engine, and DataMapper.

h3. Dependencies

Uses "Google App Engine":http://rails-primer.appspot.com/ Gem: sudo gem install google-appengine

Uses "DataMapper":http://datamapper.org/

h3. Info

Gems installed by editing Gemfile and running 'appcfg.rb bundle .' are checked into github. (these gems are local in ./.gems/gems/)

install the google-appengine gem : sudo gem install google-appengine

Follow other instructions at http://code.google.com/p/appengine-jruby/wiki/GettingStarted

try out the app with ruby ./app.rb or at the console with irb require 'config'

run in developer mode with "dev_appserver.rb ." (intsalled with google-appengine gem)

deploy the application with "appcfg.rb update ."

the application will be available at http://ccmysystem.appspot.com/mysystem.html

h3. Building

@rake appspot:sinatra_app@ builds a sinatra app deployable to appspot into the appspot/ directory.

h3. Deploying

@rake appspot:deploy@ deploys the app to Google App Engine.

h3. Running

(1) Locally: Go to top directory and do @ruby app.rb@ Open "http://localhost:4567"

(2) Locally in Google App Engine development environment: Go to top directory and do @dev_appserver.rb appspot@ Open "http://localhost:8080"

(3) From Google App Engine: Open "http://ccmysystem.appspot.com/mysystem.html":http://ccmysystem.appspot.com/mysystem.html