Kasutajaliidesed lectures lab 2 requirements
The main goal of the lab is to practice using xml web services as a data source for web applications: either via xslt or direct parsing of xml.
You will have to create a functioning web app, based on the mock-up pages created during the first lab. It is not obligatory to follow the mock-up pages exactly: modifications, additions etc are fine.
Your application does not call any database engine directly: instead, it has to use the simple web services described below to fetch and add data.
It is OK to work in pairs or alone. Groups of three or more people are not OK.
Concrete requirements for the lab
- Data must be fetched, inserted, modified using the web services described below.
- You will have to build html from xml either using some xslt engine (recommendable) or by directly parsing xml.
- It is OK to use any programming language and any computer for the app. You may even - for example - build a java app with its own server, see Javaserver.zip.
- The application must be usable on the computers in the lab room using both Firefox and IE.
- The application - like the first lab - must be intuitively usable and must look decent: same gneral principles as for lab 1 still apply.
- You must use a student code of one of the group members as an obligatory parameter for web services. See the next chapter for details.
- It is recommendable to build
- page splitting
- column sorting
- searching
into the app. Apps without these capabilities will get lower points than apps with these capabilities.
- Please treat the web services and the dijkstra machine sparingly: do not make huge, repeated calls just for fun. Also, please try to avoid disturbing other students. For example, avoid using the student codes of other people.
Web service to use
You will have to use publicly available web services using the XSTONE server (you can find detailed information about XSTONE from http://www.ttu.ee/it/xstone. However, you will not really need this detailed information in the lab).
The XSTONE server runs in the dijkstra.cs.ttu.ee machine, port 7777. You may want to try out a service giving all parties currently in the database: http://dijkstra.cs.ttu.ee:7777/xstone/xfuns/party_all
Observe that you cannot change the underlying sql schema or xstone web services themselves: you can only use them as they are.
XSTONE server is called using ordinary url-s, via get. Post is not available. Web service url-s take string parameters without any parameter names: order matters. There is no authentication and you can test the services using an ordinary browswer.
Database schema and concrete services
The server contains a database with two tables:
- main table party: contains all main data about a party.
- additional table notes: contains additional notes for parties.
Observe that actually the schema contains also additional tables for similar application from 2005: tables house, description, visit and the corresponding web services. In case you are interested, see http://cs.ttu.ee/kursused/itv0030/prax2.html. You may use these web services for additional stuff, if you want. However, using them is in no way obligatory.
The XSTONE server contains simple SQL functions for looking and modifying data in the given tables. Every web service corresponds to one SQL sentence.
You should read the following files specifying the schema and services for the lab:
NB! We do not use authentication in this lab. Instead, each table row contains a student code for the student creating the application (in case you work as a group, please select the code for one of you). Your application must insert this code automatically (ie hard-coded into your app), it is NOT asked from the end user. The whole idea is to allow all students to use the same tables without messing up other students data.
Details about arguments to web services
- all: party_all and note_all do not take arguments and will give the whole table contents. This could be big. Please avoid using in normal situations, just to test stuff, if necessary.
- select: party_select, note_select take these args:
- column to sort in the table
- sorting order (asc or desc)
- student code of the student writing the app
- SQL-sentence WHERE-conditions (ie filter/search: in case you want to get all rows, enter 1=1).
- nr of rows to get.
- from which row to start getting the data (first row is 1)
- insert: house_insert, description_insert ja visit_insert: esimene argument on matriklinumber, teised argumendid on juba vastavad infoväljad: vaata eelpoolviidatud XML faili. id välja sisu tekitab URL-ga seotud SQL ise, seda ei sisestata.
update: house_update: esimene argument on maja id, teine tudengi matriklinumber. description ja insert tabelite jaoks update teenust pole, nende ridu saab ainult lisada/kustutada.
- delete: house_delete, description_delete ja visit_delete: esimene argument on id, teine matriklinumber.
- Date format is MM-DD-YYYY.
- Kui soovite jätta mõne arvu/kuupäevavälja tühjaks (eeldusel, et andmebaasi schema seda lubab), peab vastav argument URL-s (ampersandide vahel) olema tekst null.
- Sisetamise/muutmise/kustutamise edukust saab tulemus-XML faili sisu järgi näha.