pracro:pracro
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pracro:pracro [2008/11/25 08:55] – deva | pracro:pracro [2012/11/08 10:36] (current) – deva | ||
---|---|---|---|
Line 1: | Line 1: | ||
======Pracro - Praxis Macro system ====== | ======Pracro - Praxis Macro system ====== | ||
+ | =====New concepts===== | ||
+ | [[pracro: | ||
+ | [[pracro: | ||
+ | [[pracro: | ||
+ | [[pracro: | ||
+ | [[pracro: | ||
+ | [[pracro: | ||
+ | =====Upgrade from old to new database structure===== | ||
+ | Remove duplicate entries from fieldnames table: | ||
+ | < | ||
+ | delete from fieldnames where ctid not in (select max(dup.ctid) from fieldnames as dup group by dup.name); | ||
+ | </ | ||
+ | |||
+ | Remove duplicates from fields: | ||
+ | < | ||
+ | delete from fields where ctid not in (select max(dup.ctid) from fields as dup group by dup.transaction, | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | ALTER TABLE transactions RENAME TO transactions_old; | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | CREATE TYPE session_status AS ENUM (' | ||
+ | </ | ||
=====Roadmap===== | =====Roadmap===== | ||
See the [[pracro: | See the [[pracro: | ||
Line 5: | Line 30: | ||
=====Widgets===== | =====Widgets===== | ||
See the [[pracro: | See the [[pracro: | ||
+ | |||
+ | =====Database===== | ||
+ | See the [[pracro: | ||
=====Random Stuff===== | =====Random Stuff===== | ||
+ | [[Devas corner]]\\ | ||
+ | [[Senators corner]] | ||
+ | |||
+ | ====Open/ | ||
+ | GOALS: | ||
+ | * Only one open macro at any point of time. | ||
+ | * Not possible to close an unchanged macro by saving it. | ||
+ | * Warn the user if an unsaved macro is about to be collapsed. | ||
+ | When clicking on the expand/ | ||
+ | Initially the ' | ||
+ | The only exception to this is if the macro is loaded, prefilled with commit-able data, ie. data from Pentominos or other external sources, that simply needs to be committed to the database without further actions of the user.\\ | ||
+ | When the commit button (or optionally abort button) is clicked, the macro will be collapsed, and its data either committed to the server, or thrown away.\\ | ||
+ | If the expand/ | ||
+ | If the macro contains no changes, it will simply be collapsed.\\ | ||
+ | If the macro contains unsaved data, the user will be prompted to save these data and collapse, ignore the changes and collapse or stay open and do nothing.\\ | ||
+ | If another macro is already open when the expansion is about to be initiated, the already open macro will enter 'about to collapse' | ||
====Types==== | ====Types==== | ||
Line 70: | Line 114: | ||
If the '' | If the '' | ||
- | ====Lib docs==== | + | =====Lib docs===== |
* http:// | * http:// | ||
* http:// | * http:// | ||
* http:// | * http:// | ||
- | ====Procedure==== | + | =====Procedure===== |
- | ===Request=== | + | ====Request==== |
Initially the server receives a request from the client.\\ | Initially the server receives a request from the client.\\ | ||
The request contains a course and a macro.\\ | The request contains a course and a macro.\\ | ||
Line 86: | Line 130: | ||
The final xml are generated accordingly and sent back to the client. | The final xml are generated accordingly and sent back to the client. | ||
- | ===Commit=== | + | ====Commit==== |
The server receives a commit from the client, containing all fields and their values.\\ | The server receives a commit from the client, containing all fields and their values.\\ | ||
The server puts all field/value pairs in the db, all connected to a transaction id.\\ | The server puts all field/value pairs in the db, all connected to a transaction id.\\ | ||
Line 92: | Line 136: | ||
The resume is sent to the upload server. | The resume is sent to the upload server. | ||
- | ====Error handling==== | + | =====Error handling===== |
All server output is cached prior to sending. Upon error a special error macro window is generated and sent to the client, containing a description of the error, and a close button.\\ | All server output is cached prior to sending. Upon error a special error macro window is generated and sent to the client, containing a description of the error, and a close button.\\ | ||
All errors should be prevented/ | All errors should be prevented/ | ||
All actions already taken, should be rolled back. In order to do this, all external transmissions must be made last, bacause they are not necessarily possible to roll back. | All actions already taken, should be rolled back. In order to do this, all external transmissions must be made last, bacause they are not necessarily possible to roll back. | ||
- | ====Connection lifespan==== | + | =====Connection lifespan===== |
A connection is made to the server at first request. It is kept alive for the entire session, i.e. during commit and possible following requests (due to continue action buttons).\\ | A connection is made to the server at first request. It is kept alive for the entire session, i.e. during commit and possible following requests (due to continue action buttons).\\ | ||
The connection may be terminated at any key point (after a request or a commit), since the server is stateless, but it may be saving resources to keep the connection alive, thus only creating one connection per session. | The connection may be terminated at any key point (after a request or a commit), since the server is stateless, but it may be saving resources to keep the connection alive, thus only creating one connection per session. | ||
- | ====TODOs==== | + | =====TODOs===== |
- | ===Server=== | + | ====Server==== |
* {{: | * {{: | ||
* {{: | * {{: | ||
Line 123: | Line 167: | ||
* {{: | * {{: | ||
- | ===Client=== | + | ====Client==== |
* {{: | * {{: | ||
* {{: | * {{: | ||
Line 144: | Line 188: | ||
* < | * < | ||
- | ===Documentation=== | + | |
+ | |||
+ | ====Documentation==== | ||
* {{: | * {{: | ||
* {{: | * {{: | ||
* {{: | * {{: | ||
- | * {{: | + | * {{: |
* {{: | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | |||
- | ===Macros (local)=== | + | ====Macros (local)==== |
* {{: | * {{: | ||
* {{: | * {{: |
pracro/pracro.1227599748.txt.gz · Last modified: 2008/11/25 08:55 by deva