Thursday, July 29, 2010

Extending Java With ColdFusion


http://www.rupeshk.org/blog/


Coldfusion IS java



JEE APP SERVER - JAVAAPP
CF APP
JAVA APP2
CF APP2 etc


ALl the objects in CF are in Java and vv (eg strings, querys, arrays, numbers)


WHY?
CF use Java? - take advantage of libraries. Features not available in CF, eg EHCACHE, Hibernate. iText, Webchart

WHY
Java use CF? (*** THIS COULD BE A WAY TO MIGRATE BW TO CF SLOWLY)
Easy, Rapid development, readymade services


CF use Java
Java CFX Tags. (write in java, serve in CF)
JSP/Servlets/tag libraries.


We are Talking about Direct invocation:

createObject("java",className) CFCFOBJECT type="java" class="classname" name="variable">

invoke using:

obj.foo(arg1,artg2)


eg

cfobject type="java class="java.lang.StringBuffer" name="bigg"
cfset buf.init("CfUnited")
cfset buff.append(" 2010")

(I cant type fast enough - hope its available after)

Basically he's going through demos of how to call java from CF and vice-versa
















No comments:

Post a Comment

Note: Only a member of this blog may post a comment.