• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

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 ?
0
Rozamunda
Asked:
Rozamunda
  • 2
  • 2
2 Solutions
 
Dave BaldwinFixer of ProblemsCommented:
If that is all there is to it, might as well do the initialization and avoid the session overhead.
0
 
Loganathan NatarajanLAMP DeveloperCommented:
It is better you initialize it on the next page and do the process.
0
 
RozamundaAuthor Commented:
Thanks, how about using object registry ? (MVC concept)
0
 
Loganathan NatarajanLAMP 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.
0
 
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.
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now