Hello World!
I'm a Developer at Master of Malt, a University of Brighton graduate, a 1st Kyu in Kyokushinkai Karate, a video gamer and technology enthusiast. Read more about me over here.
CloudANDTidus
Search
Gaming With Lemons
Games


« We gotta go to the crappy town where I'm a hero. | Main | An excellent plan, with just two drawbacks: One, we don't have a power source for lasers; and Two, we don't have any lasers. »
Friday
Apr012011

You've been seeing parts of the life of a barber in Indiana for seven years, and you never mentioned it?

Alo world! 

So I've been silent on here for about a month now. The last month or so has been pretty hard on me emotionally, with the loss of Tabby the cat on Februrary 24th and Hamish, my family dog, on 14th March. 

Tabby was very old for a cat at 19, and she had been increasingly "loosing it", so her eventual death was to be expected, whether I wanted to accept it or not. I think the thing that truly effected me most with Tabby was the fact she had always been there. Being 22 I don't really recall a time when Tabby wasn't around, and as she got older she eventually confined herself to my bedroom, which made us much closer.  

Hamish was a lot less expected. I knew he was old, sure, but up until about a week before his death he seemed perfectly fine and happy. Unfortunately it seems his breed isn't particularly well designed, because they tend to suffer from incredibly itchy skin that causes them to bite and rip at their hair until it bleeds. To stop this he's been on medication for a very long time. He also had arthritis, ear infections and once nearly went blind in one eye from an infection. Eventually it was the medication that simply became to much for his system and his kidneys began to fail. He stopped eating, and the time came when we had to make the decision. Loosing him upset everyone in the family greatly, including my mum who made herself physically ill for over a week and managed to get an eye infection brought on by stress that could have made her blind. 

 

Add having to deal with work and university onto this and well… I wouldn't say I have been exactly on my game recently. 

As for my final year project, I didn't get every feature I wanted in the app, however with the deadline just a month away, I had to draw a line and start on the laborious documentation process. Its obviously not feature complete and ready for the app store, but that was never the goal of my project. What I've produced allows you to browse a massive collection of whiskies, whether or not your online, add them to one of four lists (wish list, basket, collection or empties) and then proceed into a checkout when you want to buy something.

What the app doesn't currently do is send the order to the server for processing (not within the scope of my app), allow you to add tasting notes, image caching on the local device for when you are offline, or sync the product data after the initial download. The last three are all things I will discuss in my documentation and are things the final product will do, but I simply didn't have the time when developing my project.

So what have I done to the app since I last talked about it? One of the most obvious changes was improving the product list views. Before you couldn't even read the full product name. Now the full name is readable on two lines, and a small third line provides extra information such as ABV, volume, age and price. At some point it would be neat to get images into list views (they would have to be place holders that change into images as they are downloaded to not affect performance), but I don't have this yet.

On the product "page" I replaced the no image image that was displayed before the product image downloaded with a loading indicator as everyone I showed this to was confused with why the no image image switched to a real image. The loading indicator makes much more sense here, telling the user that the image is loading. 

I also added a couple features to the social card on the product page. This is where you will eventually be able to add tasting notes. For now you have a more clear button that adds the product to a list (for people who miss the + button in the top right), as well as a share with friends and email friends option. The share with friends button gives you the ability to share the product on either Facebook or Twitter. This is done by launching the selected website in mobile Safari with the product's URL pre-populated. One day this might be better implemented by using the services API's to keep you inside the app. The other option, email friends, launches an email form with URL pre-populated.

One other small change, the add to list screen now gives a clear indication to the user when a product is out of stock by making the basket button red, however they still have the option to add it to their basket if they wish.

With the small changes covered, we move on to the lists screen, which is where the majority of my time has been consumed. To be honest, this feature took much longer than I had originally anticipated. The list screen was originally four separate instances of the same view accessible in the tab bar along the bottom of the screen, however the client suggested it would be better to consolidate these into one screen to give them the ability to have other options in the tab bar later. I achieved this using a segment control. When you select one of the lists in the segment control, the table view bellow is refreshed with different data.

You can click on an item in a list, which spins the screen to reveal the ability to adjust quantity. I imagine in the future that this screen would also be where you would add accessories or a gift message to a product. When you try to save the quantity the app does a call to the server if the current list is the basket. If the server responds with the product is currently out of stock, the quantity of the product is set to zero and the user is told to remove it from their basket. If the user requests more bottles than we currently have they are alerted of the current stock level and asked to select a different quantity. If there is no internet connection the app will accept whatever quantity the user asks for, and will instead alert the user of any issues with their basket when they try to go to checkout.  

The list view allows you to delete a product by swiping and clicking the delete button, or by clicking edit, the red circle, and then the delete button. By clicking edit they can also re-order the list using the little icon to the right of every item. To achieve this I had to add a rank field to the database that indicates the order of the items in the list. Every time a product is delete or moved, the ranking order has to be re-assigned for the entire list. Add a product simply requires adding one to the current total of list items.

Clicking the checkout button takes you to the checkout. If you are offline you are stopped immediately, as the checkout requires a connection to the server. If your basket has issues (such as an out of stock product or a larger quantity than we can provide), an error message is displayed and the user is required to go and correct it. If everything is successful the server responds with a set of delivery options.

I had a meeting with my client to spec how the delivery options would work. Their currently delivery algorithm is over complicated and in need of a re-write, so I was asked to write a simple algorithm for the iPhone app (which only needs to concern itself with UK orders) until the new one is built.

The business rules for the delivery algorithm I built are:

If all the stock required is available at the local warehouse offer:

  1. next day (two day if after 3pm) for £6.95
  2. three day for £5.95
  3. five day for £4.95 (£3.95 if the order has one bottle)

If some of the stock is only available from the supplier in Scotland offer:

1. Ship each item as it is ready for £13.90 (two deliveries of £6.95)

  • the local stock will be delivered next day or two day if after 3pm
  • the supplier stock will be delivered in four days

2. One Delivery (saves money)

  1. four day for £6.95
  2. six day for £5.95
  3. eight day for £4.95

If all the stock is only available from the supplier in Scotland offer: 

  1. four day for £6.95
  2. six day for £5.95
  3. eight day for £4.95

I used the UIPicker control to offer these options in the checkout. This particular control caused a lot of problems, mostly due to my inexperience with how it worked. 

If you try to submit the order without providing your details, you will be rejected. The user has the ability to add a delivery address, billing address and payment method to the order. The app keeps a list of every address and payment method added, allowing the user to simply select an existing one if it has already been entered (e.g. from a previous order or if the billing address is the same as the delivery). The screens where these details are entered are probably the least polished part of the app as it stands today, with little validation or enhancements, such as a UIPicker for selecting title and card expiry dates. You also have to click into the address/payment method to have it "selected" for the order. A better way to do with would be having clicking the item in the list select it (with some sort of indicator that it is selected, like a check mark), and the user having to enter an edit mode to have clicking the item take you to the edit screen.

Finally when the completed order is submitted, a confirmation is provided, although as I mentioned before, the order is not sent to the server. For poster day I would like to have a very basic implementation of sending the order to a temp table on the server's database and displaying that on a grid view so I can demo the phone sending the order and the site receiving it just to prove it works (although no processing or charging will have taken place obviously), however I have yet to do this. 

So thats an update. From here on its documentation time.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>