Book Image

Object-Oriented Programming in ColdFusion

By : Matthew Gifford
Book Image

Object-Oriented Programming in ColdFusion

By: Matthew Gifford

Overview of this book

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.
Table of Contents (14 chapters)
Object-Oriented Programming in ColdFusion
Credits
Foreword
About the Author
Acknowledgement
About the Reviewer
Preface

Foreword

ColdFusion Components (or CFCs) were introduced in ColdFusion MX back in 2002, and since then they have become one of the most important and fundamental building blocks for ColdFusion developers. In fact, recent releases of ColdFusion have made CFC use mandatory, by introducing features that are only available through ColdFusion Components.

As you'd expect from ColdFusion, CFCs are easy to learn and even easier to use. But the beautiful simplicity of ColdFusion Components hides a powerful, sophisticated, and proven Java-based framework on which developers can build highly scalable and manageable applications. Like all ColdFusion features, CFCs can be as simple or as sophisticated as your application requires, and developers can start reaping their benefits easily and painlessly, adding functionality and complexity later as needed.

But this duel personality, highly accessible simplicity on the one hand and all that power on the other, has proven to be a bit of a double-edged sword. The same ease of use that makes ColdFusion so easy to learn and so productive, also makes it too easy to never fully explore and leverage all that ColdFusion has to offer.

This is why I am so glad to see Matt Gifford's hard work take the form of this book. Matt starts with the basics of ColdFusion Components, but then quickly delves into the subtleties and complexities of using them for object-oriented development, demonstrating both the how's and why's, as well as the tips and tricks needed to truly appreciate how ColdFusion Components can (and should) change the way you build your next ColdFusion application.

Matt, this book is long overdue, and your contribution to the ColdFusion community is greatly appreciated. Thanks!

Ben Forta

Director of Platform Evangelism

Adobe Systems

When you start using ColdFusion components, you know that you're on the right track; you can feel this change at some core, instinctual level as if you're about to embrace something that holds tremendous, yet untapped potential. Unfortunately, your instincts won't take you much further beyond this point. The cold reality is, Object-Oriented Programming (OOP), when used incorrectly, is a destructive force that can leave your code tightly coupled, brittle, and nearly impossible to maintain.

And yet, wave after wave of graduating computer scientists come to hail OOP as the only way to build robust and durable software. Now, this is not proof of a poor educational system; rather, it is a testament to the tried and true benefits of an object-oriented approach to software development. This commitment to OOP reinforces those instinctual feelings we experience as we type out the code "CFComponent" we are on the right path to good development practice.

With great power comes great responsibility, and Object-Oriented Programming is a powerful tool. By reading this book and choosing to further your understanding of OOP, you are demonstrating great responsibility! Learning OOP the right way is the only responsible choice that you can make for yourself and for your clients.

Ben Nadel

Chief Software Engineer

Epicenter Consulting

To go Object-Oriented or to not go Object-Oriented (OO) is still the source of some of the most heated discussions in the ColdFusion world. The simple truth is that the rest of the programming world had this fight 10 years ago and OO won. As a result of the wider industry's move towards OO, the ColdFusion community has also embraced this methodology; this has been done by adapting frameworks and patterns from other languages. The product teams at Adobe have adopted OO by introducing ColdFusion Components and Object Relational Mapping to the list of features within and available to ColdFusion.

Where does that leave the average ColdFusion developer, those people who don't have time to learn every new tag and function added to ColdFusion with each release? They're too busy working for a living, which makes finding the time and resources for ongoing professional development a real challenge.

Often it leaves these ColdFusion developers with no starting point, no easy onramp, to "get their OO on". This is a shame, and somewhat of an irony, as OO can be a highway to productivity. However, without a guide, exploring OO can be like travelling down a forested dirt road in the middle of the night. You can easily go off track.

That's why I was thrilled to hear that Matt Gifford had agreed to write the book you have in your hands. Matt is one of those hard to find technical minds that can communicate as well as he codes. I can think of no one better to help you navigate the sometimes tough, but always rewarding road that is Object-Oriented programming.

Terry Ryan

ColdFusion Evangelist

Adobe Systems