| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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 |
|
#2
| |||
| |||
| On Mon, 27 Oct 2008 18:05:26 -0700 (PDT), auspicious wrote: > "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 |
|
#3
| |||
| |||
| Responding to auspicious... > "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 |
|
#4
| |||
| |||
| On 28 Oct, 01:05, auspicious <auspicious...@gmail.com> wrote: > 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 |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.