Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 142 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
142
Dung lượng
3,22 MB
Nội dung
Chapter Evolution of Distributed Component Systems COM+ and MSMQ / Chapter / of 19 Objectives Describe the architectures in software development Two-tier client server architecture Three-tier architecture Traditional n-tier approach Distributed component system and layered architecture Discuss the advantages and disadvantages associated with the above approaches COM+ and MSMQ / Chapter / of 19 Monolithic Applications Monolithic Applications Application A A single application consisting of everything required to perform tasks Application B A single application consisting of everything required to perform tasks COM+ and MSMQ / Chapter / of 19 Monolithic Applications (1) Monolithic Applications Application A A single application consisting of everything required to perform tasks Application B A single application consisting of everything required to perform tasks Drawbacks: Incorporating changes is a tedious job No data sharing possible COM+ and MSMQ / Chapter / of 19 Modern Applications The Features: Performance Scalability Extensibility Availability Reliability Maintainability Security COM+ and MSMQ / Chapter / of 19 Various Architectures Two-tier client server architecture Three-tier architecture N-tier architecture Distributed component approach and layered architecture COM+ and MSMQ / Chapter / of 19 Two-tier Architecture Client Tier (Front End) Data Tier (Back End) Client A Presentation and Business Logic bundled together into client application Server Client B Presentation and Business Logic bundled together into client application Database COM+ and MSMQ / Chapter / of 19 Two-tier Architecture (1) Advantages: Rules for data integrity implemented on the server Implementation of powerful hardware for the server enhances the availability and reliability of the application COM+ and MSMQ / Chapter / of 19 Two-tier Architecture (2) Drawbacks: Business logic present on every client Increase in the number of clients’ requests results in slower responses Difficult to make changes to the business logic COM+ and MSMQ / Chapter / of 19 Three-tier Architecture Client Tier (First Tier) Presentation Logic Application Tier (Middle Tier) Business Logic Data Tier Database COM+ and MSMQ / Chapter / 10 of 19 Steps walk you through creating a COM with VB6 Open VisualBasic • Select New Tab • Select ActiveX DLL (inproc COM) • Change default name of the project from Project1 to MyCOM • Change default name of the project from Class1 to Arth (an abbreviation of Arithmetics) • Double-click Arth class to open code window • Now you code four very simple functions • They include: – – – – Add two integers Substract two integers Multiply two integers Divide two integers • It’s ready to build a COM • Choose File Menu • Click Make MyCOM.dll… • Congratulations, you’ve finished created a COM It’s easy, isn’t it? • Remember to save your project regularly Steps walk you through using a COM in VB6 • You’ll create a small application to test MyCOM • Select File Menu Then click New Project • Choose Standard EXE project type • Select Project Menu, then click References… • Click MyCOM in the COM components list • Agree by clicking OK • Choose Command Button from ToolBox • Drag & Drop the button from ToolBox to the form and change the caption to Test Add Function • Double – click the button to open the source code window • You code some lines to initialize and use COM • Have a look at the figure • And here is the result Using COM in Visual NET • Create a WinForm Project • Select Project menu and click Add Reference… • Select COM tab and then select MyCOM from the COM components list • Click Select to finish • Drag and Drop a button and change its caption to Test Add Function • Double click the button to see the source code window Here is the soure code Creating COM in Visual C++ To be continued ... / of 23 Component Object Model (1) Advantages: Fully language-independent Supports version compatibility Provides Location Transparency COM+ and MSMQ / Chapter / of 23 Component Object Model (2)... ; it is a way to develop component- oriented application COM+ and MSMQ / Chapter / of 23 Component Object Model (3) Features Creation and use of reusable component objects A binary standard... Distributed Component Architecture (2) (Contd .) Application Component Interfaces Browser Presentation Logic Application Component M i d d l e w a r e Database Components leverage their context object