Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


February 1998

Introduction to IIS 4.0 with MTS and DCOM


RSS
Subscribe to Windows IT Pro | See More Distributed COM (DCOM) Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Windows DNA lets you serve up components and transactions

At the Microsoft Professional Developers Conference '97 in California last September, Microsoft introduced the Windows Distributed interNet Application Architecture (Windows DNA), a framework for building multitier distributed computing solutions. Since then, Windows DNA has received both positive and negative press, with most of the negative press resulting from confusion surrounding the term Windows DNA and its components. To help clear up this confusion, I will introduce two major pieces of DNA, Distributed Component Object Model (DCOM) and Microsoft Transaction Server (MTS), and describe how they interact with a third major part of DNA, Internet Information Server (IIS) 4.0.

Developing DNA Applications with COM
Windows DNA lets you develop client/server applications, intranet applications, Internet applications, and a mixture of all three types. The application can use most Microsoft products with third-party components and tools. Windows NT Server and a database, such as SQL Server or Oracle, usually serve as the foundation for such an application. A Windows DNA application typically uses middle-tier business rule components and other front-end and back-end components built using the Component Object Model (COM).

COM is the most popular architecture for implementing components in a Windows environment. A COM component is simply an application or piece of code, such as an ActiveX component or control, that exposes parts of itself for other applications to use through COM's standard interface mechanisms. For example, a developer might create a customer component and expose particular attributes (known as properties) of the customer, such as name, address, and telephone number. Other applications can then use the customer component and either read or set the exposed properties. In addition to exposing properties, a COM component can also expose methods (known as actions) that other applications can use. For example, the customer component might have both Add and Delete actions, where Add creates a new customer and Delete removes an existing customer.

You can create COM components with Visual Basic (VB), C++, Delphi, Visual J++, and other languages. Because COM is a binary standard, it is language independent. Therefore, you can interchange COM components among any applications or development tools that adhere to the COM specification.

COM components are extremely powerful. Many vendors, such as Microsoft, build major business applications, such as Microsoft Office 97, using many different components that other applications can use via COM. Almost everything Microsoft ships exposes a COM interface for the application. Your organization might be creating COM components to encapsulate various layers of its business rules. Such components are usually known as business objects. For example, most companies that sell products or services have pricing rules. You can use COM to encapsulate the pricing rules into a component for other applications to use. This sharing makes changing the pricing rules easy, because all you have to do is change that one component to make all the applications use the latest pricing rules. Another example is shop floor components for the factory floor. You can easily build a set of COM components that package functions such as shop floor inventory handling, employee tool issuing, and time card entry.

DCOM even lets applications use remote procedure calls (RPCs) and a network transport (such as TCP/IP) to remotely access COM components. DCOM hides all the details from the developer, so anyone with the proper security credentials can run the DCOM Configuration tool (dcomcnfg.exe), which comes with DCOM, and configure a component to execute remotely.

Serving Up COM Components
Now that you understand a little about COM components, you can begin to understand how they relate to IIS and specifically to Active Server Pages (ASP) applications. ASP applications can execute a COM component by just adding a line or two of program code to the page. For example, you can add a few lines of code to use a Calculator component. The following line creates an instance of this component:

Set obj = Server.CreateObject("Math.Calc")

Two more lines of code set the properties of the Math.Calc component I just created:

Obj.Op1 = 2
Obj.Op2 = 5

Next, I execute the Add method:

Obj.Add

Finally, I can retrieve the result and send it to the HTML stream:

Response.Write "Result is: " & Obj.Result

This code segment shows why COM components are so powerful. I simply use the component as a black box that performs some function.

Now, each time the ASP page executes, the Math.Calc component executes and carries out any instructions I program in the code. This functionality is great because components let developers reuse code and achieve large efficiencies in development projects.

The ASP files that make up an IIS application contain script code (usually either VBScript or JScript) and HTML. Each ASP file requires resources (at least CPU and memory) on your server. In addition to these resources, IIS caches the ASP files in memory to improve performance.

With IIS 3.0, all ASP pages and other in-process components run in the same memory space as the IIS Web service. ASP pages are relatively bulletproof, and the script in a page can create an instance of a COM component and use it like any other application, as my previous calculator example shows. An in-process COM component, such as an ActiveX component, will run in the same memory space as the Web service. Unfortunately, if the ActiveX component crashes, it can also crash the Web service. Despite this risk, many developers use in-process components because they are much faster and consume fewer resources than out-of-process components.

With IIS 4.0, you can create ASP applications that run in their own memory space, so that if the application crashes, it won't crash the server. This IIS 4.0 feature is a major improvement over IIS 3.0. You can set the ASP application to run in its own memory space using the IIS snap-in in the Microsoft Management Console (MMC) and checking the box Run in separate memory space (isolated process), as you see in Screen 1. Even if you have a Webmaster who handles such Web-related tasks, you need to understand the ramifications of such settings.

   Previous  [1]  2  Next 


Top Viewed ArticlesView all articles
CES 2009: Ballmer Announces Windows 7, Windows Live, Live Search Milestones

During his first-ever Consumer Electronics Show (CES) 2009 keynote address last night in Las Vegas, Microsoft CEO Steve Ballmer announced the pending public availability of a feature-complete Windows 7, the final version of Windows Live Essentials, and ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Where is Microsoft NetMeeting in Windows XP?

...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Related IIS and Web Administration Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing