Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Adobe ColdFusion
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== ColdFusion Components (Objects) === ColdFusion was originally not an [[object-oriented programming language]] like [[PHP]] versions 3 and below. ColdFusion falls into the category of OO languages that do not support [[multiple inheritance]] (along with Java, Smalltalk, etc.).<ref>{{cite web|url=http://www.nictunney.com/index.cfm?mode=entry&entry=AE4A4A21-65B8-F252-775A757FC01D0C30|title=Ramblings of an Internet MoFo|access-date=2008-04-16|archive-date=2008-12-20|archive-url=https://web.archive.org/web/20081220071809/http://www.nictunney.com/index.cfm?mode=entry&entry=AE4A4A21-65B8-F252-775A757FC01D0C30|url-status=live}}</ref> With the MX release (6+), ColdFusion introduced basic OO functionality with the ''component'' language construct which resembles classes in OO languages. Each ''component'' may contain any number of properties and methods. One component may also extend another ([[Inheritance (object-oriented programming)|Inheritance]]). Components only support single inheritance. Object handling feature set and performance enhancing has occurred with subsequent releases. With the release of ColdFusion 8, Java-style [[interface (programming)|interfaces]] are supported. ColdFusion components use the file extension ''cfc'' to differentiate them from ColdFusion templates (.cfm). ==== Remoting ==== Component methods may be made available as web services with no additional coding and configuration. All that is required is for a method's access to be declared 'remote'. ColdFusion automatically generates a [[Web Services Description Language|WSDL]] at the URL for the component in this manner: <nowiki>http://path/to/components/Component.cfc?wsdl</nowiki>. Aside from SOAP, the services are offered in Flash Remoting binary format. Methods which are declared remote may also be invoked via an HTTP GET or POST request. Consider the GET request as shown. <br /> <nowiki>http://path/to/components/Component.cfc?method=search&query=your+query&mode=strict</nowiki> This will invoke the component's search function, passing "your query" and "strict" as arguments. This type of invocation is well-suited for [[Ajax (programming)|Ajax]]-enabled applications. ColdFusion 8 introduced the ability to serialize ColdFusion data structures to [[JSON]] for consumption on the client. The ColdFusion server will automatically generate documentation for a component if you navigate to its URL and insert the appropriate code within the component's declarations. This is an application of component introspection, available to developers of ColdFusion components. Access to a component's documentation requires a password. A developer can view the documentation for all components known to the ColdFusion server by navigating to the ColdFusion URL. This interface resembles the [[Javadoc]] HTML documentation for Java classes.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)