HSC2011/Software/Frontend: Unterschied zwischen den Versionen

aus Metalab, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Wechseln zu: Navigation, Suche
(moved content from "build your own")
(Possible Applications: added typical program size)
(2 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 10: Zeile 10:
=Possible Applications=
=Possible Applications=
We are far from having implemented all the ideas we have of what could be run on the EduBuzzers -- they will be added over time.
Want to implement you own? It is just a matter of simple JavaScript coding (voting application in about 60 lines of code). [[HSC2011/Software/Frontend/Application development|See how it is done!]]
=='''Raise Your Hands'''==
=='''Raise Your Hands'''==
Also see [[HSC2011/Documentation#Screenshots]]
=== Application start ===
=== Application start ===
Zeile 54: Zeile 60:
==='''Rhythm game'''===
==='''Rhythm game'''===
[http://en.wikipedia.org/wiki/Beatmania Beatmania] work-alike
[http://en.wikipedia.org/wiki/Beatmania Beatmania] work-alike
== Application Development ==
=== architectural overview ===
Each Edubuzzer app, e.g. '''Raise Your Hands''', is chiefly implemented in a
single responsible JavaScript file, e.g. <tt>raise-your-hands.js</tt>. Each one can
define a single callback, <tt>Edubuzzer.run_application</tt> which is called when
the application is started.
Inside <tt>Edubuzzer.run_application</tt> it may register other callbacks like
<tt>Edubuzzer.updated_known_logins</tt> which is called whenever a client is added
or removed, or <tt>Edubuzzer.display</tt> which is called in regular intervals.
<tt>global.js</tt> runs a poor man's event loop and schedules all pollings to the
server which result in callbacks of the active app registered being called.  An
app is activated by changing the URI <tt>#hash</tt>. The skeleton switches to an app
by simply overwriting the <tt>display</tt> function.
=== querying buzzers ===
<tt>/ygor</tt> is the base URI for the middleware endpoint. Send <tt>GET</tt> requests to
certain named queries, e.g. <tt>?name=ls_accepted_login.sql</tt>. For the full list,
see directory <tt>Ygor/sql/</tt> in the [https://github.com/Metalab/hsc2011/tree/master/software software repository]. It returns a JSON array of objects/hashes whose
keys are described in the SQL file, e.g. for above:
        "accepted":true,"ack":false}, … ]
Refer to the table schemas in <tt>Ygor/schema/</tt> for explicit key/row names. Rely
on <tt>src</tt> for uniquely identifying a buzzer.
The most important query is <tt>ls_events.sql</tt> because it deals with the device
buttons. The first line in the file hints at the additional query parameters,
in this case <tt>loginid</tt>, i.e. the full query string is
<tt>?name=ls_events&loginid=ROWID</tt> where <tt>ROWID</tt> is a number received in earlier
different queries. Extract the button status from the <tt>eventmask</tt> field. See
<tt>docs/serialprotocol</tt> for the semantics.
For debugging purposes the middleware exposes an echo interface at base URI
<tt>/echo</tt>. The query string is ignored except for the parameter name
<tt>Response-Body</tt>. Its value is a percent encoded JSON string which
unsurprisingly is returned as response body.
For example, you want to mock:
        function (foo) {
Add a [http://api.jquery.com/jQuery.getJSON/ second parameter to the <tt>getJSON</tt> call], thus:
        function (foo) {
=== instruction list ===
* decide on an app name (e.g. <tt>exampleapp</tt>)
* create a new JavaScript file with the name
* implement the <tt>run_application</tt> function and the hooks you need
** present the app UI in element <tt>#buzzers</tt>
** keep internal data under the <tt>Edubuzzer.exampleapp</tt> namespace
* add the app name/link in <tt>index.xhtml</tt>
* register the app in <tt>global.js</tt>
* add styles in <tt>edubuzzer.css</tt>

Aktuelle Version vom 4. Mai 2011, 06:39 Uhr


Teacher Frontend

The whole user visible part of the EduBuzzer software runs inside a web browser on the teacher's laptop; the files are served by Ygor, the middleware. It is implemented in JavaScript.

The teacher gets an overview of the whole setup's status (connected devices etc.) and can choose applications from a main screen.

Until screen shots are available, see the UX Design Wireframes at Interaction Design Version 0.4 to get an idea of how it looks like.

Possible Applications

We are far from having implemented all the ideas we have of what could be run on the EduBuzzers -- they will be added over time.

Want to implement you own? It is just a matter of simple JavaScript coding (voting application in about 60 lines of code). See how it is done!

Raise Your Hands

Also see HSC2011/Documentation#Screenshots

Application start

The teacher poses a question to the class. He presses the start button in the frontend. Buzzers change status (e.g. pulsing LEDs) as a sign that users can press a button to raise their hands.

During the timeout period

As soon as a user presses a button on his or her buzzer, the buzzer changes status to a different LED signal. The frontend displays each buzzer status change.

Timeout end

It ends either automatically or the teacher hits the stop button in the frontend. Buzzers change their status to show that the time is over. The computer selects a random buzzer. The selected buzzer changes status (e.g. plays sound, yellow LED flashes). The user with selected buzzer answers the teacher's question.

Evaluate answer

The teacher presses one of the following buttons in the frontend:

  • Correct answer: The buzzer changes status to reflect correct answer. The application returns to the start screen.
  • Incorrect answer and start a new timeout. The buzzer changes status to reflect wrong answer. The application returns to the start screen.
  • Incorrect answer and select a new random buzzer. This option is disabled if there aren't any buzzers left that have pressed a button. The buzzer changes status to reflect wrong answer. The new selected buzzer changes status to answer please.


Students vote on a topic without raising your hand in front of the class which ultimately leads to a more honest voting behaviour. This application enables voting mechanisms that are hard to do with paper like multiple choice and ratings on preferred solutions as in "I'd like option A but if we don't get enough votes for that, option B would be my second favourite".

A question is displayed, there are four possible answers. The students press the button for their most preferred answer, this is their first choice. The button LED is blinking now. If the student wants to select an additional answer (second choice) he presses another button. For affirmation it also blinks, but slower. This procedure works up to four options.

When the vote is over, how many points each option gets is calculated and displayed. The first choice is worth four points, the second three etc.

Group Work/Group Games

Teams of students are chosen by a random generator. This would take the social stress off the teacher. (Student: "I don't want to be in a group with this guy." - Teacher: "The computer has chosen fairly.") Games would be possible where groups compete and if a group performs better it has to let a member go into another group. Also the opposite is possible where the best performing group gets new members.

Quiz mode (à la "Who wants to be a millionaire")

If a student doesn't know the answer he could ask the audience and the other students press the button for what they think is the right answer. The question is displayed to the classroom (beamer or similar). A countdown timer is running, meanwhile the students may press a button corresponding to the possible answers. The result is displayed as a bar chart. The teacher reveals the solution by pressing the blue button, pressing blue again advances to the next question.

Multiple Choice Tests

The teacher holds a live test where the students answer questions with multiple choice answers. (FIXME: Multiple choice tests are not very common in Europe so we need to spend research on this subject.)



A.k.a. Mafia: The base station choses who is the wolf and the others have to find out who it is by talking to each other on a round based system.


Multiple buzzers are laid out about the class room. Students go from device to device, plug in their ibutton, and push a buzzer button to enter their solution to the quest presented at this station, then go to next station.

Rhythm game

Beatmania work-alike