Set - 4

Question 16 :

Contrast OOP and SOA. What are tenets of each

Answer :

Service Oriented Architecture. In SOA you create an abstract layer that your applications use to access various "services" and can aggregate the services. These services could be databases, web services, message queues or other sources. The Service Layer provides a way to access these services that the applications do not need to know how the access is done. For example, to get a full customer record, I might need to get data from a SGL Server database, a web service and a message queue. The Service layer hides this from the calling application. All the application knows is that it asked for a full customer record. It doesnot know what system or systems it came from or how it was retrieved.

Question 17 :

How does the XmlSerializer work? What ACL permissions does a process using it require?

Answer :

XmlSerializer requires write permission to the systems TEMP directory.

Question 18 :

Why is catch(Exception) almost always a bad idea?

Answer :

Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project.

Question 19 :

What is the difference between Debug. Write and Trace. Write? When should each be used?

Answer :

The Debug. Write call wonot be compiled when the DEBUG symbol is not defined (when doing a release build). Trace. Write calls will be compiled. Debug. Write is for information you want only in debug builds, Trace. Write is for when you want it in release build as well. And in any case, you should use something like log4net because that is both faster and better

Debug. Write & Trace. write - both works in Debug mode, while in Release Mode,Trace.write only will work .Try changing the Active Config property of Solution in Property page nd find the difference. Debug.write is used while debugging a project and Trace.write is used in Released version of Applications.

Question 20 :

What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?

Answer :

Debug build contain debug symbols and can be debugged while release build does not contain debug symbols, does not have [Conational("DEBUG")] methods calls compiled, can not be debugged (easily, that is), less checking, etc. There should be a speed difference, because of disabling debug methods, reducing code size etc but that is not a guarantee (at least not a significant one)