• Stars
    star
    410
  • Rank 105,468 (Top 3 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 11 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A tool for visualizing and experimenting with JavaScript object relationships.

Object Playground

Object Playground is a tool for visualizing and experimenting with JavaScript object relationships. It's online at objectplayground.com. Object Playground is a project from Let's Code: Test-Driven JavaScript, a screencast series focused on professional, rigorous JavaScript development. Created by James Shore.

This repository contains the source code for Object Playground.

Browser Support

Object Playground has been tested against the browsers listed at the top of Jakefile.js. At the time of this writing, the following browsers are known to work. Other modern browsers are likely to work as well.

  • Chrome 40
  • Firefox 36
  • IE 10
  • IE 11
  • Safari 8.0 (Mac)
  • Safari 7.0 (iOS)

The following browsers are known to not work:

  • IE 9: Lacks the Int32Array type used by Viz.js. A polyfill was attempted, but resulted in an "out of memory" error.
  • IE 8: Does not support SVG, lacks Int32Array type.

Building and Testing

Before building for the first time:

  1. Install Node.js. Use the version described in Jakefile.js NODE_VERSION variable. (The npm n package can help with changing Node versions.)
  2. Download the source code by cloning the git repository: git clone https://github.com/jamesshore/object_playground.
  3. All commands must run from the root of the source tree: cd <directory>.
  4. To cause the build to fail unless certain browsers are tested, edit TESTED_BROWSERS at the top of Jakefile.js.

To build (and test):

  1. Run ./jake.sh karma (Unix/Mac) or jake karma (Windows) to start the Karma server.
  2. Point the browsers you want to test against at the URL http://localhost:8080.
  3. Run ./jake.sh (Unix/Mac) or jake (Windows) every time you want to build and test. Use the loose=true option to relax the Node.js and browser version requirements.

Note: At the time of this writing, the source code has not been confirmed to build on Windows.

To test manually:

  1. Run ./jake.sh run.
  2. Open http://localhost:8080 in a browser.

(Or just open src/index.html in a browser.)

Development and Integration

This repository contains two branches:

  • master is for development.
  • integration is guaranteed to build and pass all tests.

To integrate:

  1. Get to a clean build and commit your code to the master branch.
  2. Run ./integrate.sh (Unix/Mac) or integrate (Windows) to test the master branch and merge it into the integration branch.

To change code samples:

  1. Use convert_sample.pl to convert code to JavaScript string.
  2. Modify src/user_code.js with new sample.

Deploying

Before deploying for the first time:

  1. Install rsync or make sure it's available on the path
  2. Modify PRODUCTION_HOST at top of deploy.jakefile to match production host (using username@host format)
  3. Modify PRODUCTION_DIR at top of deploy.jakefile to be the directory on the host where your public web content goes

To deploy:

  1. Run ./deploy.sh latest (Unix/Mac) or deploy latest (Windows) to integrate the master branch and deploy it. The script will tag your git repository with deploy-<date>-<timestamp> if the deploy succeeds.

In case of a bad deployment:

  1. Choose a previous, good commit to deploy. gitk --all and the deploy tags may be helpful here.
  2. Check out the commit: git checkout <commit_id>
  3. Run ./deploy.sh head (Unix/Mac) or deploy head (Windows) to deploy the commit. As above, the script will tag the git repository if the deploy succeeds.

More Repositories

1

quixote

CSS unit and integration testing
JavaScript
834
star
2

lets_code_javascript

Let's Code: Test-Driven Javascript. A screencast series about rigorous, professional web development.
JavaScript
252
star
3

tdd-intro

Everything you need to conduct an introductory workshop on test-driven development.
JavaScript
133
star
4

test-console

A simple and pragmatic library for testing Node.js console output.
JavaScript
86
star
5

lets_play_tdd

Let's Play: Test-Driven Development
Java
79
star
6

lab10_react

The Lab: Front-End Frameworks: React
JavaScript
39
star
7

testing-without-mocks-example

A demonstration of James Shore's "Testing Without Mocks" pattern language.
JavaScript
36
star
8

automatopia

A JavaScript seed project with build, test, CI, and deployment workflow automation.
JavaScript
34
star
9

livestream

Code for James Shore's livestream: https://www.twitch.tv/jamesshorelive
JavaScript
30
star
10

testing-without-mocks-complex

An elaborate demonstration of James Shore's "Testing Without Mocks" pattern language.
JavaScript
26
star
11

Autocommit

An experiment in demonstrating TDD.
JavaScript
25
star
12

lab13_angularjs

The Lab: Front-End Frameworks: AngularJS
JavaScript
18
star
13

how_to_tabs

Source code for "How To: Tabs," a beginner-focused screencast from Let's Code JavaScript.
JavaScript
15
star
14

simplebuild

Universal Task Automation for Node.js
JavaScript
13
star
15

ai_chronicles

A demonstration of integrating with ChatGPT/OpenAI using React, TypeScript, Spring Boot, and Java.
JavaScript
7
star
16

simplebuild-jshint

A simple library for automating JSHint. Now with multi-core capability.
JavaScript
6
star
17

Architectural-Design-Challenge

An exploration of various architectures. See home page for more.
Java
6
star
18

Lessons-Learned-CI-Git

Example code for "Lessons Learned: Continuous Integration with Git"
JavaScript
4
star
19

ll15_large_scale_javascript

Lessons Learned: Large-Scale JavaScript Fundamentals with Karma and CommonJS
JavaScript
4
star
20

Lessons-Learned-Lint-Javascript

Example code for a sample episode of "Let's Code: Test-Driven Javascript" screencast.
JavaScript
4
star
21

big-object-diff

Visualize the differences between large JavaScript objects.
JavaScript
3
star
22

lab1_grunt_shootout

The Lab: The Great Grunt Shootout
JavaScript
3
star
23

4e_treasure

A random treasure parcel generator for D&D 4e.
Ruby
3
star
24

ll11_front_end_unit_testing

Lessons Learned: Front-End Unit Testing
JavaScript
2
star
25

simplebuild-karma

A simple library for automating Karma.
JavaScript
2
star
26

lab_angular2

The Lab: Front-End Frameworks: Angular 2+
TypeScript
2
star
27

tdd-faster-workshop

This repository is for use with James Shore's "Faster, More Effective Test-Driven Development" workshop.
JavaScript
2
star
28

lab5_casperjs

The Lab: CasperJS
JavaScript
2
star
29

Lessons-Learned-Smoke-Testing-Node

Example code for "Lessons Learned: Smoke Testing a Node.js Web Server"
JavaScript
1
star
30

ll10_ui_testing_strategies

Lessons Learned: DOM Events and UI Testing Strategies
JavaScript
1
star
31

lab_dotnet_glue

The Lab: .NET Glue Code
C#
1
star
32

Lessons-Learned-Cross-Browser-Testing

Example code for "Lessons Learned: Cross-Browser Testing with Testacular"
JavaScript
1
star
33

ll14_front_end_modules

Lessons Learned: Front-End Modules--Namespaces, AMD, and CommonJS
JavaScript
1
star
34

simplebuild-moduledoc

Autogenerate README files for simplebuild modules.
JavaScript
1
star
35

Lessons-Learned-Unit-Testing-DOM-Manipulation

Example code for "Lessons Learned: Unit Testing DOM Manipulation Code"
JavaScript
1
star
36

lab16_emberjs

The Lab: Front-End Frameworks: Ember.js
JavaScript
1
star