|
Comments
|
Today's Top SOA Links
BF on CF ColdFusion and Java — A March made in E-Heaven
ColdFusion and Java — A March made in E-Heaven
By: Ben Forta
Apr. 3, 2000 12:00 AM
Last month I stated that server-side Java was an ideal way to extend ColdFusion, and that Java would be playing a key role in ColdFusion's future. This month I'd like to continue this discussion with an overview of what Java is, what some of those acronyms mean and what all this has to do with ColdFusion. Understanding Java Java started life as yet another programming language, but has quickly evolved to become a complete platform for next-generation computing. Created by Sun, and now supported by many leading software vendors, Java includes component architectures, messaging components, transaction services, security and even APIs for things like wireless communication, telephony integration, smart cards and more. The Java Language The original promise of Java was portability the ability to write code once and have it execute on any platform. Portability is nothing new: C (and C++) promised it originally, and for the most part failed to deliver on that promise. But there's a significant difference between how C and Java facilitate portability. C code is source code-portable; as long as standard libraries are used, the same source code can (at least in theory) be compiled for multiple platforms. C code can't be executed as is. It needs to be compiled (turned into binary code with instructions the computer can understand). The compiled code is specific to the platform for which it was compiled and thus is not portable. Only the source code is portable. Java takes a different approach to portability. Instead of requiring that the source be compiled for each platform, Java code is compiled once into bytecode, and that bytecode is portable.3 The Java Virtual Machine So how can Java be portable when compiled while C cannot? The answer is that Java isn't actually run by your operating system. Instead, it runs within a special environment that must be installed on your computer, the Java Virtual Machine. As its name suggests, the JVM is a virtual computer that runs on your computer. It supports a special instruction set, and features all the basic functionality that an operating system requires (like file I/O). Java applications run inside that virtual machine. The JVM is very machine and operating system specific, and the internal workings differ greatly from one JVM to another. But those differences are hidden inside the JVM itself. The Java bytecode that runs within the JVM needn't be aware of them at all. Virtual machines can be thought of as interpreters. They create a consistent environment within which applications can run, and they interpret instructions to operating system-specific calls as needed. To run Java applications, you must have a JVM installed. The JVM is part of the Java Runtime Environment (JRE), which also includes core Java classes and other supporting files. Beans Like any good programming language, Java supports reusable components. These are called beans, and there is an entire specification that dictates how they are to be used and developed. Put in different terms (and at the risk of offending Java diehards), beans do for Java what custom tags do for ColdFusion developers. Enterprise JavaBeans are beans that are part of a scalable, transactional, multiuser-safe, server-side application. EJB run in an EJB server (like JRun 3.0) and are accessed via containers.
Servlets
To execute servlets, you need an application server that supports them. One of the leading servlet application servers is Allaire's JRun. JavaServer Pages
Java 2 Platform, Enterprise Edition
Java and ColdFusion ColdFusion and JRun have their respective strengths. The former dominates rapid development there's no faster way to develop Web-based applications. ColdFusion also features a rich set of core services (including security, scalability and all sorts of extensions). JRun's big advantage is that it is Java, and thus offers all the robustness, scalability, APIs, components, third-party technologies, developer resources and mass acceptance that Java can lay claim to. And Allaire has now publicly announced that ColdFusion and JRun are going to be merged into a new killer application server one single product that offers the best of both worlds. For ColdFusion developers this means improved performance, greater extensibility, a massive array of usable services and technologies, and far more respect from the outside world. For Java developers this means faster development (they'll be able to use CFML) and simpler access to core services that CFers have taken for granted for so long. It's a win-win situation. Developers who want to write in CFML and not think about Java will be able to write just as they do now in ColdFusion. Similarly, developers who want to write servlets can continue to do what they do now in JRun. But for developers wanting to take their applications to the next level, this new application server (code-named Pharaoh) will open doors to a whole new world of opportunities. Summary
Reader Feedback: Page 1 of 1
Your Feedback
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||