www.ShoppingPodder.com

Leading Computer Shopping,
News and information


Part of the Identityscape.com network...

getxfactor.com jmoodmusic.com smartbusinesschoices.com mintdepot.com lowfaresalways.com evangelicalview.com shoppingpodder.com soproudlywehail.com webnews.ws currenthumor.com

 

 

How to verify/ check objects for correctness
   Shopping Podder - the Best of Computer Postings! Forum Index -> Computer - Object  
View previous topic :: View next topic  
Author Message
auspicious
Guest






PostPosted: Tue Oct 28, 2008 1:05 am    Post subject: How to verify/ check objects for correctness Reply with quote

Hi,

I am a newbie and recently came across this question, which, i am
afraid I do not really understand.Following is the problem statement.

"A class receives a Request object from outside from a client and
cannot be presume to be valid at any given moment. Define how the
responsible object should look like."

Any recommendations on relevant reference material would be of great
help to me in understanding these things.

BR
/Feraz
Back to top
Dmitry A. Kazakov
Guest






PostPosted: Tue Oct 28, 2008 1:19 pm    Post subject: Re: How to verify/ check objects for correctness Reply with quote

On Mon, 27 Oct 2008 18:05:26 -0700 (PDT), auspicious wrote:

Quote:
"A class receives a Request object from outside from a client and
cannot be presume to be valid at any given moment. Define how the
responsible object should look like."

Any recommendations on relevant reference material would be of great
help to me in understanding these things.

In short: scrap the design.

Any object is valid when accessible. That's per definition. How access can
be limited (blocked, delayed etc) in order to ensure consistency of
objects, or not limited (lock-free approaches) is another story.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Back to top
H. S. Lahman
Guest






PostPosted: Tue Oct 28, 2008 8:23 pm    Post subject: Re: How to verify/ check objects for correctness Reply with quote

Responding to auspicious...

Quote:
"A class receives a Request object from outside from a client and
cannot be presume to be valid at any given moment. Define how the
responsible object should look like."

This homework problem is pretty ambiguous. Get the instructor to clarify
whether the "responsible object" is the Request, the object receiving
the Request, the client, or some other designated arbiter of validity.

You might also ask the instructor why the client is forwarding invalid
objects. Then google "Design by Contract".


--
There is nothing wrong with me that could
not be cured by a capful of Drano.

H. S. Lahman
hsl@pathfindermda.com
Pathfinder Solutions
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
"Model-Based Translation: The Next Step in Agile Development". Email
info@pathfindermda.com for your copy.
Pathfinder is hiring:
http://www.pathfindermda.com/about_us/careers_pos3.php.
(888)OOA-PATH
Back to top
Nick Keighley
Guest






PostPosted: Wed Oct 29, 2008 9:56 am    Post subject: Re: How to verify/ check objects for correctness Reply with quote

On 28 Oct, 01:05, auspicious <auspicious...@gmail.com> wrote:

Quote:
I am a newbie and recently came across this question, which, i am
afraid I do not really understand.Following is the problem statement.

"A class receives a Request object from outside from a client and
cannot be presume to be valid at any given moment. Define how the
responsible object should look like."

Any recommendations on relevant reference material would be of great
help to me in understanding these things.

I suppose the Client could be some sort of external untrusted system.
And a Request is some sort of message, perhaps a stream of bytes.
All I can this is that AClass validates the potential Request.
If its invalid it rejects it. If its valid it constructs a Request
from the byte stream and processes the Request. I don't understand
what "Cannot be presumed to be valid at any given moment". Can
it become invalid after I've run my validation code? In general
I don't think this is solvable.

--
Nick Keighley
Back to top
Display posts from previous:   
   Shopping Podder - the Best of Computer Postings! Forum Index -> Computer - Object  
Page 1 of 1
All times are GMT

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum