When my company initially designed our project we expected it to be a small addition to another much larger system. We figured there would be about 4 screens that would need the same information and we were planning to use $_SESSION variable.
After we got started the president of the company received an enormous amount of positive feedback from our test customers and decided to expand the project to cover the entire scope of the suite we offer. This is a huge step for the company since all of its programs are text-based. The application layer of our program is written in a proprietary language that at times takes a while (sometimes up to 30 seconds) to do large computations. We will be running our software only on company intranets, but I am trying to keep the site as optimized as possible due to the latency that frequently happens from the application layer.
My main question right now deals with $_SESSION and its contents. Would it be faster to use database calls on each of the approx. 4 pages or on the first page and set session variables? So far in the one section we have designed we are looking at 30 session variables every variable except for 1 will be 30 characters or less and one has a max character value of 200. We also use $_GLOBAL variables to store the text on the pages for the current language the user has in preferences.
If $_SESSION is the right way to go we were planning to set it equal to array() when the leave a certain section so that there would not be much to carry over and so we can set that sections variables.
Any insight as to which way to go would be great.
Thanks,
Ann
After we got started the president of the company received an enormous amount of positive feedback from our test customers and decided to expand the project to cover the entire scope of the suite we offer. This is a huge step for the company since all of its programs are text-based. The application layer of our program is written in a proprietary language that at times takes a while (sometimes up to 30 seconds) to do large computations. We will be running our software only on company intranets, but I am trying to keep the site as optimized as possible due to the latency that frequently happens from the application layer.
My main question right now deals with $_SESSION and its contents. Would it be faster to use database calls on each of the approx. 4 pages or on the first page and set session variables? So far in the one section we have designed we are looking at 30 session variables every variable except for 1 will be 30 characters or less and one has a max character value of 200. We also use $_GLOBAL variables to store the text on the pages for the current language the user has in preferences.
If $_SESSION is the right way to go we were planning to set it equal to array() when the leave a certain section so that there would not be much to carry over and so we can set that sections variables.
Any insight as to which way to go would be great.
Thanks,
Ann