tailieunhanh - Murach’s ado net _4 database programming with vb 2010 phần 2

i ảnh hưởng đến cách bạn phát triển các ứng dụng web và những gì bạn cần phải học khi. Điều đó có nghĩa là cuốn sách này tích hợp các vật liệu mới với tính năng cổ điển đã không thay đổi, tạo cho bạn một phương pháp tiếp cận, gắn kết và chất lỏng web học lập trình đó là ngày hôm nay thực hiện. | Chapter 2 An introduction to 4 55 The architecture of an application that uses business classes Presentation Main Windows other form layer form class classes Middle layer Business classes Database layer Description To simplify development and maintenance many applications that use business classes use a three-layer architecture that includes a middle layer. The classes in the middle layer sometimes called the business rules layer act as an interface between the classes in the presentation and database layers. These classes can represent business entities such as vendors or invoices or they can implement business rules such as discount or credit policies. When the classes in the middle layer represent business entities the classes can be referred to as business classes and the objects that are created from these classes can be referred to as business objects. When you use business classes you don t use datasets. Instead you use commands and data readers to work dfrectly with the database and the data you retrieve from the database is stored in business objects. Often the classes that make up the database layer and the middle layer are implemented in class libraries that can be shared among applications. Figure 2-11 How an application that uses business classes is structured Download from Wow eBook 56 Section 1 An introduction to Perspective One of the goals of this chapter was to introduce you to the two basic ways that you can develop applications with datasets and without datasets. The other goal was to introduce you to some of the classes that you ll be using as you develop applications. With that as background the three chapters in section 2 will show you how to build significant database applications by using data sources and datasets. As you will see this approach is especially useful for developing simple applications or prototyping larger applications. By chapter 5 though you ll start to see some of