tailieunhanh - Apress Expert C sharp 2005 (Phần 3)

Tham khảo tài liệu 'apress expert c sharp 2005 (phần 3)', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 2 27 06 1 20 PM Page 74 74 CHAPTER 2 FRAMEWORK DESIGN When a criteria class is nested within a business class the .NET type system can be used to easily determine the type of class in which the criteria is nested. The CriteriaBase class on the other hand directly includes a property you must set indicating the type of the business object. In either case your criteria class should include properties containing any specific information you need in order to identify the specific object to be created retrieved or removed. Server-Side Host Objects I ve already discussed the client-side proxy objects and how each one has a corresponding serverside host object. In Chapter 4 I ll create three host objects one for each protocol remoting Web Services and Enterprise Services. It is also possible to add new host objects without altering the core framework providing broad extensibility. Any new host object would need a corresponding clientside proxy of course. Server-side host objects are responsible for two things first they must accept inbound requests over the appropriate network protocol from the client and those requests must be passed along to the server-side data portal components second the host object is responsible for running inside the appropriate server-side host technology. Microsoft provides a couple of server-side host technologies for hosting application server code Internet Information Services IIS and Enterprise Services. It is also possible to write your own Windows service that could act as a host technology but I strongly recommend against such an approach. By the time you write the host and add in security configuration and management support you ll have recreated most or all of either IIS or Enterprise Services. Worse you ll have opened yourself up for unforeseen security and stability issues. The remoting and Web Services host objects are designed to run within the IIS host. This way they can take advantage of the management stability