On Sunday, November 24, 2002, at 12:07 AM, Kwang Suh wrote:

>> 2) Where CFMX can act as a gentle introduction to Java -- certainly
>> this hybrid code would  not be the best, but it would allow Java
>> neophytes, like myself, to learn Java gracefully, without having to
>> learn all the rules first.  -- There is something about the fact that
>> we can learn our native language, better, by the age of 5, than a
>> person with 4 years of college courses on that language -- simple
>> introduction, constant use, familiarity-- a lot of us "Learn by 
>> Doing!"
>
> Well, I don't really agree with this.  You'd be better off learning 
> design
> patterns before even touching Java as a programming language.  There's
> _much_ more to "Java" than just writing code.  CF doesn't even come 
> close to
> what Java offers.
>

What do you mean by "design patterns" -- that is a term that I am 
unfamiliar with?

Over the years, I have learned many programming languages -- and taught 
a few.

I have made several attempts to learn Java.

The biggest deterrent, I have found is the long learning curve.

The Java advantages, implied by  your statements (and by Java's 
popularity), likely are real.

But these advantages quickly get blurred in the swirl of definitions 
and rules.

I prefer to learn a language a little at a time, hopefully using it in 
actual productive code.

I learned CF by reading Ben Forta's CFWACK second edition and trying 
the examples on a remote host (I don't own a windows PC). I then wrote 
some small, infrequently-used, utility routines.  Infrequently-used is 
key here -- it was not necessary that these routines be efficient or 
well-written, just that they work.

My first major program, was to take a shopping cart I had written in 
Perl (actually a Perl subset), and to convert it to CF.

I made a copy of the Perl program, then  would <--- ---> comment out a 
section of Perl code and replace it with the equivalent CF code.  Where 
I was unsure, I would make a separate program out of the CF segment to 
test it.

I was amazed, after several hours of this, I had a complete CF program 
(with CF self documentation and Perl comments) that worked.

Was it good CF code -- not even close, but it worked.

Was it more efficient than the Perl equivalent -- it may well have 
been, because the powerful CF tags and functions were likely more 
efficient than the primitive Perl statements needed to accomplish the 
same thing.

It certainly was easier to code, and easier to read the code.

As a practical by-product of this method of learning CF, I was forced, 
by necessity, to learn the CF terminology and documentation so I could 
find (and use) the necessary CF tags and functions.

But, I was able to learn CF, well enough to be comfortable with it, in 
a few days.

I removed the Perl comments/code and had a working CF shopping cart 
that I could refine over time.  That was 1998 -- versions of that cart 
were in use until late last year.

After this rather long preamble, here's my point:

If CF had inline Java code, it would allow someone learning Java to 
take a segment of a working CF program and recode that in Java -- 
without the need to "learn everything about Java", including its 
theory, structure, syntax documentation, etc., "all at once"

You would have the familiar CF infrastructure supporting your "Java 
segment".

You would have the advantage of starting with familiar, working code -- 
and tasked with developing the working Java equivalent.

You likely would comment out the CF code,  and replace it with the Java 
-- you'd have a side-by-side comparison to ponder.

You would likely begin with infrequently-used segments of programs 
where "less than optimum Java programming" would not be a severe 
penalty.

As you applied this technique, you would have more and more questions  
about Java and you would find the answers (of necessity) and your 
search would reveal more of the Java approach.

At some point, you would be proficient enough to write entire programs 
(or major portions) as Java servlets, applets, beans JSPs or whatever 
(I don't know what term applies here, and there are so many of them) -- 
but you would learn what you needed to know, when you needed to learn 
it.

So, CF would help you learn Java, and to, immediately, take advantage 
of that knowledge by putting the Java code segments into production.

Would they be "perfect" Java programs, of course not -- but then, the 
"perfect Java program" has not been written (nor, will it be),

Would you recode all of your programs (or tiers of an application) in 
Java -- likely not -- there are some things that CF does better than 
Java.

But, with inline Java, CF would allow the developer an easy way to 
learn (and use) Java and how to interact with the Java infrastructure.  
So equipped, the developer would be better prepared to choose among 
Java ,  CF  or both, for application development.

Finally, you should ask yourself why a company like IBM wants to 
teach/market ColdFusion along with its enterprise Java offerings -- I 
would speculate that the simple answer is: "because it makes sense -- 
Java with CF offers better productivity to a broader audience, than 
Java without CF." -- and  that translates to $.

Dick



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to