- ColdFusion 9 Developer Tutorial
- John Farrar
- 258字
- 2021-08-05 16:16:38
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.
推薦閱讀
- Excel圖表與表格實戰技巧精粹
- IBM Cognos 8 Report Studio Cookbook
- Adobe After Effects CC 高手之路
- Cacti 0.8 Beginner's Guide
- 視覺封王:Photoshop CC 2019立體化教程(素材+視頻+教案)
- Rhino 6.0中文版入門、精通與實戰
- Maya 2019三維動畫基礎案例教程
- 影視動畫場景與特效制作:3ds Max-Vue-AfterBurn-FumeFX
- ADempiere 3.6 Cookbook
- PyTorch深度學習簡明實戰
- Photoshop圖形圖像處理實用教程
- Photoshop CC 服裝設計經典實例教程
- Photoshop CC 2017從入門到精通
- After Effects 2022從入門到精通
- PPT設計與制作實戰教程