By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,497 Members | 1,295 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,497 IT Pros & Developers. It's quick & easy.

A Parent Object With Multile child objects

P: n/a
Hello, I have an asp.net project that calculates a general tax. Ok,
this tax is a big object formed with another child objects (as a
mather of fact 15 another child object within it), like Ship, Vehicle,
Bike, etc. each one could be null and has his own attributes and
properties.

For example
Tax
{
int _period;
Ship _ship;
Vehicle _vehicle;
...
and so on with my other 13 objects ...
}

Ok, in my first page I populate Tax object and serialize it to DB,
when i post to the second page i deserialize this object. (i cannot
use session variables)

My doubt, is it ok to make a big parent object to hold the another
child objects?. If not what could it be the right solution?.

Thanks to everyone. I would really appreciate any comment. Bye.

Oct 27 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Maximiliano" <mn*****@gmail.comwrote in message
news:11*********************@22g2000hsm.googlegrou ps.com...
Hello, I have an asp.net project that calculates a general tax. Ok,
this tax is a big object formed with another child objects (as a
mather of fact 15 another child object within it), like Ship, Vehicle,
Bike, etc. each one could be null and has his own attributes and
properties.

For example
Tax
{
int _period;
Ship _ship;
Vehicle _vehicle;
...
and so on with my other 13 objects ...
}

Ok, in my first page I populate Tax object and serialize it to DB,
when i post to the second page i deserialize this object. (i cannot
use session variables)
Why are serializing and desalinizing the object? If you're doing this, then
why can you not let .Net take care of this by using SQL Server as a state
server, instead of you doing this? That's assuming that SQL Server is the DB
server. And why can you not use a session object holding the object in
session?
>
My doubt, is it ok to make a big parent object to hold the another
child objects?. If not what could it be the right solution?.
Yes, it's ok to have the parent object that cantains child objects or a
collection of child objects.

Oct 27 '07 #2

P: n/a
On 27 oct, 10:12, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
"Maximiliano" <mnun...@gmail.comwrote in message

news:11*********************@22g2000hsm.googlegrou ps.com...
Hello, I have an asp.net project that calculates a general tax. Ok,
this tax is a big object formed with another child objects (as a
mather of fact 15 another child object within it), like Ship, Vehicle,
Bike, etc. each one could be null and has his own attributes and
properties.
For example
Tax
{
int _period;
Ship _ship;
Vehicle _vehicle;
...
and so on with my other 13 objects ...
}
Ok, in my first page I populate Tax object and serialize it to DB,
when i post to the second page i deserialize this object. (i cannot
use session variables)

Why are serializing and desalinizing the object? If you're doing this, then
why can you not let .Net take care of this by using SQL Server as a state
server, instead of you doing this? That's assuming that SQL Server is theDB
server. And why can you not use a session object holding the object in
session?
My doubt, is it ok to make a big parent object to hold the another
child objects?. If not what could it be the right solution?.

Yes, it's ok to have the parent object that cantains child objects or a
collection of child objects.
Thank you Mr. Arnold I realy appreciate your answer.
I see that i forget some details sorry, the db is an Oracle, and i can
t use session object becouse the project is for a goverment during
which the entries over the service are over 100.000 every day.
I calculted de maximum memory usage and takes 80K only for one user
(if this one uses all child objects) during 20 minutes until the
session expire, imagine only 1000 users all at the same time at the
begining when the service is new, they spend (80K * 1000) 80 Megas in
memory. The Web Server Administrator will kill me twice.

Thanks a lot, I thought that a Super object was not a performance way
to resolve this but a session i know is worse.

Oct 27 '07 #3

P: n/a

"Maximiliano" <mn*****@gmail.comwrote in message
news:11********************@50g2000hsm.googlegroup s.com...
On 27 oct, 10:12, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
"Maximiliano" <mnun...@gmail.comwrote in message

news:11*********************@22g2000hsm.googlegrou ps.com...
Hello, I have an asp.net project that calculates a general tax. Ok,
this tax is a big object formed with another child objects (as a
mather of fact 15 another child object within it), like Ship, Vehicle,
Bike, etc. each one could be null and has his own attributes and
properties.
For example
Tax
{
int _period;
Ship _ship;
Vehicle _vehicle;
...
and so on with my other 13 objects ...
}
Ok, in my first page I populate Tax object and serialize it to DB,
when i post to the second page i deserialize this object. (i cannot
use session variables)

Why are serializing and desalinizing the object? If you're doing this,
then
why can you not let .Net take care of this by using SQL Server as a state
server, instead of you doing this? That's assuming that SQL Server is the
DB
server. And why can you not use a session object holding the object in
session?
My doubt, is it ok to make a big parent object to hold the another
child objects?. If not what could it be the right solution?.

Yes, it's ok to have the parent object that cantains child objects or a
collection of child objects.
Thank you Mr. Arnold I realy appreciate your answer.
I see that i forget some details sorry, the db is an Oracle, and i can
t use session object becouse the project is for a goverment during
which the entries over the service are over 100.000 every day.
I calculted de maximum memory usage and takes 80K only for one user
(if this one uses all child objects) during 20 minutes until the
session expire, imagine only 1000 users all at the same time at the
begining when the service is new, they spend (80K * 1000) 80 Megas in
memory. The Web Server Administrator will kill me twice.
-------------

You don't have the infrastructure to support this. Where is the state sever
either a MS server or MS SQL Server as a state server. It's totally
ridiculous that a state server in not in place for something that has that
memory potential and the amount of users hitting the Web server. You trying
to keep state by what you're doing is even worst. They need to get the Web
server infrastructure right. They already have you in a tuff position,
without that state server.


Oct 27 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.