Leveraging the power under the hood CF and Java
Comparison of Runtime Java Write {filename}.java
The javac compiler creates {filename}.class ColdFusion Write {filename}.cf(c|m)
Server compiles them to {_filename_}.class Java Virtual Machine JVM
Instance (object) Classes and Instances .class is like a blueprint. It gives  the builder the instructions HOW to build something..all the implementation details.. BUT ..you wouldn’t want to live in a blueprint. For a real house, we have to ‘construct’ the house.  Class C:\Documents and Settings\nick.harvey\Local Settings\Temporary Internet Files\Content.IE5\U0BPZ5RV\MPj03995150000[1].jpg
'Class'  Methods and Properties That doesn’t mean a class is not useful. We don't always need the real object. How many rooms
Square footage and size information
A materials list These are called ‘class’ methods and properties
In Java, these are referred to in the docs as 'static'
'Instance'  Methods and Properties Similarly, there are some things we don’t know about an object until it is created... What color the house is
The location of the house
The owner’s name These are known as ‘instance’ methods and properties.
Classes and Instances in CF We create a reference to a Java class in CF by using <cfobject..> of createObject()
<cfset javaMath    = createObject(“java”, “java.lang.Math”)>
We can now call class methods on this

CF and Java

  • 1.
    Leveraging the powerunder the hood CF and Java
  • 2.
    Comparison of RuntimeJava Write {filename}.java
  • 3.
    The javac compilercreates {filename}.class ColdFusion Write {filename}.cf(c|m)
  • 4.
    Server compiles themto {_filename_}.class Java Virtual Machine JVM
  • 5.
    Instance (object) Classesand Instances .class is like a blueprint. It gives the builder the instructions HOW to build something..all the implementation details.. BUT ..you wouldn’t want to live in a blueprint. For a real house, we have to ‘construct’ the house. Class C:\Documents and Settings\nick.harvey\Local Settings\Temporary Internet Files\Content.IE5\U0BPZ5RV\MPj03995150000[1].jpg
  • 6.
    'Class' Methodsand Properties That doesn’t mean a class is not useful. We don't always need the real object. How many rooms
  • 7.
    Square footage andsize information
  • 8.
    A materials listThese are called ‘class’ methods and properties
  • 9.
    In Java, theseare referred to in the docs as 'static'
  • 10.
    'Instance' Methodsand Properties Similarly, there are some things we don’t know about an object until it is created... What color the house is
  • 11.
    The location ofthe house
  • 12.
    The owner’s nameThese are known as ‘instance’ methods and properties.
  • 13.
    Classes and Instancesin CF We create a reference to a Java class in CF by using <cfobject..> of createObject()
  • 14.
    <cfset javaMath = createObject(“java”, “java.lang.Math”)>
  • 15.
    We can nowcall class methods on this