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

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
主站蜘蛛池模板: 三河市| 临猗县| 临海市| 桦南县| 盐津县| 平顺县| 五家渠市| 军事| 乌拉特前旗| 镶黄旗| 义马市| 明水县| 巴青县| 青阳县| 江油市| 横峰县| 高要市| 钟山县| 静宁县| 徐闻县| 乐平市| 甘洛县| 北海市| 阿坝县| 平原县| 长乐市| 同仁县| 浦城县| 河南省| 安顺市| 方正县| 白山市| 高要市| 自贡市| 清苑县| 兴业县| 章丘市| 阿克陶县| 台中市| 昌图县| 崇州市|