Domain objects... how to maintain them after a submit action.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

An interesting feature on ASP.NET is to maintain the values for webcontrols after a submit action on the webform. Could I do that also with domain objects? Let´s see the context: My webform uses a domain object that has all the data to persist it on the database. However, every time that occurs a page submit, my object is released and another is instanciated. So, I have to rebuild it frequently. It seems not to be the same with webcontrols. How this process works? Is there a way to do the same with my domain objects? If yes, this would affect the performance?

Thanks a lot for any comment...
Alisson Vale
 
Alisson Vale said:
Hello,

An interesting feature on ASP.NET is to maintain the values for
webcontrols after a submit action on the webform. Could I do that also with
domain objects? Let´s see the context: My webform uses a domain object that
has all the data to persist it on the database. However, every time that
occurs a page submit, my object is released and another is instanciated. So,
I have to rebuild it frequently. It seems not to be the same with
webcontrols. How this process works? Is there a way to do the same with my
domain objects? If yes, this would affect the performance?

You can maintain them in Session state in most cases.
 
Hi John

Thanks for the suggestion, but I have some doubts about this solution. In this case, the object will be created and maintained for the lifetime of every session in my application. This wouldn't occupy significant server resources and affect scalability

Alisso
 
Alisson Vale said:
Hi John,

Thanks for the suggestion, but I have some doubts about this
solution. In this case, the object will be created and maintained for the
lifetime of every session in my application. This wouldn't occupy
significant server resources and affect scalability?

You need to answer that question. I can't answer it for you.

For instance, how large is the object? How much of it is being used at a
time? Remember, it's _virtual_ memory. How much of the object needs to be
"data" and how much can be "pointers to data"?

The answers to all of these questions will vary from project to project. I
admit I once built a project that placed a huge dataset into Session state.
This would have badly impacted scalability. But since the application had
only a single user, this wasn't a problem.

In the real world, my applications haven't tended to keep large amounts of
data in memory, so I haven't had a scalability problem on any modern
computer.

Of course, if you're running on a 300Mhz Pentium III with 256Mb of memory,
all bets are off!
 
Back
Top