Hi, I have some confusion about the answers given for two questions in a mock test in www.javacoding.com , if any one have idea please try to clarify: QUESTION # 1 : What does a screen scraper do? The answer mentioned as � Generates an object model from a legacy system's user interface � I think the above thing is done by Object-Mapping but not with Screen-scrapper�right? QUESTION # 2: Which design patterns could be useful when implementing an undo-feature in your application? The answer mentioned as � Command Pattern�. But I think the �Momento Pattern� describes the undo-feature �right? if any one have idea about the above two questions, please try to clarify Thanks,
George Thomson<br />SCJP, SCWCD, SCBCD, IBM-141(XML), SCEA<br />......................................................................
Kylash, There r few tools avlbl which does screen scraping. What they do, is generate classes from the fields on GUI based on language u have picked up. Next task is to map these classes (objects runtime) with the persistence layer. So i think screen scraping is what the qs 1. refers to. One area of Object mapping is what the ejb container does for u, in order to persist ur objects to some Obj Oriented Databases.I cant think of apt examples right now.. 2)ya..command pattern helps in undo kind of oprn. plz refer to GOF. best book avlbl IMO..
AFAIK : 1. Classic screen scrapers doesnt map objects. This is what object mapping is all about - you have access to the objects in the lagacy, and you MAP them to the objects in your application - I.E. for the future - when the lagacy server will be changed. Screen scrapers are very good when you cant MAP objects, but rather build an integration layer the in the legacy side that knows how to "emulate" clicks on the legacy GUI , and on your application side - knows to talk with your object model. I wouldnt call this Object Mapping, and if this is what they ment - the question is tricky and not fair. 2. Both "Command" pattern and "Memento" pattern are good for "undo" operations. "Command" lets each component remember its own actions, where "Memento" is good for preserving states outside of an object- for when an "undo" takes place. So - I would assume that the question didnt have both patterns in the answer choices, as it is imposible - from this data only - to decide which is better (no scenario). [ January 28, 2004: Message edited by: E. Messing ]
Ruth Stout was famous for gardening naked. Just like this tiny ad: