User Tools

Site Tools


pracro:pracro

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pracro:pracro [2008/11/25 08:55] devapracro:pracro [2012/11/08 10:36] (current) deva
Line 1: Line 1:
 ======Pracro - Praxis Macro system ====== ======Pracro - Praxis Macro system ======
 +=====New concepts=====
 +[[pracro:speed-key concepts]]\\
 +[[pracro:post-commit-hook]]\\
 +[[pracro:course]]\\
 +[[pracro:praxisd]]\\
 +[[pracro:acl]]\\
 +[[pracro:template_concept_redesign]]
 +=====Upgrade from old to new database structure=====
 +Remove duplicate entries from fieldnames table:
 +<code>
 +delete from fieldnames where ctid not in (select max(dup.ctid) from fieldnames as dup group by dup.name);
 +</code>
 +
 +Remove duplicates from fields:
 +<code>
 +delete from fields where ctid not in (select max(dup.ctid) from fields as dup group by dup.transaction, dup.name, dup.value);
 +</code>
 +
 +<code>
 +ALTER TABLE transactions RENAME TO transactions_old;
 +</code>
 +
 +<code>
 +CREATE TYPE session_status AS ENUM ('active', 'idle', 'committed');
 +</code>
 =====Roadmap===== =====Roadmap=====
 See the [[pracro:roadmap]] page for details on how and when releases are made. See the [[pracro:roadmap]] page for details on how and when releases are made.
Line 5: Line 30:
 =====Widgets===== =====Widgets=====
 See the [[pracro:widgets]] page for design details on new widgets. See the [[pracro:widgets]] page for design details on new widgets.
 +
 +=====Database=====
 +See the [[pracro:database]] page for database layout notes.
  
 =====Random Stuff===== =====Random Stuff=====
 +[[Devas corner]]\\
 +[[Senators corner]]
 +
 +====Open/Close logic====
 +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/collapse button (the one with the ± on it) or on the title/line on top of the macro resume, the macro will be expanded.\\
 +Initially the 'Commit' button will be disabled, and stay that way until the user changes something in the macro.
 +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/collapse button, or the title/line on the top of the macro is clicked, the macro will enter an 'about to collapse' mode:\\
 +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' mode. If the stay open option is selected, the new about to expand macro will stay collapsed.
  
 ====Types==== ====Types====
Line 70: Line 114:
 If the ''$'' is put just before a ''{''''{'' or ''[''''['', the ''$'' will be rendered as a ''$''. If the ''$'' is put just before a ''{''''{'' or ''[''''['', the ''$'' will be rendered as a ''$''.
  
-====Lib docs====+=====Lib docs=====
   * http://www.lua.org/manual/5.1   * http://www.lua.org/manual/5.1
   * http://www.xml.com/lpt/a/555   * http://www.xml.com/lpt/a/555
   * http://pqxx.org/devprojects/libpqxx/doc/development/Reference   * http://pqxx.org/devprojects/libpqxx/doc/development/Reference
  
-====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/worked around if possible.\\ All errors should be prevented/worked around if possible.\\
 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====
   * {{:check.png}} Make configure flag to remove pentominos support.   * {{:check.png}} Make configure flag to remove pentominos support.
   * {{:check.png}} Rename luaprograms/luaprogram tags to scripts/script with a language attribute.   * {{:check.png}} Rename luaprograms/luaprogram tags to scripts/script with a language attribute.
Line 123: Line 167:
   * {{:uncheck.png}} Make header tags in course.   * {{:uncheck.png}} Make header tags in course.
  
-===Client===+====Client====
   * {{:check.png}} Rename luaprograms/luaprogram tags to scripts/script with a language attribute.   * {{:check.png}} Rename luaprograms/luaprogram tags to scripts/script with a language attribute.
   * {{:check.png}} Rewrite client network code.   * {{:check.png}} Rewrite client network code.
Line 144: Line 188:
   * <del>{{:uncheck.png}} Automatic generation of continue button based on 'completed' and deps.</del>   * <del>{{:uncheck.png}} Automatic generation of continue button based on 'completed' and deps.</del>
  
-===Documentation===+ 
 + 
 +====Documentation====
   * {{:uncheck.png}} Document checkbox truevalue/falsevalue attributes.   * {{:uncheck.png}} Document checkbox truevalue/falsevalue attributes.
   * {{:uncheck.png}} Document dbwidget.   * {{:uncheck.png}} Document dbwidget.
   * {{:uncheck.png}} Button continue_nocommit action.   * {{:uncheck.png}} Button continue_nocommit action.
-  * {{:uncheck.png}} New resume tag, with ''store_in_journal'' attribute.+  * {{:uncheck.png}} ''storechildren'' in metawidget
   * {{:uncheck.png}} Header tags in course.   * {{:uncheck.png}} Header tags in course.
 +  * {{:uncheck.png}} ''service'' attribute on query tags.
 +  * {{:uncheck.png}} DateTime widget
 +
  
-===Macros (local)===+====Macros (local)====
   * {{:uncheck.png}} B.2.2 nethinde tykkelse skal have et 'andet' felt.   * {{:uncheck.png}} B.2.2 nethinde tykkelse skal have et 'andet' felt.
   * {{:uncheck.png}} B.1 Præparat skal laves om til noget andet.   * {{:uncheck.png}} B.1 Præparat skal laves om til noget andet.
pracro/pracro.1227599748.txt.gz · Last modified: 2008/11/25 08:55 by deva