Cold Fusion Components

I took tonight to experiment with CFCs before I dove into the Flex. I hadn’t used the “this” scope in a CFC before, so I tried it out and found it helpful. Now instead of invoking the CFC multiple times for every method I want to use, I have a public “Init” method that calls a bunch of private methods within the CFC. Those private methods then perform all of the business logic for the application.

This has two benefits (I think). One is that everything is encapsulated so that the data passing between the CFC and the CFM file is minimal. The second, and coolest, is that by having private methods in the CFC do all the work, the application becomes much more ?portable?. For me, this means I can very easily write two user interfaces – one, a regular CFML interface and another Flex-based interface.

In our production environment at work, we have both a ColdFusion server and a Flex server. In thinking about it, I wondered about creating an application that would work on both and still do essentially the exact same thing. I’m pretty sure that any application using mostly CFCs would fit.

I’m planning to test it out this week after I get the CFC backend written.

Related posts:

  1. Cold Fusion App In The House
  2. Cold Fusion at Home
  3. Adobe Cold Fusion 8
  4. ColdFusion Components
  • http://www.ideataxi.com Sam Tilston

    Cold fusion is a dead technology compared to ASP.NET is like comparing analog TV to Internet TV.

  • http://www.reviewbooth.com Wesley Atkins

    I agree with Sam. We use ASP.net across the board on our sites and it rocks.