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

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.
主站蜘蛛池模板: 黄陵县| 惠水县| 台中县| 白水县| 岐山县| 马公市| 贡觉县| 资阳市| 大安市| 唐山市| 南投市| 浦北县| 盘山县| 福贡县| 邵武市| 阿克苏市| 天镇县| 南乐县| 沙湾县| 阿拉善左旗| 泸水县| 太白县| 滨海县| 嘉禾县| 凤城市| 仪征市| 宾阳县| 凌源市| 淳安县| 德庆县| 九龙坡区| 天柱县| 柏乡县| 天台县| 都匀市| 西城区| 赣州市| 罗甸县| 永修县| 额尔古纳市| 岑溪市|