Skip to content

Commit fa41f94

Browse files
committed
Update v3/docs/developer-overview.md
1 parent 736e398 commit fa41f94

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

‎v3/docs/developer-overview.md‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Look at the Git history to see when this document was last updated; the more tim
77
elapsed since that date, the more likely things are out-of-date. Please email
88
philip@pgbovine.net if you have questions.
99

10+
And please excuse the sloppy writing; I'm not trying to win any style awards here :)
11+
1012

1113
## Running OPT locally on your machine
1214

@@ -19,11 +21,22 @@ for your OS and then run:
1921

2022
Now if you visit http://localhost:8080/ on your browser, you should see the main OPT editor screen.
2123

22-
Congrats! Now you can edit your code and reload the page to test your changes. You don't need to shut down and restart
23-
the local webserver after every edit.
24+
Congrats! Now you can edit any code in `OnlinePythonTutor/v3/` and reload the page to test your changes.
25+
You don't need to shut down and restart the local webserver after every edit.
2426

2527
The main caveat here is that Google App Engine runs Python 2.7, so you won't be able to test Python 3 locally this way.
2628

2729

2830
## Overall system architecture
2931

32+
OPT consists of a pure-Python backend and an HTML/CSS/JavaScript frontend. All of the relevant files are located in `OnlinePythonTutor/v3/`, since v3 is the currently active version.
33+
34+
Here is a typical user interaction sequence:
35+
36+
1. The user types in Python code in the editor (powered by [CodeMirror](http://www.codemirror.net/)).
37+
2. The user hits the "Visualize execution" button.
38+
3. The OPT frontend sends the user's Python code as a string to the backend by making an AJAX GET request.
39+
4. The backend executes the Python code under the supervision of the Python [bdb](http://docs.python.org/library/bdb.html) debugger module, produces an execution trace, and send that trace back to the frontend.
40+
5. The frontend switches to a visualization pane, parses the execution trace, and renders the appropriate stack frames and heap objects.
41+
6. When the user interacts with the frontend by stepping through execution points (forwards and backwards), the frontend renders the proper data structures WITHOUT making another call to the backend.
42+

0 commit comments

Comments
 (0)