annotate roundup/web/NOTES.md @ 4943:7920d700e580 routing

Add support for extensions to provide custom pages to Roundup and update CHANGES.txt 1. Added registerHandler() extension point to instance.Tracker to register URL handlers for specific routes 2. Added processing of extension routes to client.cgi 3. Added example plugins/extensions/custompage.py
author anatoly techtonik <techtonik@gmail.com>
date Tue, 25 Nov 2014 17:29:38 +0300
parents 355ce349df42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4905
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
1
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
2 Engineering notes for Roundup components for web.
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
3
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
4
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
5 ### Logical structure of web components
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
6
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
7 An attempt to see what components are present in
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
8 web request processing.
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
9
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
10 +-----------+
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
11 | |
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
12 | Router |
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
13 └─----------+ (pure logic)
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
14 ----------------------------------------------
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
15 +-----------+
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
16 | |
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
17 | Login |
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
18 └-----------+ (logic + templates + messages)
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
19 ----------------------------------------------
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
20 +-----------+
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
21 ¦ ¦
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
22 ¦ User DB ¦
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
23 └-----------+ (messages)
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
24
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
25
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
26 Every component consists of messages (data), logic
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
27 (code) and representation (templates). Message
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
28 definition (data) also takes into account actions
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
29 that make component work. Templates are mostly
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
30 needed for human readability.
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
31
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
32
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
33 ### Router
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
34
4926
355ce349df42 routing: Serve static files through proper routing in main()
anatoly techtonik <techtonik@gmail.com>
parents: 4918
diff changeset
35 Roundup URL map check for backward compatibility:
4905
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
36
4906
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
37 [ ] check urlpath values for
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
38 [ ] example.com
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
39 [ ] example.com/
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
40 [ ] example.com/tracker
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
41 [ ] example.com/tracker/
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
42 [ ] example.com/tracker/item
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
43 [ ] example.com/tracker?anything
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
44 [ ] example.com/tracker/?anything
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
45 [ ] example.com/tracker/item?anything
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
46
4918
35dc9191394d routing: Use Router in cgi.client.main
anatoly techtonik <techtonik@gmail.com>
parents: 4906
diff changeset
47 [x] get full list of url handlers
35dc9191394d routing: Use Router in cgi.client.main
anatoly techtonik <techtonik@gmail.com>
parents: 4906
diff changeset
48 (1.5.0, entrypoing: cgi.client.main)
35dc9191394d routing: Use Router in cgi.client.main
anatoly techtonik <techtonik@gmail.com>
parents: 4906
diff changeset
49 [x] /xmlrpc - hardcoded xmlrpc endpoint
35dc9191394d routing: Use Router in cgi.client.main
anatoly techtonik <techtonik@gmail.com>
parents: 4906
diff changeset
50 [x] / - main home page
35dc9191394d routing: Use Router in cgi.client.main
anatoly techtonik <techtonik@gmail.com>
parents: 4906
diff changeset
51 /index
35dc9191394d routing: Use Router in cgi.client.main
anatoly techtonik <techtonik@gmail.com>
parents: 4906
diff changeset
52 /home
35dc9191394d routing: Use Router in cgi.client.main
anatoly techtonik <techtonik@gmail.com>
parents: 4906
diff changeset
53 [x] /_file - static resources
35dc9191394d routing: Use Router in cgi.client.main
anatoly techtonik <techtonik@gmail.com>
parents: 4906
diff changeset
54 /@@file
35dc9191394d routing: Use Router in cgi.client.main
anatoly techtonik <techtonik@gmail.com>
parents: 4906
diff changeset
55 [x] /<class> - dynamic handler based on db
4906
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
56
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
57 [ ] check url handling for db scheme paths
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
58
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
59 [ ] example.com/tracker/class
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
60 [ ] example.com/tracker/class/
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
61 [ ] example.com/tracker/class1
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
62 [ ] example.com/tracker/class1/
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
63
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
64 [ ] check url handling for static files
4905
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
65
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
66 /_file/(.*)
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
67 StaticFileHandler
4926
355ce349df42 routing: Serve static files through proper routing in main()
anatoly techtonik <techtonik@gmail.com>
parents: 4918
diff changeset
68 [x] /_file - 500 TypeError: join()
355ce349df42 routing: Serve static files through proper routing in main()
anatoly techtonik <techtonik@gmail.com>
parents: 4918
diff changeset
69 [x] /_file/ - 404
355ce349df42 routing: Serve static files through proper routing in main()
anatoly techtonik <techtonik@gmail.com>
parents: 4918
diff changeset
70 [x] /_file/name - 200 from STATIC_FILES or
355ce349df42 routing: Serve static files through proper routing in main()
anatoly techtonik <techtonik@gmail.com>
parents: 4918
diff changeset
71 TEMPLATES
4905
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
72 /@@file/(.*)
6e313bdf6b69 routing: Add new roundup.web namespace with router component
anatoly techtonik <techtonik@gmail.com>
parents:
diff changeset
73 StaticFileHandler
4926
355ce349df42 routing: Serve static files through proper routing in main()
anatoly techtonik <techtonik@gmail.com>
parents: 4918
diff changeset
74 [x] /@@file - 500 TypeError: join()
355ce349df42 routing: Serve static files through proper routing in main()
anatoly techtonik <techtonik@gmail.com>
parents: 4918
diff changeset
75 [x] /@@file/ - 404
355ce349df42 routing: Serve static files through proper routing in main()
anatoly techtonik <techtonik@gmail.com>
parents: 4918
diff changeset
76 [x] /@@file/name - 200 from STATIC_FILES or
355ce349df42 routing: Serve static files through proper routing in main()
anatoly techtonik <techtonik@gmail.com>
parents: 4918
diff changeset
77 TEMPLATES
4906
b860ede03056 routing: Add example URL map
anatoly techtonik <techtonik@gmail.com>
parents: 4905
diff changeset
78

Roundup Issue Tracker: http://roundup-tracker.org/