Wednesday, 25 May 2011

App Metrics System (Notes)

Some brief notes on the flow of information in the app metrics system I'm working on so that I remember how it works when I come back to it...

(1) An app is selected in the gui from the list of apps/projects that the user has access to.

(2) A request is sent to the server to get the xml config page which contains the css styles and the markup/layout for each of the pages (including the list of widgets contained).

(3) The xml config page is rendered on the gui and for the default ('dashboard') page a request is sent to the server to get the values for each of the widgets.

(4) A subsequent request is sent for widget values is sent to the server for each of the other pages the first time they are selected and also when refreshed.

Tuesday, 17 May 2011

Sql server column and stored procedure data types

Given a table with a column 'postcode' (for example) taking data type 'varchar(20)' and a stored procedure taking parameter '@postcode' of type 'varchar(max)'. Passing a string of length larger than 20 will throw up an exception.

On the other hand, given a table with a column 'postcode' taking data type 'varchar(20)' and a stored procedure taking parameter '@postcode' of type 'varchar(20)'. Passing a string of length larger than 20 will truncate and insert the string no problem.