Development Values of ColdFusion MX on J2EE


We have already discussed some of the benefits of deploying ColdFusion MX 7 on J2EE. Developers also gain from using ColdFusion when deployed on top J2EE. ColdFusion MX7 gives developers new tools to rapidly develop Java-based applications and to extend enterprise systems with new functionality at a fraction of the cost in time and resources when compared to straight Java development.

Deploying Rich Internet Applications in Java

ColdFusion MX 7 comes with many beneficial application services, including Flash Remoting, charting and graphing, and full-text searching. These services are integrated into the ColdFusion MX scripting environment and can offer feature-rich interfaces with little effort for the developer. For example, you can leverage e-commerce applications by using Flash animation to display highly visual productssomething that is difficult to do with Java alone. Or provide graphical components to portal interfaces for displaying analytical data in charts and graphs. Content-management systems can be extended with full-text searching capabilities, and management of these systems can be done with ColdFusion's advanced file-scripting techniques. With ColdFusion MX 7, rich user interfaces can be built that integrate with back-end components, thereby extending and enhancing the Java application layer.

Extending the Platform

Today's businesses need to interact with their partners both internally and externally at "Internet speed." These demands cannot always be accomplished using existing tools in the allotted time. Many Java application servers come with prebuilt components for implementing the following:

  • E-commerce

  • User profiling and user experience management

  • Business and application integration

  • Strong cryptography and public-key integration and security

  • Web Services

  • Portals

  • Content management

  • Business process management

  • Customer relationship management

  • Order processing and billing

  • Legacy system integration

ColdFusion MX 7 inherits these components when it is deployed in the same tiered environment as the Java application server. Indeed, ColdFusion MX 7 can extend these components and add new features or enhancements. Deploying ColdFusion MX 7 on J2EE also allows applications to be built with more user-interface features, such as charting and full-text searching. ColdFusion can leverage existing Web services, components, JSP pages, Java servlets, and EJBs. New features and functionality can be added while maintaining data integrity and system security using existing business logic housed in the middle tier in EJBs, ColdFusion MX 7 components, or Java components.

ColdFusion MX 7 can add new services by building ColdFusion components. For example, let's say an e-commerce Web site allows users to create new orders, but no functionality exists for processing these orders through the supply chain. Using ColdFusion MX 7, build a component that is called when an order is placed and confirmed. The component will grab the order and move it to your order processing system. This component could also use ColdFusion gateway technology, discussed in Chapter 31, "Working with Gateways," to pass this information to the order processing system via the Java Messaging Service (JMS). The message could kick off a request to your order-processing system to complete order processing in the supply chain. JMS can implement a publish/subscribe architecture where orders are published. Message subscribers pick up the orders for further processing.

A BPM layer could be implemented to provide management for processing orders through the enterprise. The BPM layer could offer visibility of these orders to administrators and management, to ensure that the orders are processed correctly and efficiently. BPM enforces business rules and helps to make certain that data in the enterprise retains its integrity.

Business portals provide users with a one-stop shop for managing information in the enterprise. ColdFusion, with its many GUI features and services, can play a major role in portal application development. Use ColdFusion to build new Web services to expose business processes to a corporate portal, and to help monitor business health. These portal elements can be very dynamic using ColdFusion capabilities such as charts and graphs. ColdFusion can also call existing application components, pulling and displaying important business information into intuitive user interfaces.

Ease of Development

Developing applications for J2EE with ColdFusion gives you the power, scalability, and reliability of J2EE, without the complexity. ColdFusion can reuse Java application components, and it simplifies integration through ColdFusion's scripting language. Why reinvent the wheel when you can extend it instead?

The interoperability of ColdFusion, along with its powerful features, helps developers to build ColdFusion applications using prebuilt components. Also, Macromedia has added capabilities for ColdFusion developers to build their own Java components. Other Java application servers can use ColdFusion MX 7's enhanced and much more interoperable Web services. ColdFusion pages can be called by JSP pages, and vice versa. This eases development of J2EE-based applications with ColdFusion MX's available services.

Leveraging Diverse Developer Skill Sets

Developers are like economists. Place 50 developers in a room and ask them to provide a solution for a relatively simple business problem, and you will more than likely receive 50 different responses. The good news is that having 50 options to choose from allows you to choose the best, most long-term solution for solving the problem.

This is true of ColdFusion as well. Over time, every developer will migrate to using a tool set that makes him or her more efficient and more flexible in developing solutions. This increases morale and employee longevity and, ultimately, productivity. If your business has decided to support J2EE technology, many of your developersespecially HTML and user interface designersmay feel slighted and will become less productive due to the huge learning curve with Java. Placing ColdFusion in their hands will help to eliminate this anxiety and allow for flexible, powerful development. Using ColdFusion in your J2EE architecture creates a larger tool set for your enterprise, increasing the potential for more viable solutions, both economically and timewise.

Using J2EE Built-In Security Features

J2EE application servers offer security features that are not inherently available in ColdFusion. These features provide enhanced capabilities to secure the entire Web architecture in a clustered environment. J2EE application servers can maintain security on many layers in the architecture.

IBM's WebSphere Application Server, for example, implements security at very granular levels utilizing existing LDAP-enabled directories, third-party authentication methods, and other services across the cluster. Security can be invoked for specific EJB methods or for specific Web site applications. This architecture allows centralized management and is efficient. All applications on the server can have security attached and deployed, thus providing a tighter, more closely controlled environment. This architecture helps strengthen security across the enterprise by enforcing controls at virtually every layer within the application.

Improving Web Site Scalability

Many methods are available for improving Web site scalability. Some of these methods, such as tiered infrastructure, may not necessarily involve deploying on J2EE, but can be implemented through careful planning with any Web site. This section concentrates on improving Web site scalability when deploying on J2EE.

Tiered Infrastructure

Traditional ColdFusion applications consisted of many pages of HTML and code that performed many functions, including user interface, application logic, and database queries. The ColdFusion Web pages would typically perform two of these functionsuser interface and application logic. All HTML and ColdFusion Markup Language (CFML) code was placed into ColdFusion Web pages and displayed to the user. Application logic was also handled by CFML code, and all calls to the database server were initiated using the <CFQUERY> tag. ColdFusion Web pages would essentially handle all interaction between the user and the database. Figure 4.2 illustrates traditional two-tiered, page-based Web architecture.

Figure 4.2. Traditional two-tiered page-based Web architecture.


ColdFusion MX 7 developers should be aware of the much greater flexibility that J2EE offers in separating the tiers of their application. Developers are not tied to a traditional two-tiered model but can slice their application to a very high level of granularity, allowing the use of hardware to isolate and scale the parts of the application that most need it. Splitting all functions of an application into its various components creates a more flexible, robust, scalable system that is easier to monitor and manage.

Figure 4.3 shows how a tiered architecture could be created for a highly scalable J2EE deployment involving ColdFusion. This example is meant to show one method and is not the only method that can be used for creating a scalable, tiered architecture. The edge server tier manages security, and monitors and distributes content for the Web site. The edge server can also be just a firewall providing security. Some J2EE vendors, like IBM, offer dedicated edge servers that live in front of the Web server and create another layer of Web site management services. Web servers provide HTTP connectivity and content. In the third tier, application servers provide dynamic content using CFML pages, Flash remoting, JSP pages and servlets, and so forth. In the fourth tier, EJBs or ColdFusion components perform business logic functions, and access database servers and legacy information systems. All tiers can be load balanced and clustered for performance and stability. This creates a highly scalable Web infrastructure and increases the fault tolerance and reliability of enterprise applications.

Figure 4.3. Multi-tiered J2EE Architecture with ColdFusion.


Native Load Balancing and Failover

Macromedia JRun, Sun ONE Application Server (formally iPlanet), BEA WebLogic, and IBM WebSphere Application Server all offer native load-balancing support with their products. Load balancing can be performed at the Web server tier, the application server tier, or a combination of these tiers. Web server plug-ins and application server services control load balancing and failover. Choosing between load-balancing methods provides greater flexibility when designing for scalability. These J2EE application servers all have functions for creating redundancy on many levels within the Web site architecture, including components, systems, and for external network connectivity.

Macromedia JRun offers native loading balancing and failover capabilities through the Jini service. Jini is a J2EE networking service that lets Java applications communicate easily with disparate distributed devices and objects. JRun clusters can be created and managed through the JRun Management Console (JMC). J2EE Connectors are installed on the Web server to connect natively to the application server. These connectors can help maintain session state.

A combination of Web-server and application load balancing can be utilized to provide further application partitioning and stability. Application servers provide services for connection pooling, Java Virtual Machine (JVM) pooling, object-level load balancing, and automated deployment.

JVM pooling is the process of creating multiple copies of an application server, components, JSPs, or servlets (sometimes called cloning). These clones can be run on the same physical machine or on several machines. JRun offers this option through the JMC to create any number of JRun instances. Using Jini, JRun services are clusterable; therefore, ColdFusion running on JRun is clusterable as well. Connection pooling is the process of maintaining relational database connections. Maintaining these connections increases the availability of database services.

Web server plug-ins or server applications can provide load balancing by monitoring workloads sending traffic to least-worked servers. This can be implemented by component, server, or a round robin configuration. EJB components can be clustered across nodes within a single server or across several servers. User sessions can be maintained using sticky load balancing (session-aware) or through session clustering (session identifiers are stored centrally and available to all servers in the cluster).

Deployment and synchronization services make it easier than ever to deploy new Web site components automatically or manually using intuitive interfaces. Through techniques called "hot deploy," content and objects can be deployed while the service is live. JRun performs this deployment using built-in features in the JCM. New Web applications can be deployed onto clustered servers while maintaining client connectivity to the applications. This eliminates the need to take the entire Web site down during deployment.

Evaluating load-balancing and failover methods should be based on the needs of your Web site for performance, and on the experience and skills level of the developers and engineers involved in the process.



Advanced Macromedia ColdFusion MX 7 Application Development
Advanced Macromedia ColdFusion MX 7 Application Development
ISBN: 0321292693
EAN: 2147483647
Year: 2006
Pages: 240
Authors: Ben Forta, et al

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