Section 13.2. Compare ColdFusion and Java Web Technologies

   

13.2 Compare ColdFusion and Java Web Technologies

There are many advantages to using ColdFusion over Java Web technologies. Increasingly, however, the current trend in Web development is toward Web services; that is, the ability to interact with data objects on remote hosts . (This is now very easy to do in CFMX and is getting to be easier to do with Java.) It is useful, therefore, to compare ColdFusion and JSP and servlets to determine when and how to use them.

Note

We will not cover specific details of writing servlets here. You can do everything on the server with a JSP that you would want to do in a servlet, and since the introduction of the JSP Standard Tag Library and the proliferation of other tag libraries, it is much faster to work with JSPs.


First, let's recall the advantages to using ColdFusion for dynamic Web development.

  1. Because ColdFusion is tag-based , it is easy to learn. It is instantly familiar to developers who know only HTML. The tags hide much of the complexity of sophisticated Web transactions, such as querying a database. Setting up the environment consists largely of clicking Next.

  2. ColdFusion is fast to develop. Because ColdFusion is easy to use, you can create rather sophisticated Web applications quickly. Fast turnaround times are often crucial for Web projects, and this makes ColdFusion attractive. ColdFusion was intended from the beginning to be used exclusively for Web applications. Java is a full-blown programming language like C++; it consequently inherits all of that time-consuming , error-prone baggage, and it frankly can take a good deal of labor to produce a very modest result with Java Web technologies until you get the hang of it.

  3. ColdFusion has many built-in features. What you pay for when you buy ColdFusion is largely the prefabricated tag libraries, the extended technologies such as Crystal Reports and Verity interaction, and the Web-based ColdFusion Administrator. Features such as query-of-queries and probes can make our work in ColdFusion a simple matter of assembly. This allows you to focus on the client or the problem space, instead of putting together the pieces. As clients repeatedly tend to ask for very similiar kinds of functionality, this is a real benefit.

  4. ColdFusion has a high level of abstraction. JSP has a high level of abstraction too, but only for a very small subset of functionality. JSPs are intended in many cases to call JavaBeans or custom actions to handle the low-level functionality. The Beans have to be written, and that requires knowing everything that we have discussed throughout this book.

  5. ColdFusion is more mature. It has been revised multiple times in the seven years since it was introduced and is in many ways a refined product. Of course, the total re-architecting of CFMX must modify that statement somewhat. JSP, on the other hand, is very young, which makes its place in the market uncertain .

The above advantages to using ColdFusion are significant. However, there are many reasons to choose JSP or servlets over ColdFusion.

  1. JSP and servlets are powerful. Because the complete Java language is available to you as you write JSP and servlets, there is a thinner line between applications and Web applications. This tendency in JSP and servlets will allow developers to extend the functionality of their applications as far as they need to, without having to call on another language to perform the difficult work. While one can write extensions to ColdFusion using Java, JSPs have all of that functionality natively and don't require the developer to move into potentially uncharted waters and incorporate another technology.

  2. Java offers greater performance under certain conditions. This was first demonstrated publicly at the 2000 Dev Con when a JRun engineer called a framed HTML page that showed a Java-based page and a ColdFusion page in a race to calculate prime numbers. Here an interesting distinction must be made. The ColdFusion 5 page performed faster initially in that comparison, but as the calculation wore on, the Java page sped ahead. Calculating thousands of prime numbers is a fairly resource- intensive task, and Java was better able to handle the complexity. However, certain tests since the release of CFMX show that pages with many complex ColdFusion operations may have performed faster under ColdFusion 5.

  3. Java is open . ColdFusion is controlled entirely by Macromedia, while many companies and individuals contribute directly to Java. For instance, IBM developed the entire Calendar class added to the language in version 1.1. Numerous companies and organizations from IBM to Apache create drivers, packages, tag libraries, even their Java parsers. That means that the language progresses in a very different manner than does ColdFusion. In 1998, Sun established the Java Community Process, an open forum consisting of more than 300 organizations and developers from across the world. Its sole purpose is to evolve the Java platform. This ensures that Java is driven by those in the computer industry and not a corporation with a strong profit motive. Unlike ColdFusion, all of Java source code is freely available under the Sun Community Source License. You can read about this process at http://jcp.org/.

  4. Java is platform independent. When you purchase a ColdFusion license, you do not have easy portability between platforms; your license is platform specific. You may have to rewrite some code. As platform independence is one of the key missions of Java, this is less of a concern. That means more freedom for the developer.

  5. Java is popular. Even people who are not in the IT industry (who may be many of your clients) have heard of Java. This can make your clients feel comfortable; it builds confidence in their investment. This is perhaps even more important with respect to the development community. With nearly 60% of developers using Java in some way, there is a good deal of support, code, tutorials, lists, and Web sites to help encourage Java development. Java has a very good name in the developer community and has been integrated into some of the most robust systems in the IT industry.

  6. Java is scalable. The same program runs on a Solaris 64-bit processor or an Intel x86 machine. Your applications can improve to handle more complex data for greater performance among even the fastest systems.

  7. Java supports a tremendous range of devices. With ColdFusion, you are generally either writing Web sites to be viewed on a Web browser or using the < cfcontent > tag to display dynamic cards on Web-enabled cellphones. Java comes in three editions (J2EE, J2SE, and J2ME) that allow your work to communicate across an unprecedented number of devices. Java applications are available to not only Web browsers, but watches , toasters, the Sony PlayStation, ATMs, Smart Cards, car consoles, and more. As the Internet reaches into these areas, and it quickly is, gaining a firm foundation in the Java platform now will put your work at the forefront.

13.2.1 The End of the Web Site

This last point above may seem somewhat trivial ”that Java supports a number of different devices. After all, if we're ColdFusion developers, we're necessarily making Web sites. Now, we might extend our site to be viewable on a wireless device such as a mobile phone, but even after the years this technology has been available, it is still somewhat slow to catch on among Web clients. We are seeing some corporations spending money to make wireless-capable sites, but few garden-variety Web clients have shown interest in this technology. The market isn't quite there yet.

That hides a more interesting point, however. This market may never quite surface. That may be because the Web site is coming to an end, after only 11 years. In its place will be a more complete automation of tasks and information flow between devices of all types ”phones, cars , home security systems, cash registers, appliances, gasoline pumps, watches, video games , lawn maintenance devices, and so forth. Connecting the information made available from these sources will demand a somewhat changed model. The Java programming language is currently in use to provide functionality for all of these systems. Sun's assertion that "the network is the computer" is quickly finding new meaning. Java is a language that can natively harvest, route, process, and display information from all of these devices. Java brings us closer to this kind of ability to mine data for rich views and create truly complete experiences for users. This kind of experience will, in my view, begin replacing the traditional Web site. Of course, I could be wrong.

My aim here is not to convince you of server-side Java's merits and charms. My aim is to provide a high-level overview of comparing these rather different technologies. This is useful so that we can look in some detail at how to get started using JSP.


   
Top


Java for ColdFusion Developers
Java for ColdFusion Developers
ISBN: 0130461806
EAN: 2147483647
Year: 2005
Pages: 206
Authors: Eben Hewitt

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