Duwamish7 Study Notes (-)

Source: Internet
Author: User
Tags configuration settings
Duwamish as. the examples provided by NET must represent the ideas and development skills that MS wants to pass to developers. Remember that I did not view the example programs of PB when I learned PB before, after a lot of detours and then petabytes of routines, we found that the original methods and techniques of hard thinking lie quietly on our own machines!
I always wanted to study Duwamish more carefully, but I never had a chance. Now the system is going online, so it's easy and time to get in touch with her :)
The Duwamish solution has a total of six projects, which are structured into five layers: Business appearance layer (BusinessFacade), business rule layer (BusinessRules), and business entity layer (Common), data access layer (DataAccess), business presentation layer (Web ). another project is SystemFrameWork, which is mainly used to configure, track, and log the entire system architecture.
Common Project
1. Let's take a look at the Duwamish7 data structure. Figure 1

2. business Entity encapsulation is performed on the four main objects in the database: Book, Category, Customer, and Order. The four classes are inherited from DataSet, but the class is added with two attributes: [System. componentModel. designerCategory ("Code")], [SerializableAttribute], the previous attribute indicates that the current class designer belongs to a certain category. The next property marks the current class as a serializable class so that it can be called remotely.

Ing between tables in the database and fields in the Table. Some classes also define related error information, as shown in
Public const String EMAIL_FIELD_NOT_UNIQUE = "Email Not Unique ";
3. Call the BuildDataTables () method in the default constructor to create a table structure and add it to DataSet. Only one table is saved in the BookData, CategoryData, and mermerdata classes, while the OrderData class contains information about 6 orders.
Some tables in the DataSet correspond to physical tables in the database, some correspond to multiple tables in the DataSet, and some correspond to one table in the Dataset.
4. The Common project also has a DuwamishConfiguration class, which is used to obtain Duwamish configuration items in the Web. Config file and inherit from the IConfigurationSectionHandler interface. This interface defines the following agreement: All configuration section handlers must be implemented before they can participate in parsing configuration settings. This interface only has one Create () method. The Create () method is implemented in the DuwamishConfiguration class. The NameValueSessionHander instance baseHandler. Create () method is used to fill in NameValueCollection setting, and then call
The ApplicationConfiguration. ReadSetting () method returns a specified configuration.

Question:
Each of the 1.4 business entity classes has a constructor that supports serialization, such as
Private BookData (SerializationInfo info, StreamingContext context): base (info, context ){}
It is not quite clear that there are no special reference objects for these four class serialization. You should simply add the Serializable attribute before the class to mark it as long as "Basic serialization" is performed, why do we need to define a constructor that supports serialization? Is it because of DataSet inheritance ??
2. When will the system call the Create () method of the DuwamishConfiguration class to obtain the relevant configuration information in the Web. Config file?

From http://blog.csdn.net/dibov/archive/2004/12/20/222410.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.