#native_company# #native_desc#

Best practices: Sessions Page 4

By Paul Booker
on August 19, 2002

To summarise then registering keys to the session seems a good practice as they serve to give a sense of
orientation to the user currently navigating your website.
All transient information which does not maintain state I prefer to pass from page to page until
it’s no longer required, ie inserted into a table.
However this is a broad generalisation of how I go about doing what I do, sometimes I will register non key
information to the session such as ‘screen_name’ if every page shows the current logged in user and I will
sometimes introduce repetition/redundancy into a database table if I am sure that it will never have to be
updated manualy, ie some generic names in a table such as ‘su’ , ‘administrator’, etc…
Finally this has been an open exposition of how I go about doing what I do as a php/mysql developer,it
has not been my intention to indoctrinate anyone in best practices rather to open the debate on what people
consider to be good practices and what there rationale is.
All developers clearly needs to have a coherent system of beliefs, a platform from which they can begin
and make decisions and all belief systems stand or fall on whether on not they can produce concrete results,
at the moment this simple outlook of mine is proving helpful.