# Week II

Another interesting week has passed in which I learned a lot and managed to
complete my tasks. The first two days, I documented all that I have done in the
last week. So remember: any project requires a proper documentation.
After that the exciting part: jquery which is a multi-browser JavaScript library
designed to simplify the client-side scripting of HTML. I had to use jquery and
HTML5 to build a user-interface which would interrogate the server with resources
(see post #WeekI). I spend a day learning JavaScript and then focusing on my tasks.

I used JSON (JavaScript Object Notation) which it would be something like a
collection of name/value pairs: {obj1: [{ key1:valu1 , key2:value2 },
{ "key3":"value3" , "key4":"value4" }]}. I used the jquery to extract, process the
http response and then I put all these data in a table.
There I had to pay attention on pagination; some of the resources may return a
lot of records and we wouldn’t want to display them all on the same page. That’s
how I learned to get parameters from the URL in JavaScript and then interrogating
the WebService with two parameters /itemsPerPage;pageNumber. I used window.location.href
to get the url in JavaScript and then I split it to get my parameters. I also used
some css options for the design.

As an environment, at first I have used VisualWeb which was very cosy but there
were some problem with the server: it didn’t allow the use of the same port for
more services. So I switched to Eclipse and start working.

Now I’m prepared for a new week with all my forces renewed.
So keep calm and code! Ciao!

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>