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

Summary

One of the biggest advantages of CFCs is the ability to encapsulate logic. This means that we can use the same code over and over without writing it over and over. This makes initial development better. It also makes debugging and updates much more manageable. In this chapter you have just started to get a taste of the power of objects. We will be using them often throughout the rest of this book. This chapter was meant to give you a foundation to understand what follows in the remaining chapters.

Lessons learned in Chapter 2 are:

  • We learned how to create object classes and instantiate object instances.
  • We learned how to create methods, and use the methods and method arguments to interact with objects.
  • We learned how to use object constructors for setting object information at the time of creation.
  • We learned how to use getters/setters to securely control the information inside an object. We also learned that with these methods, you can do more than just setting and getting the values at the same time along with validation logic or other processing.
  • We learned how to connect to a database in order to pull information back through an object.
  • We learned about a new variable structure called a query to hold data recordsets.
  • We learned how to return multiple types of variables back from object methods.
  • We learned to declare all internal method variables that are specific to a method with a leading var. This is the key to making sure that our processing remains thread-safe.
主站蜘蛛池模板: 黔南| 邯郸县| 乌兰浩特市| 泾川县| 甘德县| 高陵县| 拜泉县| 织金县| 昌图县| 隆安县| 岚皋县| 葫芦岛市| 宜良县| 仙桃市| 武鸣县| 邵东县| 靖边县| 炎陵县| 连城县| 西昌市| 禄丰县| 白水县| 特克斯县| 蒲城县| 白银市| 大渡口区| 江川县| 茌平县| 秦安县| 巴东县| 三穗县| 沂南县| 三亚市| 大安市| 石林| 开远市| 镇宁| 石景山区| 五莲县| 漠河县| 甘谷县|