I feel that design questions are the hardest part of the test, because
1) it makes me think, which is not typical activity for me
2) without significant partical experience meeting requirements is not so straithforward;
3) I am always afraid they imply knowledge of US specific business procedures, I do not have
4) English, English, English...
Thanks for training!!!
Let me try.
Problem :
North American Real Estate Associates, a realtor agency would like to convert their inventory listings into XML format. Until now, they used a commercial application to retrive the information from the database and render it to their clients in the HTML format.
Apart from being able to supply the inventory information to various different clients( web, handheld, wireless devices etc, ), the new XML-based system should also allow numerous real-estate agents across the country to send their local inventory listings to a central application. The new listings and/or update of existing listings will arrive by email as an XML document. A processing application is required to be designed that will analyze the incoming XML documents once everyday and will bring up to date the master database.
Question 1 : Which of the following components is LEAST likely to be included in the design? (Select the best answer. )
1. An XML parser that processes incoming emails.
2. A web agent that allows field agents query information online.
3. An application to email inventory listings to various agents in XML format.
4. An XSL stylesheet for rendering information on to wireless devices.
Proposed answer: 3
1,2,4 were mentioned in requrements, but nothing was said about E-mailing XML documents TO agents. And what agents would do with raw XML files?
Question 2 : The company would like to be able to print the listings and give hardcopies to their clients. Implementing the printing functionality is MOST likely to require: (Select the best answer. )
1. Changes to the XML parsing process.
2. A change to the XML rendering process and/or XSL stylesheets.
3. An they enhancement to the DTD for inventory listings.
4. Adjustments to the XPath expressions that retrieve specific listings from the XML documents.
Proposed answer: 2
1: parsing process simply loads XML document in memory, why change it?
2: that makes sense, printing is a subclass of rendering. They could have an XSL stylesheets with �color� information for HTML output and substitute it for boldness for black-and-white printers, for example.
3: They want to print an existing XML structure, so why change DTD?
4: requirements did not say that printed version will have another set of data => no need to change XPath expressions
Question 3 : Which of the following is MOST likely to be implied by this architecture? (Select the best answer. )
1. Validating the incoming XML document(s) using a DTD and a valiating parser.
2. Using static transformations instead of on-the-fly output generation for rendering the XML documents.
3. Using a SQL modeller to query different parts of the XML document.
4. Using SAX parser API for performance reasons for parsing the incoming documents.
Proposed answer: 1
1: Looks most appealing. Of course, it is unlikely that agents write XML documents �by hand�, they probably use some software for it that produce correct output, but what if some agents forgot to make upgrade and uses outdated format?
2:Could be. But requirements stated that a database is used to store XML documents, and it is updated nobody-knows-how-often. On-the-fly output generation may be a reasonable solution. Or they could produce a static output file after each update... Probably depends on how often updates are actually made...
Anyway, it is a controversial feature.
3: have no idea what a SQL modeller is. �Pure SQL� itself was not designed to query hierarchical data and even if �a SQL modeller� is SQL extension to deal with XML documents, what parts of XML document they will query? Input files sent by E-mail? Doesn�t make sense.
4: SAX is a good choice �for extracting specific information from potentially large XML sources�
Hopefully application will be designed in such a way, that agents will NOT send tonns of useless XML nodes via E-mail
Question 4 : Which of the following should NOT be relied upon to locate information of interest when querying the inventory listing XML documents? 1. The element type of an element.
2. An attribute value specified on an element start tag.
3. A processing instruction contained by the element of interest.
4. Comments on the element declaration for the element of interest.
Proposed answer: 4
Never heart about quering information based on comments. Comments are irresponsible folk.
Question 5 : Which of the following statements is TRUE with respect to the task of validating the incoming XML document ? (Select the best answer. )
1. No validation needs to be done since the incoming emails are from trusted partners.
2. A validating parser is necessary to ensure that incoming documents are well-formed.
3. Validating parsers should be used for testing only and and should not be used in production for performance reasons.
4. Using mixed content modelling for DTDs facilitates maximum flexibility since DTDs can be changed without affecting the validity of existing XML documens.
Proposed answer: 3
1: never trust anybody!
2: A validating parser is necessary to ensure that incoming documents is valid, not just well-formed.
3. Sounds good
4. That�s make sense also, but question was about the task of validating, not about maintenance and extensibility.
Question 6 : Which of the following is the BEST approach for storing the listing information ? (Select the best answer. )
1. Separate XML documents should be used one for each inventory listing.
2. All inventory listings should be combined into a large single XML document.
3. Storing the information in a relational database and being able to generate XML documents on the fly allows maximum flexibility.
4. How to store the information really depends on the parser used by the application.
Proposed answer: 3.
1,2: As an old realtion database lover I couldn't make another choice, but
a relational database!
4: Parser doesn't store XML files and as far as I can imagine, it can accept input XML in amy form, either as a static file, or as output of other program, database in our case.
Uuuuuf... I used all my exam time! < panic face/>