projects:vote:vote
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| projects:vote:vote [2024/10/15 04:52] – jhagstrand | projects:vote:vote [2026/06/20 22:19] (current) – [vote.txt jun 2026] jhagstrand | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| * clean up Help: " | * clean up Help: " | ||
| + | * back button come back to about from wikipedia, browserhistory return to last used page | ||
| + | * add Register button to Login form and vice-versa | ||
| * display url on ballot | * display url on ballot | ||
| * add, edit, delete, approve decisions | * add, edit, delete, approve decisions | ||
| Line 11: | Line 13: | ||
| * allow delete from edit screen | * allow delete from edit screen | ||
| * give everyone the insert link: compose, add, insert, new | * give everyone the insert link: compose, add, insert, new | ||
| + | * a " | ||
| * add, edit, delete, approve candidate | * add, edit, delete, approve candidate | ||
| - | * AI to match duplicate | + | * AI to match duplicate |
| + | |||
| + | * encryption: only the voter can see his own ballot | ||
| + | |||
| + | * authentication: | ||
| + | * Add jurisdiction table, as ID, title, user ID. | ||
| + | * Had jurisdiction user table as jurisdiction ID user email. | ||
| + | * Add Eli to add change delete jurisdiction records | ||
| + | * Add jurisdiction ID column to decision table | ||
| + | * Filter decision lookup to users that belong to that jurisdiction. | ||
| + | |||
| content: | content: | ||
| Line 36: | Line 50: | ||
| * salary range confined to 1x to 2x | * salary range confined to 1x to 2x | ||
| + | ==== vote.txt jun 2026 ==== | ||
| + | < | ||
| + | vote.txt | ||
| + | |||
| + | reverse engineering | ||
| + | |||
| + | html/ | ||
| + | |||
| + | html/ | ||
| + | |||
| + | |||
| + | model of singleton objects | ||
| + | |||
| + | user.js - voyc.User, represents logged-in user | ||
| + | |||
| + | view.js - voyc.View, subscribes to nav requests: home, about, account, profile | ||
| + | |||
| + | model.js - voyc.Model, meant to be main driver for app (start with model app, then rename) | ||
| + | |||
| + | account.js - voyc.Account, | ||
| + | |||
| + | accountview.js - voyc.AccountView, | ||
| + | |||
| + | vote.js - voyc.Vote, app driver | ||
| + | |||
| + | |||
| + | |||
| + | todo: | ||
| + | define html components: account, vote | ||
| + | get nav to work in view.js | ||
| + | resolve vote and model | ||
| + | resolve Observer vs Event | ||
| + | |||
| + | webdev svc castballot makes call to webprod, hardcoded in vote.js | ||
| + | model.js does it correctly | ||
| + | |||
| + | x shell script in ~/ | ||
| + | |||
| + | castballot.php - | ||
| + | input: electionid (int), votes (string of ints) | ||
| + | insert into vote.vote (userid, electionid, votes) ...; | ||
| + | |||
| + | select id, name, party from vote.candidate where electionid = $1; | ||
| + | shuffle | ||
| + | |||
| + | select votes from vote.vote where electionid = $1; | ||
| + | build array of votes | ||
| + | count votes in rounds | ||
| + | |||
| + | output: candidates, results | ||
| + | |||
| + | validate.php - | ||
| + | function validateInteger() | ||
| + | function validateArrayOfIntegers() | ||
| + | |||
| + | ------------------- | ||
| + | |||
| + | vote.js | ||
| + | voyc.Vote() | ||
| + | |||
| + | this.comm = Comm() instantiate Comm object | ||
| + | |||
| + | getElection(electionid) | ||
| + | svc castballot return candidates, results | ||
| + | drawElection | ||
| + | show heading "2016 USA Pres" | ||
| + | drawBallot | ||
| + | get candidates from svc, | ||
| + | those who are ranked: sort by rank, | ||
| + | draw in a loop | ||
| + | those not yet ranked: sort by random | ||
| + | draw in a loop | ||
| + | enable the Cast Ballot button | ||
| + | drawResults | ||
| + | get results returned from svc | ||
| + | display the winner | ||
| + | display the rounds details in a table | ||
| + | |||
| + | nav.replace(' | ||
| + | |||
| + | on load, new voyc.Vote() | ||
| + | |||
| + | -------------------- | ||
| + | |||
| + | model.js | ||
| + | voyc.Model() | ||
| + | |||
| + | instantiate self and object model: View, User, Account, AccountView | ||
| + | |||
| + | instantiate Observer | ||
| + | |||
| + | instantiage BrowserHistory and pagedraw() function | ||
| + | |||
| + | instantiate Comm | ||
| + | |||
| + | subscribe to events: set/ | ||
| + | |||
| + | -------------------- | ||
| + | |||
| + | index.html | ||
| + | |||
| + | header - leftnav, headeruser | ||
| + | |||
| + | section content-container | ||
| + | section content-home | ||
| + | section ballot | ||
| + | section results | ||
| + | section content-about | ||
| + | section content-profile | ||
| + | |||
| + | 3 modeless dialogs | ||
| + | leftnav | ||
| + | header user | ||
| + | unused settings | ||
| + | modal container | ||
| + | 9 modal dialogs - all used by account | ||
| + | |||
| + | footer - two logo links | ||
| + | |||
| + | |||
| + | -------------------- | ||
| + | |||
| + | usage: | ||
| + | <insert from readme> | ||
| + | mv model.js to vote.js | ||
| + | substitute vote.Model to voyc.Vote | ||
| + | |||
| + | |||
| + | Event pub/sub | ||
| + | Observer | ||
| + | |||
| + | terminology | ||
| + | Observer | ||
| + | Pub/Sub | ||
| + | Data Binding | ||
| + | Message Queue | ||
| + | Event-driven architecture | ||
| + | decoupled | ||
| + | Listener | ||
| + | dispatcher | ||
| + | |||
| + | Observer/ | ||
| + | addEventListener/ | ||
| + | Publisher/ | ||
| + | Send/ | ||
| + | |||
| + | |||
| + | table | ||
| + | |||
| + | singleton object that runs it all | ||
| + | subscriber/ | ||
| + | publisher/ | ||
| + | |||
| + | verb, doer | ||
| + | |||
| + | dispatcher | ||
| + | |||
| + | manager | ||
| + | window | ||
| + | Observer | ||
| + | Event < | ||
| + | | ||
| + | |||
| + | two lists | ||
| + | 1. list of subscribers or listeners | ||
| + | 2. queue of published messages or events that can be processed asynchronously | ||
| + | |||
| + | ------------------------------- | ||
| + | |||
| + | original version, plus: | ||
| + | account management: login, register, etc | ||
| + | one vote per user, can be changed | ||
| + | multiple elections | ||
| + | election results vs rounds detailed results | ||
| + | |||
| + | election menu | ||
| + | ballot | ||
| + | results | ||
| + | detailed results | ||
| + | about | ||
| + | </ | ||
projects/vote/vote.1728982360.txt.gz · Last modified: 2024/10/15 04:52 by jhagstrand