2 Replies Latest reply: Feb 20, 2011 5:13 AM by BKBK RSS

    Packaging a CF app to be installed on web page with javascript

    lovewebdev Community Member

      Hey guys, I'm not sure how to word it, but I was wondering if it was possible to make a coldfusion application installable on a webpage for say one of my clients using javascript?

       

      I.e. I don't want to place the cf pages on their server or use iframes

       

      I'm guessing I'd have to pass parameters back and forth between cfm and javascript, etc..

       

      What should I be looking into?

        • 1. Re: Packaging a CF app to be installed on web page with javascript
          Dan Bracuk Community Member

          I didn't think it was possible but, before saying it wasn't, I googled "javascript call coldfusion".  The first offering had a working example.

          • 2. Re: Packaging a CF app to be installed on web page with javascript
            BKBK MVP

            We've just finished building an enterprise-scale application, based on your concept. We subdivided the application into client and server code.

             

            We developed the client code(what the browser interacts with) entirely in Ext JS. This makes business calls to the server layer, which we developed in ColdFusion 8.0.1. (We had considered using JQuery as an alternative to Ext JS. The colleague responsible for the client code opted for Ext JS).

             

            There is no direct interaction whatsoever between the browser and ColdFusion. When one clicks on a button in a page in the browser, for example, Ext JS code converts the event into an HTTP request to ColdFusion. ColdFusion sends the response, which usually contains data, back to the Ext JS layer. That in turn converts the response into yet another browser event, say, a display of the data.

             

            The client and server communicate by means of JSON packets. In this way, if you replaced ColdFusion at the server end with any other technology that can convert the requests into JSON responses, for example, Java, no one would notice anything at the client end.