官术网_书友最值得收藏!

Chapter 2. Basic CFCs and Database Interaction

All of the major software platforms have different forms of objects. In ColdFusion, these are called ColdFusion Components (CFCs). CFCs let us package up and reuse code in ways that will make our development much easier. Our approach in this book will be to learn by doing. In this chapter, we will learn by building the start of a simple shopping system. We will also learn to work with databases. Let's start learning the easier way to write software with CFCs. The following is a list of the contents that will be covered in this chapter:

  • The ColdFusion object called CFC
  • Making objects/CFCs come alive with methods
  • The difference between a class and the objects created from the CFC
  • Using an object constructor
  • Protecting the inner characteristics of objects with getters and setters
  • Connecting to a database through the internal methods of our object/CFCs
  • A variable structure called a "query", which is used to hold query recordsets
  • Controlling different types of variables returned from methods
  • Keeping our CFCs thread-safe, when multiple users are running the same code segments
主站蜘蛛池模板: 景德镇市| 商水县| 唐海县| 滦南县| 巴塘县| 景德镇市| 香格里拉县| 鱼台县| 寻甸| 阳原县| 江口县| 肇源县| 比如县| 玉山县| 井陉县| 汝阳县| 旅游| 修水县| 昭平县| 平谷区| 右玉县| 海盐县| 五指山市| 绿春县| 鸡东县| 大丰市| 株洲县| 滕州市| 浦江县| 玉环县| 容城县| 塔城市| 凤城市| 霍林郭勒市| 丹阳市| 通渭县| 河池市| 绍兴县| 河北区| 南康市| 临桂县|