CFCs in Practice Raymond Camden Senior Developer, Mindseye Technologies.

Slides:



Advertisements
Similar presentations
Object Oriented Programming in PHP 5
Advertisements

Web Services in ColdFusion 7 JaxFusion November, 2006.
CS0007: Introduction to Computer Programming Introduction to Classes and Objects.
Web Applications Development Using Coldbox Platform Eddie Johnston.
2007 Adobe Systems Incorporated. All Rights Reserved. 1 Glenda Vigoreaux Adobe Certified Instructor roundpeg, Inc. Component Development.
Road Map Introduction to object oriented programming. Classes
1 CS 201 Introduction to c++ (1) Debzani Deb. 2 History of C++ Extension of C (C++ for better C) Early 1980s: Bjarne Stroustrup (Bell Laboratories) Provides.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Introduction to ColdFusion By Tom Dubeck. Overview What is ColdFusion? How does it compare to other scripts? Some example code. Why you might want to.
C++ Classes & Object Oriented Programming. Object Oriented Programming  Programmer thinks about and defines the attributes and behavior of objects. 
Doug Hughes, Alagad Inc. Drinkin’ Cold Coffee -or- How to use Java Objects from ColdFusion.
Building + Consuming WebServices CF Style Kevin Penny MMCP (4.5/5/MX6)
What’s Next in ColdFusion Raymond Camden. This Guy  Developer Evangelist for Adobe  Blog:   Twitter:
Step Through Your CFML Code With FusionDebug Charlie Arehart
Derrick Rapley Maryland CFUG October 8, 2002.
Flash Remoting Chafic Kazoun Senior Flash Developer - B-Line Express Work: Play:
AQS Web Quick Reference Guide Changing Raw Data Values Using Maintenance 1. From Main Menu, click Maintenance, Sample Values, Raw Data 2. Enter monitor.
Software Architecture for ColdFusion Developers Unit 4: Application Events and Global Variables.
What’s New in CF 8 Admin MDCFUG 8/14/2007 Ajay Sathuluri Sr. Web and Database Engineer TeraTech Inc.
1 JavaScript. 2 What’s wrong with JavaScript? A very powerful language, yet –Often hated –Browser inconsistencies –Misunderstood –Developers find it painful.
Copyright 2007 Adobe Systems Incorporated. 1 ColdFusion 8 : Advanced AJAX Development Rakshith N Computer Scientist Jan 02, 2008.
Troy Pullis - 12/3/03 MAX Conference 2003 Twin Cities CFUG.
Introduction to Model-Glue Rachel Lehman Perpetual Intermediate Designer-Developer Introduction to Model-Glue.
CIS 451: ASP.NET Objects Dr. Ralph D. Westfall January, 2009.
Flex Data Communications Nick Kwiatkowski, Michigan State University.
1 ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 1 Building Portlets with ColdFusion Pete Freitag Foundeo, Inc.
GEMVC. The Setup Folders Views Value Objects (VOs) Custom Events Service CFCs Controller Model Application Main MXML.
ECE122 Feb. 22, Any question on Vehicle sample code?
An Object-Oriented Approach to Programming Logic and Design Chapter 3 Using Methods and Parameters.
10-Nov-15 Java Object Oriented Programming What is it?
JAVA Classes Review. Definitions Class – a description of the attributes and behavior of a set of computational objects Constructor – a method that is.
CSC241 Object-Oriented Programming (OOP) Lecture No. 4.
The Future of ColdFusion Christian Cantrell ell.
Caching for Performance Jeff Tapper Tapper.net Consulting.
DEV-6: Advanced Object-Oriented Programming in the ABL Evan Bleicher Senior Development Manager Shelley Chase
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
Julian on JavaScript: Functions Julian M Bucknall, CTO.
Constructors & Garbage Collection Ch. 9 – Head First Java.
CFUNITED – The premier ColdFusion conference ColdFusion Components Ajay Sathuluri Based on presentation.
CFC Best Practices, Tips, and Tricks Raymond Camden
Copyright © 2002 W. A. Tucker1 Chapter 10 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Website Forms / Data Acquisition.
Theo Rushin, Jr. Senior Web Application Developer World Singles and DoubleBlack Technologies 12/26/
1 Chapter 6 Programming with Objects and Classes F OO Programming Concepts F Creating Objects and Object Reference Variables –Differences between primitive.
Overview of Previous Lesson(s) Over View  ASP is a technology that enables scripts in web pages to be executed by an Internet server.  ASP.NET is a.
Overview of C++ Polymorphism
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
What’s New In CFML Matt Liotta. Agenda Overview Tag changes Function changes Small changes Large changes Nitpicking Q & A.
JSP in Action. JSP Standard Actions forward, include, useBean, setProperty, getProperty, text, element, and plugin Additional actions param, params,
5.1 Basics of defining and using classes A review of class and object definitions A class is a template or blueprint for an object A class defines.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
Using Structures With CFCs By Selene Bainum. June 27 th - 30 th 2007www.cfunited.com Why Am I here? Familiar with structures Familiar with ColdFusion.
ENCAPSULATION. WHY ENCAPSULATE? So far, the objects we have designed have all of their methods and variables visible to any part of the program that has.
Creating Your Own Classes
Review What is an object? What is a class?
Review: Two Programming Paradigms
This pointer, Dynamic memory allocation, Constructors and Destructor
C++ Classes & Object Oriented Programming
Java LESSON 7 Objects, Part 1
Building a CF Administrator Interface in Flex
What’s new in F# 4.1 Phillip Carter Program Manager.
Chapter 9 Objects and Classes
Defining Classes and Methods
Chapter 8 Classes User-Defined Classes and ADTs
COP 3330 Object-oriented Programming in C++
Overview of C++ Polymorphism
Leveraging ColdSpring To Make Better Applications
Creating and Consuming Web Services with CFML
Chapter 4 Test Review First day
Presentation transcript:

CFCs in Practice Raymond Camden Senior Developer, Mindseye Technologies

Agenda  Quick Intro to ColdFusion Components (CFCs)  CFC Coding Details and Tips  CFC “Issues”  CFC Examples  Q & A

3 “Life Through a Browser” CFCs in a Nutshell  A new way to encapsulate code.  Collection of methods with built in security  Quick and Easy Web Services  Pseudo-Object Oriented (No, it’s not really OO)  New tags:,,,

4 “Life Through a Browser” CFC Example

5 “Life Through a Browser” CFC Example (2) #greeting# #greeter.sayHello()#

6 “Life Through a Browser” CFC Tips: Constructors  CFCs do not have a formal constructor…  However – any code not inside a method is run when the CFC is instantiated (created or called remotely).  Generates white space! Use output=false in (also in )

7 “Life Through a Browser” CFC Tips: Let’s Talk about Data  This  Accessible to caller code  Shows up in dump, but not getMetaData()  Unnamed “private” scope  Not accessible to caller code  Accessible to children  Not like Variables, can’t be dumped. (Fixed in RedSky)  Method arguments  Method temporary variables (var scope)

8 “Life Through a Browser” CFC Methods  Default access is public – change to private  Specify all attributes, even optional ones:  access (important for security!)  returnType (important for validation!)  output (controls white space!)  hint  roles

9 “Life Through a Browser” CFC Methods (2)  returnType should be one of: anynumeric arrayquery binarystring booleanstruct dateuuid guidvariableName  Or must be the name of a CFC type  Watch out for structure instead of struct, number instead of numeric, etc.

10 “Life Through a Browser” CFC Methods (3)  Output versus Return  Outputting from the method will not work for Flash Remoting  Use the var scope  This is intentional: Use the var scope  Applies to UDFs as well!

11 “Life Through a Browser” - What does it really do?  It does NOT create variables.  It does NOT validate variables.  It does create entries in the meta data.  It helps define the WSDL returned by a web service

12 “Life Through a Browser” CFC “Issues”  inside a method will not have access to Arguments  and CFCs  ArgumentCollection and  Cached CFCs lose access to output, other scopes  You can’t duplicate (correctly) or serialize (correctly) a CFC  Undefined arguments show up in arguments struct

13 “Life Through a Browser” Web Services Gotchas…  No optional arguments allowed for methods  AXIS limitation  Caching of Arguments  Fixed by using CF Admin to refresh the WS

14 “Life Through a Browser” CFC Examples  Session Tracker  Unit Tester (from DRK3)  Nathan Dintenfass’ Descriptor

15 “Life Through a Browser” Questions and Resources   cfcdev mailing list  Macromedia DevNet Articles   CFDJ Articles