On Tuesday, November 26, 2002, at 01:35 PM, Joe Eugene wrote:

> I understand your need. A while ago, we looked at the generated Java 
> code(Real
> Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm 
> TYPES
> to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm).
>

I remember that thread -- the generated Java code was "Slow & Ugly".

Someone (maybe me), posted that strong typing in CFML would allow the CF
parser to generate better Java code.

> InLine Java Code.
> If this ever happens, ideally.. CFMX complier should create a helper 
> class
> file and let Java Complier, compile it like a Jsp page.. this would be
> excellent.. but again IS'nt CfObject doing the same thing?(seperating 
> the
> helper/model class from presentation)...Am trying to relate to "Inline 
> Java"..
> So what overall advantage do we get with Inline Java? Any 
> Performance...?
> other than coding between CF/Java in templates?
>
> I am not against InLine Java.. just trying to understand the Mechanics.

I think you could get an interface between no-typing and strong typing

I think you would be more easily do develop and test the parts of your 
program
that you needed (or decided) to code in Java.

The inline code likely would be more efficient that CF parser generated 
code, so
yes there would be a performance gain (when warranted).

You might be developing a routine that will be ultimately deployed as a 
separate Java
program (invoked with cfobject) -- it could be more convenient to 
develop and debug
the Java inline, along with the CFML.

The dbMetaData example illustrates one advantage of inline Java.

Say you want to change the program(s) slightly so they return a list of 
db tables, and the
columns within each table.  On the presentation side, you want to 
display the combined
list in a select box.

Here' s what you do, presently:

1) display the Java source
2) modify the Java source.
3) save the Java source
4) switch to a CLI window
5) compile the Java source
6) switch to the CF source
7) modify the CF source
8) save the CF source
9) switch to a browser window
10) invoke the cf template

Here's what you would do with inline Java

1) display the combined  CF source with the inlineJava source
2) modify the inline Java source.
3) modify the CF source
4) save the combined  CF source with the inlineJava source
5) switch to a browser window
6) invoke the cf template

Now, you might say "You only save 4 steps!! -- but that's 40% of the 
steps.

and they are repeated many times.

You would be eliminating 40% of the interactions, 40% of the 
distractions,
40% of the opportunities to make a mistake.

It means productivity!

I hope this helps answer your question -- I really don't under stand 
what a helper/model class is, yet!

As an aside, does Java recognize a construct similar to a hash or a CF 
Structure,
that could be passed between CFML & Java.





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to