In this hands on example, you are going to add email functionality to the contact form.
Tags Used: <cfmail>
In this hands on example, you are going to add email functionality to the contact form.
Tags Used: <cfmail>
Before you can send emails with ColdFusion, a mail server you want to use needs to be set. Configuring the mail server can be done in the ColdFusion Administrator.
If you do not have a mail server of your own, your localhost can act as a mail server. ColdFusion will act normally, but since there is no mail server set up on your localhost, emails will not arrive at their destination. Another option is to use the mail server of Gmail (a Gmail account is required for this). The settings for this mail server can be found at the end of this section.
In this hands on, we are going to add categories to blog posts. The logic for this involves creating a linking entity to which both the blog post and category will be associated. This is an alternative method to using a many-to-many relationship.
Functions Used: EntitySave, for,
In this hands on example, you are going to update the front end of the web site to pull in the blog information you have entered through the admin.
Tags Used: <cfloop>, <cfoutput>, <cfparam>, <cfset>, <cfif>
Functions Used:
In this hands on example, you are going to add the list and create functionality in the Admin for the blog posts and categories.
Tags Used: <cfset>
Functions Used: EntityLoad, EntityNew, now
In this hands on example, you are going to create the ORM entities for the Blog Section.
Functions Used: ormReload
Object-Relational Mapping (ORM) allows you to work with objects and have them saved to the database automatically. It can greatly simplify create-read-update-delete (CRUD) operations and make your code more object-oriented. Under the hood, ColdFusion uses the industry leading ORM framework called Hibernate.
In this Hands On we are going to create an encapsulated cfc that holds error data.
Functions Used: ArrayAppend, ArrayLen
One could write a book specifically about Object Oriented Programming (OOP). This chapter is an OOP primer to get you started, but for a more in-depth explanation, check out Matt Gifford's Object Oriented Programming in ColdFusion.
Object Oriented Programming is a set of concepts and techniques that make use of the "object" language construct, to write more reusable, maintainable, and organized code. Objects are implemented differently in every language; in ColdFusion, we have ColdFusion Components (CFCs). Using objects doesn't require OOP, and not every use of objects is OOP. They are simply the building blocks for writing OOP code.
When you write a lot of OOP code, you'll quickly find yourself writing repetitive code to wire together everything necessary to respond to a given request; if you take some time to write a single path through the code that analyzes the request and autom
In this hands on we will create an Application.cfc file, create some application wide variables, and implement some of the Application.cfc event handlers.
Functions Used: createTimeSpan, structKeyExists, createObject