Week 6
Continue with SAX
There is no new subject for the lecture this week, as the time will be
spent going over recent work.
If you did not complete the Week 5 exercises, you should make sure that
you complete them today. If (and only if!) you have finished Week 5 and
thoroughly understand it, attempt the advanced exercise below.
Week 6 Advanced Exercises
- Allow IndieWorld customers to buy music from HitTastic! Do this by writing
a new PHP script on IndieWorld which communicates with your "buy"
web service from week 1 (question 3). Interpret the information sent back from
HitTastic! to determine whether the transaction was successful.
Link this to your script from last week, so that a user can buy a song by
Oasis, Radiohead or the Kaiser Chiefs after viewing all their hits.
- One problem with AJAX is that an AJAX client can only talk to a server side
script on the same server. This is for security reasons: if an AJAX
script could talk to other servers, they would be vulnerable to security
exploits. However, you can get round that with a proxy script.
If IndieWorld wanted to develop an AJAX interface and still talk to
HitTastic!, they could write a PHP script which reads in information from the
AJAX interface, forwards it on to HitTastic!, receives the XML returned from
HitTastic! and sends it on to the AJAX interface.
Change the IndieWorld form so that it uses AJAX, and communicates with
a proxy script. The proxy script should talk to the web service and receive
the XML back. The XML should then be sent on to the AJAX interface to parse.