万本电子书0元读

万本电子书0元读

顶部广告

Object-Oriented Programming in ColdFusion电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Matt Gifford

出  版  社:Packt Publishing

出版时间:2010-10-13

字       数:137.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
This book is a fast-paced tutorial to developing ColdFusion applications using an object-oriented programming approach. Complete with code examples that can be altered and applied to your application and careful explanations, this book will guide you through your first interaction with object-oriented programming within your ColdFusion applications. If you are a web developer wanting to implement object-oriented programming with ColdFusion, then this book is for you. If your goal is to get a good grounding in the basics of object-oriented programming concepts, this book is perfect for you. No prior knowledge of object-oriented programming is expected, but basic knowledge of ColdFusion development skills is assumed.
目录展开

Object-Oriented Programming in ColdFusion

Table of Contents

Object-Oriented Programming in ColdFusion

Credits

Foreword

About the Author

Acknowledgement

About the Reviewer

Preface

Who this book is for

What this book covers

What you need for this book

Conventions

Reader feedback

Customer support

Errata

Piracy

Questions

1. Introducing ColdFusion Components

Why use CFCs?

Grouping your functions

Organizing your components

The ColdFusion component tags

Our first component

Defining a method

Returning the data

ColdFusion 9 scripted components

Creating your object

Restricting your functions to scopes

Using arguments within your methods

The Arguments scope

Redefine the function parameters

Combining your methods

Protecting your local variables

Using the Var scope

Placing your Var scoped variables

Naming your Var scoped variables

Accessing your CFC

Instantiating the object

Using the createObject function

Using the cfobject tag

Using the NEW operator

Using cfinvoke

The cfinvoke tag

Using cfinvokeargument

Using attributes as arguments

Using an argument collection

Passing arguments into an instance method call

As a list

As named values

As an argumentCollection

Arguments in action

Merging your functions into one

Using cfargument to combine your methods

Creating an object constructor

Creating an init() function

The Variables scope

Calling your init() function

The This scope

Summary

2. Effective Component Development

Pseudo-constructors

Using the pseudo method

Suppressing whitespace

Output attribute

Pseudo-constructor or init() method

Returning values and variables

returnType

Access properties

Private

Package

Public

Remote

Getting information about your CFC

Introspection

CFC Explorer

Component Doc

Document your code

Benefits of documentation

Displayname attribute

Hint attribute

Description attribute

User-defined metadata

Obtaining CFC metadata

getMetaData

getComponentMetaData

Returning metadata

Detailed introspection

Summary

3. Building Your First Bean

What is a Bean?

But what is it really?

The benefit of using beans

Creating our first Bean

An introduction to UML

Person object in UML

What makes a Bean a Bean

A default/no-argument constructor

Easily accessible for introspection

Setters/Mutators

Getters/Accessors

Completing our Projects Bean

Calling our project Bean

Populating the Bean

Read/Write Bean

Read-only Bean

Helpful objects

Implicit accessors

Summary

4. Inheritance and Object-Oriented Concepts

What is Inheritance?

Avoiding code duplication

Inheriting our products

The Super keyword

Overriding methods

Instantiating our products

The inheritance hierarchy

Specialization

The "IS A" relationship

Polymorphism

Composition

The "HAS A" Relationship

Implied ownership

Aggregation

Summary

5. Data Access Objects

What is a Data Access Object?

Creating a Data Access Object

The create method

Storing a new user

The read method

Handling select results

The update method

The delete method

An alternative save method

The save method

The exists method

Caching the Data Access Objects

Dependency Injection

Summary

6. Gateways

What is a Gateway?

A typical ColdFusion Gateway

Creating a Gateway object

Naming conventions

Adding gateway methods

Minimising code duplication

Revising the gateway object

Caching the Gateway object

The Gateway discussion

No hard and fast rules

Table Data Gateway

Similarities to Data Access Objects

Combining the two patterns

Which option is best?

Summary

7. Creating a Service Layer

What is a Service Layer?

Facade patterns in a nutshell

Creating a service

Defining the User Service

Adding the CRUD methods

Adding the Gateway methods

Adding an abstract class

Defining the address service

onApplicationStart (revisited)

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部