serialization vs initialization

Hi, which is more effective, I initialize a User object and the need to pass it to the next page
Should I serialize and store in the session or perform the same initialization on the next
page ?
Who is Participating?
Loganathan NatarajanConnect With a Mentor LAMP DeveloperCommented:
one more point, try to avoid the storing objects with session .. it will consume lot of spaces and slow down your app.

In fact you can use MCV concept way the storing and retrieving the objects on the pages.
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
If that is all there is to it, might as well do the initialization and avoid the session overhead.
Loganathan NatarajanLAMP DeveloperCommented:
It is better you initialize it on the next page and do the process.
RozamundaAuthor Commented:
Thanks, how about using object registry ? (MVC concept)
Dave BaldwinFixer of ProblemsCommented:
The only reason for storing the information is for it to be reused and altered.  If the information is static, put it in an include file that gets used whenever needed.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.