Kasutajaliidesed lectures lab 2 requirements: erinevus redaktsioonide vahel
Resümee puudub |
Resümee puudub |
||
| 38. rida: | 38. rida: | ||
The server contains a database with two tables: | 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. | 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. | ||
| 45. rida: | 45. rida: | ||
It is a good idea to read the [[kasutajaliidesed lab 2 sql schema]]. | It is a good idea to read the [[kasutajaliidesed lab 2 sql schema]]. | ||
XSTONE | The XSTONE server contains simple SQL functions for looking and modifying data in the given tables. Every web service corresponds to one SQL sentence. | ||
It is a good idea to read the [[kasutajaliidesed lab 2 web service definitions]]. | |||
Nimetatud teenuste praktiliseks kasutamiseks vaata ja katseta kõigepealt selles failis toodud näidetega. NB! Nimetatud näiteid tuleb katsetamiseks igaühel veidi ümber teha. | Nimetatud teenuste praktiliseks kasutamiseks vaata ja katseta kõigepealt selles failis toodud näidetega. NB! Nimetatud näiteid tuleb katsetamiseks igaühel veidi ümber teha. | ||
Redaktsioon: 3. aprill 2006, kell 11:55
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.
Serveris asub andmebaas, kus on realiseeritud kolm tabelit:
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.
It is a good idea to read the kasutajaliidesed lab 2 sql schema.
The XSTONE server contains simple SQL functions for looking and modifying data in the given tables. Every web service corresponds to one SQL sentence.
It is a good idea to read the kasutajaliidesed lab 2 web service definitions.
Nimetatud teenuste praktiliseks kasutamiseks vaata ja katseta kõigepealt selles failis toodud näidetega. NB! Nimetatud näiteid tuleb katsetamiseks igaühel veidi ümber teha.
NB! Antud praksi tabelite/veebiteenuste juures ei ole kasutatud mingit autentimist. Selle asemel kasutame põhimõtet, et igal tabeli real on kindlasti olemas sisestanud tudengi matriklinumber. Selle numbri paneb sinna teieloodud rakendus automaatselt, koodi sissekirjutatult, seda ei küsita kasutajalt! Iga grupp peab seega valima, kumba tudengi matriklinumber koodi sisse kirjutatakse.
Lõpetuseks seletame veidi toodud teenuste põhimõtteid/argumente.
* all: house_all, description_all ja visit_all ei võta mingeid argumente ja annavad kogu tabeli sisu, ilma selekteeringuta. Kuna see võib olla väga mahukas, siis palun kasutada väga ettevaatlikult, ainult vajadusel testimiseks (mitte aga rakenduses endas!).
* select: house_select, description_select ja visit_select võtavad järgmised argumendid:
o sorteeritava tulba nimi vastavas sql tabelis
o sorteerimisjärjekord (asc või desc)
o tabeli rea sisestanud tudengi matriklinumber.
o SQL-lause WHERE-tingimus ehk filter/otsing: kui tahta kõiki ridu saada, pane sinna tautoloogiline tingimus 1=1.
o ridade arv: nii palju ridu saadetakse vastuseks (kui tabelis on üldse nii palju sobivaid ridu).
o mitmendast reast alustatakse ridade andmist (esimene rida on 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.
* Kuupäevaformaat on 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.