Categories
Technology

COM+ to .NET: Fast Forward Your VB Components

Originally published at O’Reilly

The joke goes: “How do you pronounce ‘C#’?”, and the punch line is: “The language formerly known as Java.”

Extending this, you can say that .NET is “…the infrastructure formerly known as COM/DCOM.”

The .NET infrastructure is significantly different from COM/COM+. However, information about .NET has been out long enough so that most of you have passed the “But, why?” stage. You’re probably now interested in discovering how you can continue to create and support your existing component development to be ready when your organization adopts the production release of .NET. In particular, if you work with ASP and make use of COM+ components created with Visual Basic, you’ll be interested in how you can ensure that your components migrate well to the new .NET environment.

We’ll take a look at some of the changes .NET will have on your current VB ASP component development efforts. In particular, we’ll look at what you can do now to ensure your components are forward compatible with .NET.

What Variant?

One significant change between COM/COM+ and .NET is that the Variant data type is no longer supported; its functionality has been incorporated into the Objectdata type. For Visual Basic programmers this is a major change, particularly if you’ve worked with component development and have used variants to pass data to and from component methods.

For future compatibility, you can begin to use specific data types rather than the Variant in your new components. However, if you have used Variant in existing code, be aware that Microsoft has provided two means of porting your components that contain variants to .NET.

The first is the Visual Studio Upgrade Wizard, which is automatically engaged when you open your older VB code into Visual Studio .NET for the first time. This wizard replaces all instances of Variant with Object, and any time you try and type in a Variant, it replaces it immediately with Object. No additional effort is necessary on your part.

For instance, if you had a subroutine such as the following:

Sub test (ByVal varValue As Variant)

The upgrade wizard changes the subroutine to:

Sub test (ByVal varValue as Object)

If you didn’t provide a data type for a variable in VB 6.0, defaulting to a data type of Variant, the upgrade wizard automatically redefines the variable as Object in VB.NET.

(The upgrade wizard performs other upgrade modifications that will be highlighted throughout this article.)

You don’t have to open and convert a compiled component to .NET to ensure compatibility with the environment. A second means of porting your components to .NET is the utility, TlbImp. How to use this tool was discussed and demonstrated in a previous article; basically what happens is the tool creates a .NET assembly for the component that allows it to run within the .NET managed code environment, without having to recompile the component.

Dropping Variant isn’t the only change from VB 6.0 to .NET. VB Data Types and type checking is another significant area of change, which is discussed next.

Data Types and Data Typing

A chief concern about Visual Basic in the past, particularly from C++ or Java programmers, has been that Visual Basic is a weakly typed programming language. For instance, you can concatenate a number with a string in Visual Basic 6.0, and VB will automatically convert the numeric into a string value, using implicit conversion, as shown in the following example:

iValue = 123
StrSum = iValue & "123"

This type of operation is still allowed with .NET when using the overloaded concatenation operation (‘&’), as shown above, but any other use of numerical values where a string is expected will generate an error. As an example, you won’t be able to pass a number through a string parameter and have VB automatically perform the conversion:

Sub tstValue (String strValue As String)
...
Dim iValue As Integer
iValue = 13
tstValue iValue

The above works with VB 6.0, but it won’t work with VB.NET.

To support this new shift to stronger data typing, Visual Basic .NET also introduces the Option Strict statement:

Option Strict

Like its earlier predecessor, Option ExplicitOption Strict enforces explicit variable declaration:

Dim iValue As Integer

However, Option Strict enhances this data protection capability by prohibiting implicit conversions between strings and numbers, as well as limiting numeric conversions to those termed as widening conversions. A widening conversion is any that converts a smaller number, or less precise one, to a larger, more precise one, such as converting an integer to a double.

Option Strict also prohibits late-binding. Using this option, the following, while legal in Visual Basic 6.0 will generate a compiler error in .NET:

Dim obj As Object
...
obj.SomeMethodCall ...

As late-binding is detrimental to any wire based communication between application components, such as in a distributed or Web-based environment, you’ll want to avoid its use even within your existing Visual Basic 6.0 component development. Late-binding always requires two method calls for every call within the actual code: one to find information about the method (through automation and a process referred to as reflection), and one to invoke the method itself, necessitating two round-trips across the wire. Placing Option Strict at the top of your code module just helps to ensure that you don’t accidentally leave late-bound variables in your code.


Accessing COM/COM+ Objects Within the ASP.NET Environment–Don’t miss Shelley Powers’ first article on the differences between ASP.NET and the original ASP server environment. Shelley has also updated her book on ASP components within the Windows 2000/COM+ environment, Developing ASP Components, 2nd Edition.


All of these new techniques enforce a stricter adherence to a more strongly typed language, while still providing the option of more loosely typed conversions that do exist in many existing Visual Basic applications. This is a necessary compromise between the Visual Basic of today and the one included as part of .NET.

To ensure that your code moves cleanly into this more strongly typed environment, you can use the Option Explicitstatement now to enforce variable declarations in your current applications. Also, eliminate any narrowing conversions (converting numbers of larger precision and size to smaller data types, with the potential loss of data) in your code, and make use of explicit conversion functions when working with numbers and strings together:

StrSum = "Account is " & CStr(iValue) & " overdue"

In addition, use type libraries (included in your code module by attaching the libraries to your project) to perform early binding, not only for future compatibility, but also to improve the performance of your Visual Basic applications today.

When you open an existing VB 6.0 project in VB.NET, the upgrade wizard automatically adds the Option Strictstatement with a value of “Off” to provide for backwards compatibility in behavior. The Option Explicit statement is left as is (“off” by default).

Another .NET change to Visual Basic — and one that particularly impacts component developers — is the size of the integer data type, covered in the next section.

Integer Size

A significant data type change between the two releases of VB is the size of integer values. Starting with Visual Basic .NET, the Integer data type is equivalent to the new .NET System.Int32 data type, and is now 32-bits, and signed.

An advantage to 32-bit integers is that this size is more efficient within numeric operations than the older 16-bit integer, particularly on 32-bit operating systems, such as the current default Windows 2000 basic operating system.

Another benefit of the changed integer size is that VB is brought in line with other mainstream programming languages, such as C++, Java, and Perl. If you’ve worked with component development, particularly with components based in different languages, one of the most frustrating aspects of working with Visual Basic has been its 16-bit integer, especially when so many other languages have 32-bit integers. This is particularly apparent when accessing VB components from within PerlScript.

If you still want access to 16-bit numbers, you’ll need to use the new Short value, and use the Long data types for 64-bit values.

The upgrade wizard maintains the integrity of the VB application by converting VB integers to shorts (16-bit). If you want to ensure that your component is converted to the new .NET integer type, start using the VB 6.0 long data type for your variables and particularly your method parameters in your existing development effort.

A less significant data type change is that currency is no longer a supported data type. Instead, a new Decimal type has been provided to allow for more precision and more digits:

Dim decValue As Decimal

In Visual Basic 6.0, the Decimal data type was only available as a Variant sub-type.

Dates are also handled differently in Visual Basic .NET, and are implemented with the .NET DateTime format instead of the current Double format. To convert between the older and the new date format, Microsoft is providing routines such as ToDouble to convert the new data type to the original double value.

You can best prepare your existing code for these new data types by isolating your use of Date and Currency within your components as much as possible in order to manually migrate your code in the future if necessary.

Speaking of function parameters, another significant change within Visual Basic .NET is subroutine semantics, including a different parameter passing implementation.

Subroutine Modifications

Parameters, and how they are passed from the calling program are handled differently between VB 6.0 and VB.NET. By default in Visual Basic 6.0, all parameters are passed by reference if the ByVal keyword isn’t used. This allows the procedure to modify the variable used to pass the parameter in the calling program, which can lead to unexpected results, an example of which is:

Sub testValue(iNewValue As Integer)
   iNewValue = iNewValue + 20
End Sub

...

Dim iValue As Integer
iValue = 2

Call testValue(iValue)

' value is now 22 rather than 2

Parameters are passed by value as a default in Visual Basic .NET, protecting against accidental and unexpected data changes. You must explicitly use the ByRef keyword in order to pass a parameter by reference.

You can easily ensure the future compatibility of your existing code with Visual Basic .NET by using the explicit ByVal and ByRef keywords with all of your parameters in your 6.0 Visual Basic code.

The Optional parameter keyword also has different semantics in Visual Basic .NET. In 6.0 you can specify that a parameter is optional without having to provide a default value:

Sub someRoutine (Optional ByVal iValue As Integer)

In 6.0 you’d use IsMissing to check to see if the value changed. In Visual Basic .NET, you must supply a default value for all optional parameters:

Sub someRoutine (Optional ByVal iValue as Integer = 0)

To ensure smooth migration to .NET, when using Optional in your existing code, provide default values. This approach not only allows your code to move forward into .NET, it’s also a good programming practice to apply today – the use of IsMissing adds unnecessary complexity to your procedures.

Other changes with Visual Basic .NET have to do with structured data, such as arrays.

Structural Changes with Arrays

If you use arrays, you’ll find that you can no longer re-define the lower bound of an array with the Option Base statement in VB .NET:

Option Base 1

All arrays now start at zero, as arrays start in most programming languages. Again, this change is necessary for programming language interoperability, something that .NET tends to encourage (or at least, not discourage). In addition, you can’t specify a fixed array size in .NET as you could in 6.0:

Dim strValue(10) as String

Instead, you’ll use syntax similar to the following:

Dim iValue as Integer = new Integer(10) { }

This new approach allocates storage for 10 elements of the specified data type, but doesn’t fix the size of the array itself. The array can be changed through the use of the ReDim statement:

ReDim iValue(20)

To allow for maximum forward compatibility in your code, avoid the use of Option Base to reset the base value of an array. Not using this statement forces your arrays to begin with the zero boundary. The upgrade wizard will also convert arrays to being zero-based, if so instructed when the project is first opened.

Microsoft hasn’t restricted its Visual Basic changes to structural and data type changes. The use of built-in functions will also be impacted in .NET.

Built-in Functions and Namespaces

One brand new feature of Visual Basic .NET that I do want to mention in this article is the concept of namespaces. Namespaces are ways of exposing externally created components to an application, similar to importing a type library into C++ or attaching a reference to a type library in Visual Basic 6.0.

You can import a namespace into Visual Basic .NET code using the imports statement:

imports Microsoft.VisualBasic.ControlChars

With imports, you can reference members of the namespace without having to type the qualifying namespace name. Instead of:

dValue = Math.sqrt(number)

You can use:

dValue = sqrt(number)

The reason I’ve introduced the namespace concept into an article focusing on forward compatibility of VB ASP components is because many Visual Basic 6.0 built-in functions have now been defined within specific namespaces, such as the System.Math namespace, just shown.

One significant alteration to your code based on namespace use is with the String data type. Now, you can access Stringdirectly from within your code:

Dim strValue as String 

In Visual Basic.NET, String is actually defined as part of the System.String namespace. In fact, all supported data types are now a part of the System namespace, as is much of VB’s built-in functionality.

To ensure backwards compatibility, Microsoft has provided a specific namespace, Microsoft.VisualBasic.Compatibility.VB6 that you can import into your existing Visual Basic 6.0 components. This will allow applications to work within the Visual Basic .NET environment until you have time to make the actual modifications.

One final change in Visual Basic .NET I’ll look at is the impact on Properties within the new environment, and the use of Set and Let.

Property Changes

In Visual Basic 6.0, you use direct assignment when assigning scalar values but must use the Set keyword when assigning an object to a variable:

Set obj = SomeObject

In Visual Basic.NET, the infrastructure supporting properties has changed, and the Set and Get keywords are now disallowed in the programming language.

As a demonstration of this change, in the past when you’ve worked with ADO, you’ve assigned a Connection object to a variable using syntax similar to the following:

Set rs.ActiveConnection = conn

Chances are, you’ve forgotten to use the Set keyword, resulting in an assignment of the Connection object’s default property, the connection string, instead of the object itself:

rs.ActiveConnection = conn

With the above, the code will still work, a database connection is assigned to the ResultSet object, but what happens is that a second connection is created using the connection string rather than using the existing connection object.

Visual Basic .NET no longer supports the concept of default properties unless they take parameters. This is one of the design changes folks have been asking for, and one that was long overdue.

With this type of change, the accidental assignment of a default property, as described with the ADO Connection object, will no longer occur – a definite improvement within the language and the tool.

The .NET infrastructure also specifies a new approach for defining properties that provides the means to set and retrieve the property value. An example of a property within the PDC-based release of Visual Basic .NET is the following:

' Internal storage, always in degrees. 
Dim Degrees As Double = 0  
  Property Angle(ByVal Radians As Boolean) As Double 
  Get 
    Angle = Degrees 
    If Radians Then Angle = Angle * 3.1415926536 / 180 
  End Get 
  Set 
    ' The keyword Value stands for the value passed in. 
    Degrees = Value    
    If Radians Then Degrees = Degrees * 180 / 3.1415926536 
  End Set 
  End Property

By providing a means to define how a property is set and retrieved, the Property LetProperty Set, and Property Getstatements are no longer necessary and been removed from language support. Again, as with many of the other changes detailed in this article, the upgrade wizard will automatically correct the use of Set and Get and property management when your VB 6.0 component project is opened. Compiled components that have been wrapped via the use of TlbImp aren’t impacted by these code internal changes.

Summary

You’ve not yet had a chance to get a detailed look at all of the Visual Basic .NET changes – many are still being determined. However, you should have a better understanding of the types of changes headed your way, and how they will impact your existing VB components and component development.

Hopefully I’ve also shown that though the changes are significant, they aren’t overwhelming. In fact, there are many steps you can take now that will allow for a smooth migration of your VB component code to the new .NET architecture.

As I finished writing this article, Microsoft announced that it was restoring some of the Visual Basic 6.0 functionality it had originally pulled with the first beta release of VB.NET. This move was to ensure that VB.NET could support applications developed before the release of VB.NET.

However, if you’re creating new applications–or components–adjust your code to be in synch with VB.NET rather than depending on support for the older VB code base.

Categories
Technology

O’Reilly P2P Presentation Proposal

Title: Smoke: An Infrastructure supporting Distributed Peer Services

Length: 60 minutes

Focus of Talk: Technical/Tutorial

Subject Matter: Infrastructure/Distributed Computation

Abstract

The sale of large scale control systems — such as those used with mass transit systems or to control multi-national pipelines — often requires a marketing and engineering effort that demands the input of several different people, many of whom live in different countries and speak different languages. To assist in this effort, a project is underway to create an automatic configuration tool that allows these team members to work in a collaborative manner, regardless of each member’s locale.

Because of a lack of infrastructure for applications of this nature, the developers designed one that is based entirely within P2P-based concepts and technologies.

This infrastructure, named Smoke, is unique in that it’s based on the concept of shared distributed peer services — services that are lightweight, discrete, and transient — existing within a framework that is both open-application and cross-platform compatible.

At the presentation, the speaker will provide an overview of Smoke, as well as demonstrate a working prototype of the automatic configuration tool. To display Smoke’s open-application and cross-platform support, three variations of the configuration tool prototype will be demonstrated: one with an interface created with Mozilla’s XUL and hosted on MacOS; one accessed through Enterprise Java Beans (EJB) hosted through an Apache WebServer and WebLogic on Unix; and one accessed through Groove, another P2P infrastructure product, hosted in Windows 2000.

Smoke is an open source infrastructure, which means it can be used by any developer interested in working within a P2P distributed peer services environment.

Description:

Shelley Powers will present an open source P2P infrastructure that supports the concept of distributed peer services: services that are lightweight, discrete, and transient. A prototype large scale control system configuration tool is used to demonstrate the infrastructure. Three different variations of the prototype will be shown, to demonstrate both the open-application and cross-platform capability of the infrastructure and the tool.

Speaker: Shelley Powers

Speaker Biography:

Shelley Powers is a consultant/author with her own company, the Burning Bird Corporation, currently located in Boston, Massachusetts.

In the last several years, Shelley has worked on several distributed and Web-based applications on a variety of platforms. In addition, she has also authored or co-authored books on Dynamic HTML, JavaScript, Java, CGI, Perl, P2P, and other technologies, as well as writing for several publications including Webtechniques, MSDN Journal, Netscapeworld, and O’Reilly Network. She’s the author of O’Reilly’s Developing ASP Components, second edition. Shelley can be reached at shelleyp@yasd.com.

Categories
Technology

Australian Censorship bill could impact on P2P

Originally published at O’Reilly

Australia’s been in the news before about Net censorship legislation, but the South Australian Parliament may have gone a little extreme even for this Net-conservative country.

A bill introduced in November would make it illegal for content providers to post material that is considered “objectionable viewing material” for children. What’s objectionable viewing material? Anything that the police — the police, mind you — would consider as falling within the R, NC, or X ratings categories of the film industry. Ostensibly this would cover material such as child pornography or content advocating breaking the law. However, the bill is general enough that it could also cover material on topics such as abortion, suicide, drug use, sexual behavior and other sensitive topics that could be termed “adult topics” and therefore R-rated.

Even more alarmingly, under this bill posting this material is illegal even if access to the material is restricted or password-protected. Compounding the problem, content providers would have no way of knowing whether their material would fall under one of the prohibited classifications before posting it; if the material is judged by the police to be within the parameters of this bill, you’d be charged. No warning and no second chance. And the fines aren’t cheap: as much as 10,000 (Australian) dollars per offense.

According to an alert issued by Electronic Frontiers Australia, this bill would actually make material that’s legal offline, illegal once posted online.

The impact of this bill on Web-based businesses is obvious — the level of censorship implied would give even the most conservative businesses pause when it comes to posting content on their Australian-based Web sites. What may not be so noticable, though, is the impact of this bill on peer-to-peer applications and services. You see, the wording of the bill doesn’t focus on Web-based content; it concerns content distributed via the Internet.

Consider the following scenario: You’re a subscriber to a file-sharing P2P service such as Napster. You make a request for material that could be considered “objectionable” because of the language used — for instance one of the more explicit songs from Alanis Morissette’s album “Jagged Little Pill,” or practically anything from Guns N’ Roses or Eminem. Once you’ve downloaded an “objectionable” song, it’s now on your machine for your personal use. However, in this process, you’ve also “posted” this content for access by other clients through the Internet: P2P is based on the fact that any node within the network can be both a client and server. According to this bill, you would be in violation of the law.

If you’re a subscriber to a decentralized service such as Freenet or Gnutella, the potential problems with this type of bill are even more extreme. With these types of P2P networks, if a file request is made from node A to node B, and then from node B to node C, that file is returned to node B as the intermediary first, and finally to node A. Now, not only is the peer located at C in violation of the law, so are A, who originally requested the file, and B, who did nothing more than subscribe to the conditions of the P2P service that states files may be stored on the client’s machine as a method of disseminating popular files throughout the network.

By its very nature, Freenet hides the identity of nodes supplying or requesting files, making it difficult to ascertain who was the originator of the material or the request. Because of this, it becomes difficult to ascertain who is legally responsible for “posting” the file if it is deemed to fall within the parameters of this censhorship bill. So, what could happen is that the intermediary node containing the file is the one charged with violating the law, rather than the originator, regardless of the technical and legal semantics that form the basis of anonymity within a Freenet network.

At the very least, applying this censorship law to the Freenet or Gnutella network would become a legal nightmare to the South Australian court system. All it would take to demonstrate the unfeasibility of the law is to introduce one highly popular but objectionable file to Freenet, potentially turning all or most South Australian Freenet users into criminals. This issue goes beyond considerations of copyright law.

According to the UK-based Register the South Australian’s politicians must have gone “barking mad” — in other words, the bill’s sponsors may want to reconsider the bill on its own merits.

Read the pertinent sections of the censorship bill at Electronic Frontiers and then join discussions at Slashdot and South Australia’s Talking Point

Categories
Technology

Speaking at the P2P Conference

Recovered from the Wayback Machine. In some ways, what we described was the origins of a pseudo-blockchain functionality. But Michael went back to Sydney, and I went on to other things.

I’ll be speaking at the first P2P conference, presented by O’Reilly and being held in San Francisco in February.

I’m co-speaking with Michael Hitz, from Skyfish The focus of the presentation will be:

Managing power grids (such as Florida Light and Power’s) and mass transit systems (such as the new light rail system to the airport in Hong Kong) each require sophisticated control systems. The sale of these large scale complex systems often requires an international marketing and engineering effort that demands the input of many different people, many of whom live in different countries and speak different languages. Such a sales process is fraught with an engineering challenge of its own that demands accurate price estimates, bills of material, forecast manufacturing orders and communication across sales, engineering and manufacturing teams in multiple time-zones.

 

This talk focuses on a development effort currently underway to create an automated configuration tool for such systems; one which will allow a number of distributed participants to collaborate on the description of a complex system of distributed parts. Output are various stages of quotation, requests for approval, and an automatically generated bill of materials (BOM).

 

In order to facilitate the geographical separation of people using the tool, the creators will be using P2P technologies to locate and access distributed services based on the needs of both configuration and user, at each stage of the configuration cycle. Streaming data will be used to dynamically generate the user interface, based on work in progress by one or more active participants and each engineer’s locale.

Peer-to-Peer is more than just another buzz word or a technology such as Napster. Ray Ozzie, the creator of Lotus Notes, has started a company and a technical framework called Groove that encompasses P2P technologies and concepts, and no one can say that he doesn’t understand either technology or the current market or how to merge the two.

P2P technologies such as distributed computing, collaboration, and shared services and resources will change the way we access functionality and use the Internet in the next few years. To be blunt, the last time I was this excited about technology was when I first used this new thing called the “web”, years ago.

Here’s your chance to get in at the start of a new way of doing things — attend the P2P conference in February, and attend our presentation Friday, the 16th of February in the afternoon.

Categories
Specs Technology

Browser, Browser Not

Originally published at O’Reilly

Recently, O’Reilly published a set of articles (Netscape Navigator 6.0 to Fail Standards ComplianceAn Update, and Netscape 6.0 Released), written by the popular author David Flanagan, about the release of Netscape 6.0, Netscape’s newest entry in the browser marketplace.

David presented several valid concerns about bugs still present in the release of Netscape 6.0. And it is true, Netscape 6.0 did release with several unfixed bugs, many of which will have an impact on support for W3C specifications.

Our reaction to the release, however, was somewhat different. Along with other application developers, we’ve been waiting for the public release of an application that uses Mozilla’s XPToolkit, a set of software components from which Netscape 6.0 and the upcoming Mozilla 1.0 were built. Now that Netscape 6.0, which uses this framework, has been publicly released, we’re delighted: testing of XPToolkit may begin in earnest.

While many are focused on the release of Netscape 6.0, some of us aren’t. We’re more interested in the application environment created by the Mozilla team to support the implementation of browsers in general. To us, this framework is more important than the release of a new browser will ever be.

The reason for this is the changing face of the Internet, itself.

The Changing Face of Internet Applications

Current Internet applications rely on a centrally located Web server to distribute HTML over HTTP to clients. Each client, or Web browser, renders the source and displays a human-readable page.

This architecture has become so popular that you can’t pick up a magazine or a newspaper without hearing about Web servers or the new business models based on them. Although this architecture is based around universally located resources, most application-level resources are centralized and many other resources are hard to find. Some Web sites help you find other Web sites or “resources.” Others go so far as to offer completely centralized applications, as Application Services Providers (ASPs).

New technologies will soon force us to rethink the way we use the Internet. Distributed systems, mobile agents, and peer-to-peer (P2P) applications may completely undermine the need for browser-based Internet access.

P2P applications are already stepping around the browser. The next step will be around the Web server.

Consider this: a P2P application that locates and downloads a new function. The simplest example here may be provided by a P2P execution framework that uses XML-based remote procedure calls between peers to marshal XML-encoded functions. Instead of hitting Web pages, each peer locates and accesses both data and functions among a network of peers. No Web servers.

This scenario is not going to be best served by the traditional browser. Why?

The Limitations of Browsers

The things that made the Web browser a success in the beginning are the things that make it ineffective for new application models.

The browser was built to render files stored on Internet sites so we didn’t have to muck about with FTP. As soon as content became more visible, people started publishing yet more content, so browsers rendered HTML, then XML, formatted with CSS or XSLT. However, the browser itself has a very limited interface, even with new advances in W3C specifications. Sophisticated browser pages mean using either complicated object models–leading to cross-platform and cross-browser idiosyncrasies that are usually the result of standards initiatives–or using page-embedded applications, such as Java applets and plug-ins.

Even when the browser follows standard specifications, working within a browser page to create a sophisticated interface isn’t a simple or uncomplicated task.

In addition to the browser becoming increasingly complex as the nature of content becomes so, use of it implies that applications ought to be served from one location, and in one manner. To do something such as make a remote procedure call, you would need to use a digitally signed Java applet or some other browser-specific and limited technique. This is something that won’t bother newer P2P applications.

Finally, browsers were designed to be safe, and operate in a protective sandbox. Web-based applications served via a browser have difficulty getting at the user’s machine. Though safe, this restriction also prevents behaviors that would have the application modify its user interface. And this dynamism is going to be necessary in an environment where new services require new application interfaces that can be downloaded as data.

An Internet Application Framework?

Mozilla made a tough decision a few years ago–to scrap the Netscape 4.x architecture in favor of one built from the ground up. In the process, this open source team created an application environment based on reusable and interchangeable components.

With this application environment in place, the team then proceeded to build a sophisticated browser. They threw in Internet Chat, a Web page composer, and other complex things, all of which were released recently as Netscape 6.0. Often forgotten is that a powerful application environment came with it. This environment is now usable by developers of other Internet applications.

What types of applications? Well, ActiveState, the company that provides popular implementations of Perl and Python for various operating systems, used Mozilla to create itsKomodo product, a visual IDE for working with Python and Perl code. The user interface provides, among other things, colored syntax, syntax checking, and source-level debugging.

So, we have a browser and an application that can be used to create and test Perl and Python applications, all built from the same application architecture.

This is exciting stuff! Much has been written about reusable code and component-based design, and now we have an open source application environment we can all use to build our own applications.

Even more exciting is the extensible user-interface language from Mozilla called XUL (pronounced “zool”). It’s based on XML, which means you can use XML to create a user interface. Combine this with the ability to make remote procedure calls, and you have a perfect place from which to commence building a bunch of P2P applications, based on the scenario mentioned above.

Now, instead of opening a browser, you can open an application built on the same framework as your browser, but with a sophisticated interface of dropdown menus and tabbed pages–all created using XML. You can access remote procedure calls at the touch of a button and when you’re ready to access a new service, click another button, and in a couple of minutes restart your application. New entries will be added to new or existing menus providing access to the new service. All this is accomplished without Java bytecode, a new plug-in, or a DLL.

You’ve just downloaded XML.

When you explore the possibilities of the XPToolkit from Mozilla maybe you’ll agree that Netscape 6.0 is more than just a standards-based, better-than-Navigator-4.x-browser. It’s the start of a new new way of doing things on the Internet.