Differences between revisions 10 and 16 (spanning 6 versions)
Revision 10 as of 2011-01-12 20:59:29
Size: 465
Editor: GeoffEhrman
Comment:
Revision 16 as of 2011-01-12 21:22:56
Size: 947
Editor: GeoffEhrman
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

== Things that happen: ==
=== Worksheet: ===
  * evaluate code

      -- introspection

  * create cells

  * delete cells

  * join cells

  * split cells

  * promote/demote cells in a cell heirarchy

=== Cell: ===
  * change input

  * evaluate

  * get_output(''start''=0)

      -- ''start'' - offset telling how much text we've already received

      -- output: {'status': ---, 'output': ---}

  * update metadata: hide, lock...
Line 20: Line 49:
 * update_cell_input(cell_id, input_text)  * update_cell_input(''cell_id'', ''input_text'')
Line 22: Line 51:
 * evaluate_cell(cell_id)  * evaluate_cell(''cell_id'')
Line 24: Line 53:
 * insert_after_cell(cell_id)  * insert_after_cell(''cell_id'')

Guiding principle: put as much in the URL as is reasonable.

Things that happen:

Worksheet:

  • evaluate code
    • -- introspection
  • create cells
  • delete cells
  • join cells
  • split cells
  • promote/demote cells in a cell heirarchy

Cell:

  • change input
  • evaluate
  • get_output(start=0)

    • -- start - offset telling how much text we've already received -- output: {'status': ---, 'output': ---}

  • update metadata: hide, lock...

JSON <---> HTTP

HTTP Requests:

Structure of URL:

/home/ username / worksheet_num / cell_id /..

  • ../update

JSON Messages:

  • 'id' : id

  • 'status' : 'success' or 'failure'

Database Calls:

  • increase_worksheet_state_number()
  • update_cell_input(cell_id, input_text)

  • evaluate_cell(cell_id)

  • insert_after_cell(cell_id)