Voting Tool: Unterschied zwischen den Versionen

Aus Java Student User Group Austria - Java + JVM in Wien Österreich / Vienna Austria
Wechseln zu: Navigation, Suche
(Protocol)
 
(14 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
<p align="center" style="font-size:22pt;padding-top:10px;padding-bottom:15px;">[http://jsugvoting.at.tt http://jsugvoting.at.tt]<span style="font-size:8pt;bold;color:#999999;">&nbsp;&nbsp;&nbsp;Beta v0.3</span></p>
+
<!--<p align="center" style="font-size:22pt;padding-top:10px;padding-bottom:15px;">[http://jsugvoting.at.tt http://jsugvoting.at.tt]<span style="font-size:8pt;bold;color:#999999;">&nbsp;&nbsp;&nbsp;Beta v0.4</span></p>-->
  
This site contains a short overview of the JSUG Voting tool hosted at [http://code.google.com/p/jsugvoting/ googlecode]. The client is written with Adobe Flex and the backend is written in PHP using MySQL as its dbms.
+
This site contains a short overview of the JSUG Voting Tool hosted at [http://code.google.com/p/jsugvoting/ googlecode]. Its aim is to provide an easy way figuring out which topics are preferred by the members.
  
==Sources==
+
__TOC__
 +
 
 +
=General=
 +
==Technologies used==
 +
 
 +
* GWT 1.5.3
 +
* RESTful Webservices
 +
* PHP 5
 +
 
 +
 
 +
==Access Sourcecode==
  
 
You can check out the full source code by:
 
You can check out the full source code by:
Zeile 14: Zeile 24:
 
</code>
 
</code>
  
Or just browse it: [http://code.google.com/p/jsugvoting/source/browse/#svn/v1 http://code.google.com/p/jsugvoting/source/browse/]
+
=Technical Documentation=
  
==Technologies==
+
... kind of ...
<!-- schaut komisch aus ... [[Bild:JsugVoting_FrontendScreenshot.png|thumb|Frontend Sources]]
 
[[Bild:JsugVoting_BackendScreenshot.png|thumb|Backend Sources]]-->
 
  
===Flex Frontend===
+
==Usecases==
  
* Flex SDK 3.2
+
* Anonym
* FlexBuilder 3.0.2
+
** View Topics
* Cairngorm 2
+
** Register
* as3corelib
+
** Login
* as3logger
+
* Member
 +
** Logout
 +
** Vote
 +
** Unvote
 +
** Request Talk
 +
** Offer Talk
 +
** Join Talk
 +
* ''Admin''
 +
** Edit Topic
  
===PHP Backend===
+
=== Commands/Events ===
  
* PHP 5.2
+
* ??? ReloadData
* MySQL 4.1 (requires extension <code>pdo_mysql</code>)
+
* Register
* PDO database abstraction layer
+
* Login
* SimpleXML parser
+
* Logout
* FrontController & RequestDispatcher
+
* GiveVote
 +
* RevokeVote
 +
* RequestTalk
 +
* OfferTalk
 +
* JoinTalk
  
==Requirements==
+
== Valueobjects==
  
===Done===
+
* TalkEntity
 +
** id: long
 +
** createdOn: timestamp
 +
** createdBy: User
 +
** title: String
 +
** votes: Vote[]
 +
** tags: Tag[]
 +
** detail: String
 +
** link: String // LUXURY // about topic itself
 +
** thumbnail: image // LUXURY
 +
** state: Enum {need | offer | next | past}
 +
** attribute1: String // attributes are state depending (?)
 +
** attribute2: String
 +
** attribute3: String
 +
** attribute4: String
  
* <span style="text-decoration:line-through;">Login/Logout</span>
+
* VoteEntity
* <span style="text-decoration:line-through;">View topics</span>
+
** topicId: long
* <span style="text-decoration:line-through;">Add topic</span>
+
** userId: long
* <span style="text-decoration:line-through;">Submit vote</span>
+
** createdOn: timestamp
  
* <span style="text-decoration:line-through;">Vote button for each row; changes from N to Y and vice versa</span>
+
* <span style="text-decoration:line-through;">UserEntity</span>
* <span style="text-decoration:line-through;">Two main areas resizable via VDividedBox</span>
+
** id: long
* <span style="text-decoration:line-through;">application menubar</span>
+
** createdOn: timestamp
* <span style="text-decoration:line-through;">categories for offered topics</span>
+
** username: String
* <span style="text-decoration:line-through;">Additional "counts-indicator" for votes as HBox-like-component in grid</span>
+
** password: String // SHA-1 encrypted
* <span style="text-decoration:line-through;">Custom tree icon in topics grid</span>
+
** email: String
  
===Next Step===
+
* Tag
 +
** id: long
 +
** word: String
  
* bug: view topics detail menuitem is enabled, although nothing selected (eg because of collapse all)
 
* expand nodes at startup
 
* shortcuts for menubar
 
* use custom icon (thumbub/thumbdown) and/or color for vote button
 
* emphasize yet-voted rows; eg: make text bold or use star-icon as indicator
 
* initial data loading progress bar (especially necessary on autologon; screen is blank for a while)
 
** more sophisicating data loading strategy
 
  
===Nice to Have===
+
==Protocol==
  
* Topic details (own topic popup)
+
* describes passed json/xml dataformats
** Description
+
* mimetypes:
** List of links
+
** application/json
** do we want these: creation date, needed topic creator?
+
** application/xml
* instead of add topic button, additional row for inserting within grid
 
* Search (with continuous filtering)
 
* Nice transitions for login/main-state ''... partly done''
 
* Resolve neededTopicsAdvancedDataGridHack (assign value instead of manipulating internals)
 
  
===Luxury===
+
===Overview===
  
* Offered by links to wiki user site
+
* Request
* mark unavailable (strike-through already conducted presentations and link to wiki site)
+
** Head
* "Leave comment"-Link (kind of feedback form)
+
*** Message Version; e.g. "0.1"
* Plug into existing wiki-users instead of storing separate user data
+
*** Message Code (unique for this request/response); e.g. "7"
 +
*** Status Code
 +
** Body
 +
*** ...
  
===Do we want?===
+
===Talk===
  
Some of these features could be provided as prewritten SQL statements, which one would have to execute via e.g. phpMyAdmin.
+
GET: /users; response:
 +
 
 +
<code>
 +
[
 +
    {
 +
      Id: 1,
 +
      Username: "foo"
 +
    },
 +
    {
 +
      Id: 2,
 +
      Username: "bar"
 +
    }
 +
]
 +
</code>
  
* Edit topic detail (title, user, category)?
+
== REST ==
* <span style="text-decoration:line-through;">Revoke vote?</span> ... YES
 
* Create/Edit categories? (maybe only via SQL interface)
 
* Rearrange default order?
 
  
==Data Model==
+
* /session ... von REST vordefined
 +
** GET: X
 +
** PUT: X
 +
** POST: login
 +
** DELETE: logout
 +
* /users
 +
** GET: list all users
 +
** PUT: X
 +
** POST: register new user
 +
** DELETE: X
 +
* /talks
 +
** GET: list all talks
 +
** PUT: X
 +
** POST: new talk
 +
** DELETE: X
 +
* /talks/{talkId}
 +
** GET: X (evtl: display talk)
 +
** PUT: X
 +
** POST: X
 +
** DELETE: X (admin: delete talk)
 +
* /talks/{talkId}/speakers
 +
** GET: X
 +
** PUT: X
 +
** POST: join that talk
 +
** DELETE: delete yourself
 +
* /talks/{talkId}/vote
 +
** GET: X (evtl: returned true/false if yet voted)
 +
** PUT: X
 +
** POST: add vote
 +
** DELETE: unvote
  
[[Bild:JSUG VotingTool-DB Modell.png|center|Diagram]]
+
== Service API ==
  
==Screenshots==
+
* AuthService
 +
** login(username: String, password: String): boolean
 +
** logout(): void
 +
** register(username: String, password: String, email: String): boolean
 +
* TopicsService
 +
** ...
  
[[Bild:Screenshot-JsugVotingTool1.png|center|Screenshot1]]
+
[[Category:Project]]
[[Bild:Screenshot-JsugVotingTool2.png|center|Screenshot2]]
+
[[Category:JsugTool]]

Aktuelle Version vom 23. März 2009, 17:12 Uhr


This site contains a short overview of the JSUG Voting Tool hosted at googlecode. Its aim is to provide an easy way figuring out which topics are preferred by the members.

General

Technologies used

  • GWT 1.5.3
  • RESTful Webservices
  • PHP 5


Access Sourcecode

You can check out the full source code by:

# anonymous read-only access:
svn checkout http://jsugvoting.googlecode.com/svn/ jsugvoting-read-only 

# project members only:
svn checkout https://jsugvoting.googlecode.com/svn/trunk/ jsugvoting --username <your_name>

Technical Documentation

... kind of ...

Usecases

  • Anonym
    • View Topics
    • Register
    • Login
  • Member
    • Logout
    • Vote
    • Unvote
    • Request Talk
    • Offer Talk
    • Join Talk
  • Admin
    • Edit Topic

Commands/Events

  •  ??? ReloadData
  • Register
  • Login
  • Logout
  • GiveVote
  • RevokeVote
  • RequestTalk
  • OfferTalk
  • JoinTalk

Valueobjects

  • TalkEntity
    • id: long
    • createdOn: timestamp
    • createdBy: User
    • title: String
    • votes: Vote[]
    • tags: Tag[]
    • detail: String
    • link: String // LUXURY // about topic itself
    • thumbnail: image // LUXURY
    • state: Enum {need | offer | next | past}
    • attribute1: String // attributes are state depending (?)
    • attribute2: String
    • attribute3: String
    • attribute4: String
  • VoteEntity
    • topicId: long
    • userId: long
    • createdOn: timestamp
  • UserEntity
    • id: long
    • createdOn: timestamp
    • username: String
    • password: String // SHA-1 encrypted
    • email: String
  • Tag
    • id: long
    • word: String


Protocol

  • describes passed json/xml dataformats
  • mimetypes:
    • application/json
    • application/xml

Overview

  • Request
    • Head
      • Message Version; e.g. "0.1"
      • Message Code (unique for this request/response); e.g. "7"
      • Status Code
    • Body
      • ...

Talk

GET: /users; response:

[
   {
     Id: 1,
     Username: "foo"
   },
   {
     Id: 2,
     Username: "bar"
   }
]

REST

  • /session ... von REST vordefined
    • GET: X
    • PUT: X
    • POST: login
    • DELETE: logout
  • /users
    • GET: list all users
    • PUT: X
    • POST: register new user
    • DELETE: X
  • /talks
    • GET: list all talks
    • PUT: X
    • POST: new talk
    • DELETE: X
  • /talks/{talkId}
    • GET: X (evtl: display talk)
    • PUT: X
    • POST: X
    • DELETE: X (admin: delete talk)
  • /talks/{talkId}/speakers
    • GET: X
    • PUT: X
    • POST: join that talk
    • DELETE: delete yourself
  • /talks/{talkId}/vote
    • GET: X (evtl: returned true/false if yet voted)
    • PUT: X
    • POST: add vote
    • DELETE: unvote

Service API

  • AuthService
    • login(username: String, password: String): boolean
    • logout(): void
    • register(username: String, password: String, email: String): boolean
  • TopicsService
    • ...