618541
672
Zoom out
Zoom in
Previous page
1/691
Next page
665
Building applications visually
Last updated 2/19/2015
More Help topics
Enable the ColdFusion enhancements
Building a page that only authorized users can access
Securing a folder in your application (ColdFusion)
Using ColdFusion components
Note: Support for ColdFusion is removed in Dreamweaver CC and later.
About ColdFusion components
ColdFusion component (CFC) files let you encapsulate application and business logic into self-contained, reusable
units. CFCs also provide a fast, easy way to create web services.
A CFC is a reusable software unit written in ColdFusion markup language (CFML), which makes it easy to reuse and
maintain your code.
You can use Dreamweaver to work with CFCs. For information on CFC tags and syntax, see the ColdFusion
documentation from within Dreamweaver (Help > Using ColdFusion).
Note: You can use CFCs only with ColdFusion MX or later. CFCs are not supported in ColdFusion 5.
CFCs are meant to provide a simple yet powerful way for developers to encapsulate elements of their websites.
Generally, you should use components for application or business logic. Use customs tags for presentation elements
such as customized greetings, dynamic menus, and so on.
As with many other types of construction, dynamic sites can often benefit from interchangeable parts. For example, a
dynamic site may run the same query repeatedly, or calculate the total price of shopping cart pages and recalculate it
every time an item is added. These tasks can be handled by components. You can fix, improve, extend, and even replace
a component with minimal impact to the rest of your application.
Suppose an online store calculates shipping charges based on the price of orders. For orders under $20, the shipping
charge is $4; for orders between $20 and $40, the shipping charge is $6, and so on. You could insert the logic for
calculating the shipping charge in both the shopping cart page and the checkout page, but that would mix HTML
presentation code and CFML logic code and generally make the code difficult to maintain and reuse.
You decide to create a CFC called Pricing that has, among other things, a function called ShippingCharge. The function
takes a price as an argument and returns a shipping charge. For example, if the value of the argument is 32.80, the
function returns 6.
In both the shopping cart page and the checkout page, you insert a special tag to invoke the ShippingCharge function.
When the page is requested, the function is invoked and a shipping charge is returned to the page.
Later, the store announces a special promotion: free shipping for all orders above $100. You make the change to the
shipping rates in one place—the ShippingCharge function of the Pricing component—and all the pages using the
function automatically get accurate shipping charges.
Components panel overview (ColdFusion)
Use the Components panel (Window > Components) to view and edit ColdFusion components, and add code in the
page that invokes the function when the CFM page is requested.
672


Need help? Post your question in this forum.

Forumrules


Report abuse

Libble takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Product:

For example, Anti-Semitic content, racist content, or material that could result in a violent physical act.

For example, a credit card number, a personal identification number, or an unlisted home address. Note that email addresses and full names are not considered private information.

Forumrules

To achieve meaningful questions, we apply the following rules:

Register

Register getting emails for Adobe Dreamweaver CC - 2014 at:


You will receive an email to register for one or both of the options.


Get your user manual by e-mail

Enter your email address to receive the manual of Adobe Dreamweaver CC - 2014 in the language / languages: English as an attachment in your email.

The manual is 24,32 mb in size.

 

You will receive the manual in your email within minutes. If you have not received an email, then probably have entered the wrong email address or your mailbox is too full. In addition, it may be that your ISP may have a maximum size for emails to receive.

Others manual(s) of Adobe Dreamweaver CC - 2014

Adobe Dreamweaver CC - 2014 User Manual - German - 731 pages

Adobe Dreamweaver CC - 2014 User Manual - Dutch - 718 pages


The manual is sent by email. Check your email

If you have not received an email with the manual within fifteen minutes, it may be that you have a entered a wrong email address or that your ISP has set a maximum size to receive email that is smaller than the size of the manual.

The email address you have provided is not correct.

Please check the email address and correct it.

Your question is posted on this page

Would you like to receive an email when new answers and questions are posted? Please enter your email address.



Info