Charlie Arehart, CTO charlienewatlanta'com - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Charlie Arehart, CTO charlienewatlanta'com

Description:

... the URL used for recorded scripts, varying either port or virtual directories ... Using extension mappings, assign .htm (.or .jsp/.php/etc.) files to be processed ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 19
Provided by: charle413
Category:

less

Transcript and Presenter's Notes

Title: Charlie Arehart, CTO charlienewatlanta'com


1
More Flexible Testing Against CF4/5 and
CFMX (And BlueDragon, as well)
  • Charlie Arehart, CTOcharlie_at_newatlanta.com

2
Goals
  • How to set up IIS to execute CFML pages against
    either CF4/5, MX, or BlueDragon
  • Normally, each takes control of all CFML page
    processing
  • Same concepts apply to Apache and other web
    servers
  • How to configure a single code directory to be
    browsable by all three at once
  • Switch among them simply by changing the URL path
  • Using virtual directories
  • Configuring each CFML server to work this way
  • In case of CF, which version you do first will
    influence some steps

3
Resources
  • Presentation based on my Sept 2003 article of
    same name in ColdFusion Developers Journal
  • Available online at http//sys-con.com/coldfusion
    /article.cfm?id647
  • Co-written with Jeffry Houser
  • Also, more information on manually configuring
    web server integration for CF 5, CFMX, and
    BlueDragon is provided in their respective
    Installation/Configuration Manuals
  • For instance, see CF5 docs for configuring on
    Windows
  • http//livedocs.macromedia.com/coldfusion/5.0/Inst
    alling_and_Configuring_ColdFusion_Server/wininstal
    l5.htm1098302

4
About Your Speaker
  • CTO of New Atlanta Communications since April 03
  • 7 yrs CF experience (21 yrs in Enterprise IT)
  • Co-author, ColdFusion MX Bible (Wiley)
  • Frequent contributor to ColdFusion Dev Journal
  • Past accomplishments of note
  • Tech Editor, CFDJ
  • Allaire/Macromedia Certified Adv CF Developer (4,
    5, MX)
  • Allaire/Macromedia Certified Instructor
  • Team Macromedia Member Customer Advisory Board
    Member
  • Contributor to Macromedia Devnet, Dev Exchange
  • Frequent speaker to user groups, conferences
    worldwide

5
Testing CF5/CFMX At Once
  • Any need to support multiple versions of
    ColdFusion?
  • Consider especially not for production, but for
    testing
  • To support multiple types of customers having
    different configurations
  • To test code against different versions of
    ColdFusion on single machine
  • And what if you wanted to try out BlueDragon?
  • Its an alternative CFML runtime engine
  • Can also install it alongside CF5 and/or CFMX
  • While it also offers its own built-in web server
    (like CFMX), it can also integrate with external
    web servers
  • What if you could run code in a single directory
    using a single web server against any or all
    three of these CFML servers?
  • You can!

6
The Challenge
  • You may know it is possible to run CF5 and CFMX
    at same time
  • But by default cant have one web server serving
    .cfms via both
  • For Windows users, heres a rather typical
    scenario for having CF5 (or earlier) and testing
    with CFMX
  • CF5 already installed using IIS
  • CF5 (and previous releases) offered no built-in
    web server
  • Code in inetpub\wwwroot (or some other dir, using
    virtual dirs)
  • CFMX installed on its own built-in web server
  • Code in cfusionmx\wwwroot
  • CFMX code requested by appending built-in web
    server port
  • Default is 8500
  • To test code against both, have to move code back
    and forth

7
Alternatives
  • Could modify CFMX built-in web server properties
    to create virtual mappings
  • Could point a new mapping there at
    inetpub\wwwroot
  • At least could run code from one place
  • using external web server (IIS) for running
    against CF5
  • built-in web server to run against CFMX
  • Could use multiple virtual hosts/sites
  • Supports in Apache, iPlanet, IIS on Server
    edition of Windows 2000, XP
  • Can define new web sites, point them at a single
    code directory
  • Then manually configure these to pass CFML
    requests to either server
  • Could use multiple virtual directories
  • For IIS users on non-Server Windows, this may be
    best
  • Need to understand master properties and
    extension mappings

8
IIS Application Mappings
  • In IIS, extension mappings tell how .cfm pages
    are processed
  • They indicate what DLL will process them
  • Can also have mappings for .dbm, .cfc, .jsp, and
    more
  • Settings for .cfm files (and some related ones)
    are implemented on installation/config of
    CF/BlueDragon
  • Set in master properties, apply to all child
    applications/virtual directories
  • Open Internet Services Manager
  • In 2000/XP Start--gtSettings--gtControl
    Panel--gtAdministrative Tools
  • Right-click web sites (or default web site)
    and choose properties
  • Choose home directory tab, then configuration
    button
  • Opens application mappings dialogue, where
    mappings are set
  • Again, customers using multi-homing/virtual
    hosts can generally figure out how all this
    relates to that configuration
  • Focus here is on simpler implementations of IIS
    for starters

9
Local IIS Application Mappings
  • Can choose to set these mappings, instead, for a
    specific virtual directory
  • Right-click it, choose properties, then
    configuration button
  • Also opens application mappings dialogue, for
    that virtual dir
  • This is where you can take control back,
  • Set up different virtual directories to run CFML
    via different CFML servers
  • Can have different Virtual Dirs point to
    different servers, such as /_CF5, /_CFMX, and
    /_BD
  • The question is simply What DLL should be mapped
    to in order to process .cfm pages?
  • Lets look at each of CF5, CFMX, and BlueDragon
  • Am assuming youve installed all 3 they can be
    installed alongside one another
  • Article offers more info on installing each of
    them

10
CF5 Integration with IIS
  • When CF5 installs and you integrate with IIS, it
    sets the .cfm mapping to (generally)
  • C\Cfusion\BIN\ISCF.DLL
  • If you install CFMX alongside CF5 and tell it to
    use IIS, this value will be replaced in master
    properties
  • Even so, could create a new virtual directory to
    process via IIS against CF5 again
  • Virtual directory is like an alias you can use on
    the URL to force alternate processing of CFM
    files
  • Can even point it at the webroot
    (inetpub\wwwroot) to cause all code there to be
    run alternatively against CF5, regardless of
    global setting
  • Lets see how

11
Adding a Virtual Directory
  • To add a virtual directory in IIS
  • Right-click on default web site or web sites
  • Choose new then virtual directory
  • Name the new directory CF5 (in this example)
  • On the directory screen, point it at the
    inetpub\wwwroot
  • Virtual directory is created
  • For now, is simply an alias for running all
    webroot code as \CF5
  • Right-click on the virtual directory, choose
    properties
  • Click on configuration button
  • Can now change .cfm mappings by highlighting,
    click edit button
  • Observe the current executable (should show
    whatever defaults that were set by last installed
    CFML server)
  • Change it to the CF5 DLL path from previous page
    C\Cfusion\BIN\ISCF.DLL
  • Now, pages requested starting with
    http//domain/_CF5/ will run against CF5

12
CFMX Integration with IIS
  • IIS Integration in CFMX is a little more
    challenging
  • Can choose to do it on installation
  • Or can do it after the fact
  • Web Server Configuration Tool (off Start menu)
  • Or wsconfig.jar file in C\CfusionMX\runtime\lib
  • See MM manuals for more details on available
    choices
  • Once done, this both creates mappings in IIS (in
    Master Properties) and also (different from CF5)
    builds the needed DLL on the fly
  • In other words, you must run this step to create
    the DLL needed to create mappings in IIS
  • Cant just install CFMX and expect it to be there
  • Can now view IIS mapping created in global
    settings
  • Likely pointing to something like
    C\CFusionMX\runtime\lib\wsconfig\1\jrun.dll
  • As in CF5, can create a /_CFMX mapping if you
    want to have a virtual dir for indicating your
    desire to run against CFMX
  • Or could just leave it to run all code with / in
    URL with CFMX
  • If you installed CFMX previously using built-in
    web server and then chose IIS integration, need
    to copy CFIDE and CFDOCS from cfusionmx/wwwroot

13
Configuring BlueDragon as Alternative
  • BlueDragon is simply an alternative runtime
    engine for CFML
  • Just another way to run CFML code
  • Can install it as standalone service (Server and
    Server JX editions) or as a standard web
    application on J2EE or (coming soon) .NET
  • Lets take just a minuteone slideto introduce it

14
What is BlueDragon?
  • Latest 6.1 edition is substantially compatible
    with CFMX 6.1
  • Supports CFCs (including super), XML, web
    services, and more
  • Benefits cost, support, bundling options,
    deployment ease, pre-compiled and encrypted
    templates, and much more
  • Hi performance, robust deployed in many large
    CFML shops
  • Editions
  • BlueDragon Server free, supports all but a few
    CFML tags
  • BlueDragon Server JX (549 intro) adds features
    held back from free version
  • BlueDragon/J2EE (2499/cpu) - deployment of CFML
    as J2EE web app/WAR/EAR (fewer steps, lower price
    than CFMX)
  • BlueDragon/.NET (2499/cpu) coming soon, will
    offer only option for deployment of CFML as
    native .NET web app
  • Info/docs/trials/support, see www.newatlanta.com/b
    luedragon/

15
BlueDragon Server Installation
  • BlueDragon Server/Server JX installation is as
    simple as CF5, but as flexible as CFMX
  • Can install it alongside CF5 and/or CFMX
  • As with CF5 or MX, if you integrate it with IIS,
    it by default takes over all .cfm processing
    (sets Master Properties)
  • We can change things as we just did with CF5 and
    CFMX
  • Just run the installer (free download trial/dev
    edition at site) to create a new service to run
    BlueDragon
  • Can choose use its own web server, or integrate
    with an external one (IIS, Apache, iPlanet, etc.)
  • Like CFMX, can integrate web server either at
    install time, or by way of option in BlueDragon
    Admin
  • Or, again, can create a virtual directory (_BD,
    for example)
  • Point at the BlueDragon DLL (\bin\isapi\BlueDragon
    _Adapter.dll)
  • Found in directory where BlueDragon is installed

16
Result
  • Now can run CFML pages against either server
  • /_CF5 run against CF5
  • /_CFMX run against CFMX
  • /_BD run against BlueDragon
  • Great for integration testing, evaluation,
    supporting multiple servers or customer
    configurations, etc.
  • Maybe you were feeling hassled testing CF5 and
    CFMX, moving code from inetpub\wwwroot to
    cfusionmx\wwwroot to test
  • No need to move them to a new directory just run
    them in one place against multiple CFML servers
    using virtual dirs and app mappings
  • Should help you feel more comfortable both about
    installing and trying out BlueDragon
  • And performing comparisons to see how your CFML
    apps run
  • Also great for doing performance testing
  • Some load testing tools let you change the URL
    used for recorded scripts, varying either port or
    virtual directories

17
Hiding CFML Implementation
  • Could also use this approach to hide underlying
    CFML implementation
  • Using extension mappings, assign .htm (.or
    .jsp/.php/etc.) files to be processed by CF or
    BlueDragon
  • Linuxworld.com does this, masking CFML pages
    (processed by BlueDragon) as .htm files
  • Visitors dont know its CFML
  • Can offer security benefits as well

18
Summary
  • Configuration of IIS for multiple CFML servers
    isnt difficult
  • But the defaults for all three is to take over
    all CFML processing
  • Now you can regain control
  • And facilitate better testing for integration and
    performance
  • And perhaps consider BlueDragon more easily
  • Also look into virtual hosts for other similar
    solutions in Apache, iPlanet, or (on Windows
    Server) IIS
  • Hope these tips save you lots of time
  • You can comment on the article at bottom of
    online sys-con article page
  • Or drop me an email charlie_at_newatlanta.com
Write a Comment
User Comments (0)
About PowerShow.com