Object-Oriented Programming in Coldfusion(English, Undefined, Gifford Matt) | Zipri.in
Object-Oriented Programming in Coldfusion(English, Undefined, Gifford Matt)

Object-Oriented Programming in Coldfusion(English, Undefined, Gifford Matt)

Quick Overview

Rs.599 on FlipkartBuy
Product Price Comparison
Are you tired of procedural programming or is your extensive code base starting to become un-manageable? Breathe some new life into your code and improve your development skills with the basic concepts of object-oriented programming. Utilize objects, modular components, and design patterns to expand your skills and improve your ColdFusion applications. Packed with example code, and written in a friendly, easy-to-read style, this book is just what you need if you are serious about ColdFusion. This book is a fast-paced tutorial to important ColdFusion object-oriented programming topics. It will give you clear, concise, and practical guidance to take you from the basics of ColdFusion to the skills that will make you a ColdFusion developer to be reckoned with. Don't be put off by jargon or complex diagrams; read and see how you can benefit from this book and extend your development skills in the process. Using the practical examples within this guide, you will learn how to structure your applications and code, applying the fundamental basics of object-oriented programming to develop modular, reusable components that will scale easily with your application. You will learn the basic fundamental practices of object-oriented programming, from object creation and re-use, to Bean objects, service layers, Data Access objects, and sample design patterns to gain a better understanding of OOP using examples that can be altered and applied in your application. Complete with detailed code samples and snippets, and written in a friendly easy-to-follow style, you will be able to break free from writing purely procedural code and enhance your applications by building structured applications utilizing basic design patterns and object-oriented principles. An introduction to object-oriented programming in ColdFusion What you will learn from this book : Make your ColdFusion Components (CFCs) come alive with methods, using object inheritance, connecting to a database through the internal methods of our object/CFCs Create a Bean object, complete with accessors and mutators to set and retrieve properties in the object, including sample code for ColdFusion 9 script components Optimize and encapsulate your functions to improve code portability Introduce the Bean into ColdFusion object-oriented programming design patterns, discover the benefits of code inheritance and understand polymorphism Persist objects in memory throughout your applications Examples of OOP concepts and basic design patterns Create a service layer or façade to interact with your objects Approach 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. Who this book is written for 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. About the Author Matt Gifford officially began life as a developer in 2000, although he used to 'develop' simple applications using BASIC Programming on his Sinclair ZX Spectrum. After creating relational databases in VBScript and hand-coding HTML pages in text editors, the obvious route was to start developing websites using dynamic data. He is now lead developer with Fuzzy Orange Ltd, and specializes in ColdFusion, Flex, and AIR development, and is also proud to be called an Adobe Community Professional for ColdFusion. He has spoken and presented regularly at national and international conferences and online meetings, and has written tutorials and articles for online resources and UK industry magazines. Constantly striving to learn more and update any skill set he can, he loves to read development publications and community blogs, attend conferences, and discuss issues with other members of the development community. A keen proponent for community resources and sharing knowledge, Matt writes and releases open-source ColdFusion applications and code samples as often as he can, and can also be seen updating resources and writing articles on his blog, http://www.mattgifford.co.uk. Table of Contents Preface Chapter 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 create Object 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 argument Collection 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 Chapter 2: Effective Component Development Pseudo-constructors Using the pseudo method Suppressing whitespace Output attribute Pseudo-constructor or init() method Returning values and variables Return Type Access properties Private Package Public Remote Getting information about your CFC Introspection CFC Explorer Component Doc Document your code Benefits of documentation Display name attribute Hint attribute Description attribute User-defined metadata Obtaining CFC metadata Get Meta Data Get Component Meta Data Returning metadata Detailed introspection Summary Chapter 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 Completing our Projects Bean Calling our project Bean Populating the Bean Read/Write Bean Read-only Bean Helpful objects Implicit accessors Summary Chapter 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 Chapter 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 Chapter 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 Chapter 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 On Application Start (revisited) Summary Index