473,657 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A Parent Object With Multile child objects

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
3 1964

"Maximilian o" <mn*****@gmail. comwrote in message
news:11******** *************@2 2g2000hsm.googl egroups.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
On 27 oct, 10:12, "Mr. Arnold" <MR. Arn...@Arnold.c omwrote:
"Maximilian o" <mnun...@gmail. comwrote in message

news:11******** *************@2 2g2000hsm.googl egroups.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

"Maximilian o" <mn*****@gmail. comwrote in message
news:11******** ************@50 g2000hsm.google groups.com...
On 27 oct, 10:12, "Mr. Arnold" <MR. Arn...@Arnold.c omwrote:
"Maximilian o" <mnun...@gmail. comwrote in message

news:11******** *************@2 2g2000hsm.googl egroups.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
3804
by: pablo | last post by:
Dear NewsGroupers, I am relatively new to OOP and cannet get my head around this problem. I have two classes. Class Child extends Parent. There is no constructor for the Child class. So when I create a child object the constructor for the parent object is called. That works fine. But now I have the problem that I want to add an already existing Parent object to create a new Child object. How can this be done?
3
9690
by: Maheshkumar.R | last post by:
Hi groups, How i can command over the MDI CHIlD forms created dynamically at runtime from PARENT. Let say, i have generated 5 mdichild forms, but i want to work with child form1 from MDI parent menu functions. if i select draw line in MDI parent, the line should be drawn in current active child..any URLS for this or guide me to achieve this communication... -- Mähésh Kumär. R
5
2350
by: Patrick Vanden Driessche | last post by:
Hi All, I'm currently writing an in-house Form validation framework (WinForms) which is based on 'Component'-inheriting object. So basically, I have a small hierarchy. FormValidator +-- ControlValidator +--ValidationRule
10
4008
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the application. What should happen, is that the main MDI form should close, taking the child forms with it. There is code to loop through the child forms, remove the controls on each of them, and then close the form, but this code should execute only...
10
19608
by: Goran Djuranovic | last post by:
Hi all, Does anyone know how to declare a variable in a class to be accessible ONLY from a classes instantiated within that class? For example: ************* CODE ***************** Public Class Parent '*** HOW TO DECLARE IT *** Dim Age As String = "1/1/2000"
6
6076
by: reandeau | last post by:
I'm building out a OO based app in PHP 5 but I'm getting a little confused on children contructing parents. I have a parent that looks like this: abstract Class State { protected $database; protected $user; protected $output; public function __construct($database,$user,$output) { $this->database = $database;
6
3983
by: Sashi | last post by:
class parent{ Parent(){}; ~Parent(){}; } Child: public Parent{ Child(){}; ~Child(){};
1
2137
by: DesperateDan | last post by:
I've got a parent object that is a collection and it in turn is hosting 2 child objects. My searlization has worked perfectly to plan in as much that I wanted to dictate the names of the objects and properties via XMLatrributes with a prefix of "THE_.."....except for the name of the child objects. This should say THE_NEW_Child but instead still persist in saying "NewChild" (Child properties are as planned) What's the solution?
2
2135
by: jeet232 | last post by:
I've a class 'Parent' I declare a map using map<Parent, Parent> mymap; Now I derive one child 'Child' and I've to add it to this map, so I do a static_cast like this: Child* key = new Child(); Child* val = new Child(); mymap.insert(pair<Parent, Parent>(static_cast<Parent&>(*key), static_cast<Parent&>(*val)));
0
8326
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8743
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8522
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8622
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2745
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1736
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.