1221-1223

Previous Table of Contents Next

Page 1221

Microsoft DCOM/ActiveX

Just so you gain an understanding of the Microsoft ActiveX approach, this chapter describes its pros and cons. ActiveX is a component architecture that enables developers to design reusable modules. These modules can be licensed as third-party development tools, which are used to accelerate the development process. The major drawback to using ActiveX components is that the application requires a Microsoft operating system to run. Also, ActiveX components can be very large. This means that users of ActiveX applications might need to wait while these components transfer across the Internet. Lastly, developers are subject to the problems concerning version control of dynamic link libraries (DLLs). Many ActiveX controls require specific versions of underlying DLLs. It is possible for a developer to use two ActiveX controls that require different versions of the same DLL.

It sounds like ActiveX is not even worth considering, right? Well, in fact, it happens to be one of the most widely available component architectures on the market. If you do not mind the Windows-only target platform or the large resource requirements, ActiveX can provide some robust functionality to your Web application. Many developed ActiveX controls are available to handle any task from report writing to spreadsheet presentation. For this reason, many developers overlook the negatives and reap the benefits of rapid development.

Java/JavaBeans

Java surfaced as the standard for Web application programming. I have relatively few bad things to say about this language. Every major software development firm including IBM, Oracle, Symantec, Borland, and Microsoft (the list continues) has licensed the language from SunSoft. Java is still in its infancy. Developers who push the envelope with Java can become frustrated with rewriting code to adopt the latest versions of the language. Most of the pitfalls with Java are due to third-party development tools and environments that are lagging behind on adopting the new standards. In fact, most of the Java development environments do not offer a pure Java solution. What they do offer is a mix of Java and proprietary development libraries.

Pure Java is a dream come true. Pure Java is a component or application that comprises only the Java language. Some vendors create Java components that rely on DLLs which are proprietary to their company. These DLLs are probably written in C or C++. Although these are fine languages, they are not as portable as pure Java. C and C++ are compiled to target a specific platform. The source code can be recompiled to support many different platforms, but that means a ton of executable programs. Java, on the other hand, sends byte code to the client computer to be interpreted at runtime or compiled with a "just in time" compiler. The same byte codes can run on any computer that has a Java virtual machine. This means only one set of compiled code can support every Java platform. When purchasing class libraries for Java, make sure that they have the logo "pure Java."

Page 1222

The promise of Java is what makes it the top contender for Web development. Java was designed to be the language of network computing. It is more than just a language. It is an infrastructure that extends the Internet and makes it one big networked computing resource. Many of Java's powerful features include

  • Object-oriented
  • Advanced security required for the Internet
  • Can be run on any computer
  • Simple to learn
  • Automatic garbage collection (automatically frees unnecessary memory)
  • Well suited for distributed processing
  • Requires minimal maintenance

What this means is that Java provides a mechanism for developers to create Web applications that rival those of client/server. You can create robust Web applications that require few client-side resources, load quickly, and are easily distributed to a virtually unlimited user community. You can write applications one time that run on all almost every hardware and operating system platform.

Oracle's Network Computing Architecture

Oracle took an interesting position in the battle of the Web. Oracle is embracing all of these and other standards. Oracle's Network Computing Architecture (NCA) provides a medium for unifying any software language or component architecture. You can even create mainframe gateways talking to CICS. You can create interfaces to virtually any programming model, as demonstrated with the Java and Perl execution cartridges. The NCA foundation relies on open standards. The Inter Cartridge Exchange (ICX), which supports distributed processing, will soon be fully CORBA compliant. The NCA also supports language-neutral Interface Definition Language (IDL), which lets you use virtually any language for development.

NCA Components: Cartridges

The primary building block of Oracle's Web Application Server is a software module called a cartridge. Cartridges are like black boxes that take input, process the input, and return output. Oracle defined the model of how they work and made this model available to the public. Any Web developer can write his or her own cartridge.

Cartridges provide specific functionality as well as maintenance of resources such as memory. Although Oracle's Web Application Server comes with several pre-developed cartridges, application developers can take advantage of this architecture and build their own. The advantages of the cartridge architecture are realized in a distributed environment. Much of a typical Web

Page 1223

application can be processed on the server, minimizing the need to send large amounts of information between the client and server. Also, server-side cartridges can maintain a state of execution between client-side screens. It is this persistence that enables developers to apply true database transactions over the Web.

Cartridges can take advantage of all three tiers of a Web application. They can be developed to execute on the client computer, on the server, or within the database itself. This flexibility offers many powerful strategies to the developer.

Client-Side Cartridges

Client-side cartridge is just another name for Java applet. Java applets are useful when processing needs to occur on the client side. Many Web pages are simply static from the point of view of the browser. Standard HTML may be enough to display the information required for a given screen. However, when you need any degree of sophistication on the client computer, Java is there to fill that need. A Java applet is a component of code that is tied into a HTML page. A rectangular area of the Web page is defined to house the applet. It is the job of the browser to invoke execution of the applet. The mechanism for doing this is passing the code to the Java virtual machine. Many popular Web browsers have a Java virtual machine, enabling it to process the applet.

Database Cartridges

One of the primary functions for Web applications is to interface with a database. Many older CGI programs required advanced programs to provide this interface. With Web Application Server, support for calling stored procedures is possible with no additional programming. If a system such as client/server was developed earlier to take advantage of the PL/SQL stored subprograms, they can be reused with few code changes and made available to a new Web application.

The Web Application Server routes all requests to the PL/SQL cartridge, which ultimately calls the stored subprogram to do the database processing. Types of processing include updating one or more tables as a single transaction, selecting detail information given input criteria, or inserting a new row of data into an Oracle table. Many of these functions are necessary for electronic commerce or other forms of business on the Web.

Server-Side Cartridges

Given the nature of the Web, a large amount of the application processing is performed on the server. The technological threshold of network computing offers a new paradigm in information processing. Enough programming code is sent from the server to deal with interfacing with the user. This includes collecting new input, presenting information, and applying simple algorithms. The majority of the application resides on the server side. This may include dozens of computers networked to the Web server.

Previous Table of Contents Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

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