Wednesday, May 28, 2008

Final thoughts on the project

Well, today is presentation day, so it is finally time to hand in the project and start sleeping at night again! The final product is looking really good, but there is a long list of improvements we could make.

Maybe we were overly ambitious in our project plan. But I think that it’s better to take on something greater and only get half way there than take on a mediocre project that you know you can do easily. Perhaps that’s not true when you’re doing paid work for a client, but it is definitely true for a uni project. We pushed ourselves this semester – with the new skills we were required to learn, and the amount of time we needed to commit.

It is hard to find enough time to give to a project when it is one out of four subjects you’re studying. Due to a lack of time or inadequate planning, we haven’t been able to test the product as well as I’d like to. We’ve been testing things as we go along, but there will be some bugs in it. I am also aware of some security holes that could be used by students to place bookings in other students’ names. But people would have to know a bit about the system to exploit them.

Despite the problems outlined above, in the end we have a product that I think would be beneficial for the client to implement, because it will save them a lot of time. I also think we have a quality working prototype that we could use to approach investors if we decide to continue working on the system. It wouldn’t be much extra work to modify the system to work for different clients, so potentially this product could be sold to different universities, and anyone else who needs to loan things out on specific days. If we don’t pursue this idea, we have a quality portfolio piece anyway.

Saturday, May 24, 2008

UI design work on student interface

Today I did some user interface design work. Here's some before and after shots of the timeline component:

Before:


After:


I also added popup tips to the interface. These will explain how to use the application. They don't require any interaction from the user and disappear straight away if the user interacts with the application.





Monday, May 19, 2008

Integrating and optimising the Timeline component

I spent my Saturday integrating the Timeline component into the customer interface, and I've gotta say, it was looking pretty hot!



But when I looked at it again today with a fresh mind, I noticed its performance wasn't living up to its looks. It was taking a really long time for the data availability to load when you drag a product onto the timeline. So I added some tracking variables to my code which grabbed the current time at various points through its execution. By subtracting the times from each other I could see how long each part of the script was taking to run. Here's what I saw:



It was pretty obvious that something funny was going on in the section which processed the XML for the days on the timeline. When I knew where I was looking it was pretty easy to fix it and speed things up. Here's what I got after a few tweaks:



I reckon 8.8 times faster isn't bad!

Friday, May 16, 2008

Timeline component

For the last two weeks I have been working on the timeline component. This is the centrepiece of the customer interface because it is the tool students will use to visualise the equipment availabilities over a period of time and place a reservation. But it is taking a lot more time than I had expected.

First I had to write a PHP interface between Flex and the database. Long had written a function that would do this already, but the problem was it only checked the availability for one item on one date. That would mean if we had three items and two weeks on screen, we would have to make 42 HTTP service requests. This would slow down the application because there would be 42 queries going to and from the client and the server. So I wrote a function that takes an array of product IDs, a start date and an end date and returns all of the appropriate equipment availabilities. That was a 250 line beast so I guess some of the time went in there.

Here's an excerpt of the code:


The function returns XML in a structure like this:


I am using Repeater elements to display the rows of products and columns of days in Flex. First I got the component to display static data that was saved in a variable in Flex, and then I got it to display data that was loaded in from an XML feed. This is what the component is looking like now:


The next step will be to hook this up with the rest of the student interface. Users will need to be able to drag products onto this timeline. They will also need to scroll horizontally to view the dates they are looking for. After that I will need to make the buttons actually place a reservation when they are clicked.

Monday, May 5, 2008

Teamwork

I think what makes our team successful is our open communication, even though we only have time for one face-to-face meeting a week. Over the last week for example, Long has been testing the web server and integrating our application with the University's authentication protocols. He has had numerous discussions with Mark Szota and Dave Sole from the faculty, and has CC'd Justin and myself in on the communication. That has kept us in the loop of what he's been up to, and given us the chance to throw in ideas too.

Justin and I have been working on different parts of the interface, but by using the SVN we can constantly update each other's files. Its really interesting to do an update and be able to see all his latest work straight away. When I see that he's done something cool, it motivates me to do a bit more as well.

Beginnings of the customer interface

This week I got the customer interface structure laid out, and did a bit of work getting some of its components up and running. So far, the application loads in the categories dynamically and then loads the products based on the user's choice of category.

I learned about Item Renderers today, which I haven't had to use before. When I was working on Vizzl at Deloitte the Item Renderers had already been done for me. It turns out that they're pretty easy, I did waste a few hours though because I didn't realise that Item Renderers where the thing I needed.

Item Renderers allow me to take a standard component like a TileList (which I have used here to display the products) and display it in a different way. In this case each item in the list has an image and tool-tip as well as the standard label. If I was just loading in static data I could display an image and tool-tip without using an item renderer, but as soon as I start to load data during run-time, it necessitates using one.