Wednesday 25 December 2013

Galaxy S3 keeps notifying of "Download Complete" of photo

Since the latest Android update my Galaxy S3 keeps informing me of "Download Complete" of a photo.jpg.

I fixed this by navigating to the Download app and then deleting all of the downloads shown.

Wednesday 18 December 2013

RESTful design

Get Operations should be idempotent - performing the operation should not alter the underlying resource in any fashion. It can be performed n times and it always returns the same result.

POST should be used to create resources.

PUT should be replace the entire copy of the resource. If it exists it will overwrite it. If it doesnt exist it will create it: PUT can be used for first time creation and updates also. The difference between a POST and a PUT is that a PUT must have the resource identifier available, whereas a POST will not. So you can only PUT to create a resource if the resource identifier was generated external to the save operation.

PATCH should be used for updating part of the resource - perhaps a single field.

Monday 16 December 2013

Case namings

I've always referred to Camel Case as the case whereby the first letter is lower case and all compound Words thereafter are uppercase.

e.g. backColour or orderRefundId

this is how you'd name fields in .NET.

and Pascal Case is whereby the first letter is capitals (e.g. properties in .NET).

e.g BackColour or OrderRefundId

....confusingly though Camel Case can refer as upper camel case (Pascal case) or lower Camel Case. Typically though if it is not specifically mentioned then Camel Case is lower camel case.