PC Review


Reply
Thread Tools Rate Thread

Where should a boolean flag be located in the GUI class or controll class

 
 
Tony Johansson
Guest
Posts: n/a
 
      15th Feb 2011
Hello!

I have a controll class called AnimalManager that have a collection of
animals that constitute of a inheritance tree where the most general base
class is the Animal that is abstract.
Now I serialize all these animals using binary serialization and I want to
use a boolean flag that I can check so I know if the collection of animals
has been saved to file(serialized).

I''m a bit unsure if this flag should be put in the GUI presentation
layer(PL) or the Business layer(BL) which is the AnimalManager ?

//Tony


 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      15th Feb 2011
On 15-02-2011 06:39, Tony Johansson wrote:
> I have a controll class called AnimalManager that have a collection of
> animals that constitute of a inheritance tree where the most general base
> class is the Animal that is abstract.
> Now I serialize all these animals using binary serialization and I want to
> use a boolean flag that I can check so I know if the collection of animals
> has been saved to file(serialized).
>
> I''m a bit unsure if this flag should be put in the GUI presentation
> layer(PL) or the Business layer(BL) which is the AnimalManager ?


Definitely not in the PL.

If you persist everything together, then AnimalManager seems
to be the logical place.

If you persist Animal instances individually, then the flag should
be there.

Or in a class with this flag and the object it describes in case
that you want a very clean data model with no persistence related
stuff in.

BTW, I think the flag you want is the same as the commonly used
dirty flag, that indicates whether the object has been modified
and needs to be written back.

Arne

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
This code is located in the GUI class and I think that it belongs there. Tony Johansson Microsoft C# .NET 1 26th Feb 2011 09:53 PM
NotSupportedException Type.GetType (String, Boolean, Boolean) jonfroehlich Microsoft Dot NET Compact Framework 1 20th Apr 2006 02:44 PM
VBA Controll Names and Form Controll Names are not syncronising. B =?Utf-8?B?YmFzZWxpbmU=?= Microsoft Access Form Coding 2 7th Sep 2005 12:38 PM
One Question to a specific GUI Controll =?Utf-8?B?U3RhbXBlZGU=?= Microsoft Dot NET 5 21st Jul 2005 12:33 PM
No boolean object in VB.NET? How to check if a boolean has been explicitely defined then? Lucas Tam Microsoft VB .NET 10 12th Jun 2005 09:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:51 PM.