Developing Multitier Applications with ActiveX Server Components

The Active Server framework allows Web applications to extend server-side functionality with custom or third-party components called ActiveX server components. ActiveX server components are OLE Automation Servers that support COM. Visual InterDev and ActiveX server components enable you to easily create multitier Web applications that include components that encapsulate specific processing logic. For example, a component that provides financial modeling and analysis functions can be used to build portions of a financial services Web application.

Using Visual InterDev, you can create ASP Web pages that execute the ActiveX component on the Web server and use its functions to return financial modeling information to users in dynamically constructed HTML pages. Because the component executes on the server, the content can be viewed on any platform by any browser. ActiveX server components can be integrated into Web applications using either server-side VBScript or server-side JScript. ActiveX server components can be created in any programming language that supports COM, such as C, C++, COBOL, Pascal (Delphi), Java, and Visual Basic.

Extending Visual InterDev Applications

ActiveX server components are an extremely important feature of Visual InterDev. ActiveX server components need not be constrained by the safety restrictions imposed by VBScript and JScript because they execute on a controlled server as opposed to on users' desktops. They can thus be used to extend Active Server scripting with capabilities such as direct access to the file system and access to machine and network resources. As COM components, they can be driven by VBScript and JScript and they can execute as either in-process dynamic-link libraries (DLLs) or out-of-process executables.

For lightweight components designed as in-process DLLs, performance can be dramatically improved over CGI solutions. This is because no context switching between processes is incurred as Web users browse pages that use the component. In addition, ActiveX server components can be instantiated once and shared between all users connected to the Web site for more efficient use of server resources.

Integrating Legacy Systems into Web Applications

ActiveX server components provide a convenient and effective way to tightly integrate a Web application with internal and legacy systems. Components can be used to wrap existing business functionality created in Visual Basic, C, C++, COBOL, Java, or other tools, exposing that functionality via COM. For example, a client-server insurance processing application written in Visual Basic can be exposed as a set of ActiveX components that can be called directly from Web pages via Active Server scripting. In this fashion, Visual InterDev and the Active Server framework help protect and extend an organization's investment in existing tools and systems, ranging from mainframe applications to more recently deployed client-server applications. Visual InterDev can be used to effectively integrate the functionality of these systems directly into the Web site via ActiveX server components.

Distributing ActiveX Server Components Using DCOM

Because ActiveX Server Components are COM objects, out-of-process server components can be seamlessly distributed over a server network using DCOM. This means that components requiring a lot of processing can be distributed to application servers that work with the Web server to efficiently process requests from users browsing the site. For example, a price look-up component that performs complex pricing calculations can be built as an ActiveX Server Component and distributed via DCOM to execute on a specialized application server.

Figure 1-4 demonstrates how DCOM can be used in large installations to add flexibility and power to your Web site.

click to view at full size.

Figure 1-4. Visual InterDev lets corporations take advantage of distributed ActiveX components via DCOM.

The advantage of DCOM is that distributed computing is achieved with transparency. Because DCOM provides complete network transparency, you can program DCOM components using the same scripting logic as if the components were running locally on the Web server. Thus, DCOM components can provide greater scalability and fault tolerance for mission-critical Web applications. Also, distributed solutions built with DCOM components and Visual InterDev offer more effective load balancing and the ability to create higher-performance applications for enterprise-class Web applications. You can also use Microsoft Transaction Server technology to provide online transaction processing (OLTP) and monitoring capabilities to Web applications built using distributed DCOM components.

You can also use Microsoft Message Queue Server (MSMQ) to build powerful features into your Web applications. MSMQ is a middleware application that provides asynchronous messaging services between application components.



Programming Microsoft Visual InterDev 6. 0
Programming Microsoft Visual InterDev 6.0
ISBN: 1572318147
EAN: 2147483647
Year: 2005
Pages: 143

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net