ColdFusion Subroutine question

Posted on 2007-08-06
Last Modified: 2008-01-09
I am trying to get some information in regards to CFML and subroutines.  Does ColdFusion have anything equivalent to a subroutine in VB?  Would that be the CFC?

Thank you!
Question by:Albee_J
    LVL 39

    Expert Comment

    codlfusion has functions, you can place them at the top of the page or you can enclose them in a CFC.

    Here's quick useless little one as an example...

      <cffunction name="contatinate" access="public" output="false" returnType="string" displayname="">
           <cfargument name="firstName"    required="true"/>
           <cfargument name="lastname"     required="false"/>

           <cfreturn arguments.firstName & " " & arguments.lastName>

    what do you want yours to do?


    Author Comment

    Essentially we are comparing CFML to the .net platform to decide whether or not ColdFusion will the best programming language to support us. We are using CF for our websites.  More and More complicated forms are being asked of us to create, and a lot of the requests we are getting is now pointing us towards web based applications. We are just trying to determine if our current language will support us, or if we need to change to the .Net platform.
    LVL 39

    Accepted Solution

    ah, I see.

    When coldfusion can do any of the usually stuff as far as delivering web content and forms to your page.   The advantage of coldfusion is that it can do it with fewer lines of code and in a much shorter development time.   Its much easier to learn than .Net as well, if your staff is green on either language.

    Another advantage of coldfusion are the add-ins such as built-in PDF creation, the new "presentation" module which converts pages to flash,  easy creation and parsing of XML files, etc.

    Good luck with your decision.
    LVL 14

    Expert Comment

    I would suggest coldfusion as it will be much easier for your developers to learn, and your development times will be shorter. There is nothing you can do with .Net that you can't do with coldfusion. in fact the new version of coldfusion (8) includes .NET support.

    Author Comment

    Thank you gdemaria and SBennett for your information!


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
    Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them ( . I did keep the main js functions but made sever…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now