On Sunday, March 31, 2002, at 12:06  PM, Michael Dinowitz wrote:

comments interspersed below:

>> Ah... but, could you really translate some of the neat things that CF
>> does for you... to mention a few:
> Yes.
>
>> managing db connections
> If you mean the Admin for the db connection names, easily done. You 
> write a custom function that reads the DS connection information from a 
> file, DB or registry (like CF does) and then does all the connection 
> stuff in the function. Pretty it up and it looks like CFQUERY. With the 
> way .net is going to tag based stuff in places, this will be really 
> easy to do.
>
>> building dynamic queries
> See above.
>
>> caching queries
> A little trickier as I'm not all up on the caching or memory based vars 
> in asp but do-able.
>
>> Mail, HTTP, LDAP, WDDX, Verity, etc. (without 3rd-party products)
> Yes, you'll need the third party stuff but there's ways to hack it. The 
> JRE has a HTTP part in it that can mimic CFHTTP in some regards. You 
> may have to specify the use of third party pieces though.
>
> Is it all do-able? Yes. Can it be done to look as nice as CF? possibly. 
> Will it need a lot of custom code included that may slow down the 
> entire application? probably. Will it allow you to write something fast 
> and easy in CF and move it to Asp quickly?

I generally agree with all the above! The last point, IMO, is the most 
compelling reason for a translator like defroster... we often have no 
choice in the language for programming a target site.  If we already 
have a similar app written in CF, why not use a translator or sift 
program to avoid recoding from scratch... I'm for it (with 
qualifications, see below)

> Yes. Will the final product need to be rewritten and optimised? 
> Definitely.

In my experience, here is the real downside... I agree that a rewrite of 
the translated code is almost always necessary.  But, for reasons of 
time and cost, the rewrite seldom is done,,,

The translated application takes on a life of its own, and we have a 
bunch of "manufactured" code that is largely uncommented (or carries 
over cf comments that have limited meaning in ASP).

Now, over time this translated, un-commented, un-optimized program(s) 
gets modified by one or more programmers... it eventually degrades to an 
un-usable, un-maintainable, un-godly mess... Y2K was a recent example.

An alternative would be to write an ASP (or php, or whatever) program 
that reads CF templates and emulates them in the target language... at 
least you preserve the readability & maintainability of the CF code.

This certainly would not be as efficient as a translated, rewritten, and 
optimized program,,, but realistically,  that isn't going to happen 
anyway,

With technology ever advancing, we can address the efficiency with 
increased memory, gigahertz and bandwidth.

Dick

> The power of CF is exactly as you stated, speed and clear reading code. 
> With enough time and effort, a lot of asp could be 'hidden' to make it 
> look and act like CF more. Same could be done to Perl. It's all a need 
> thing. If you really need it, get someone who knows the languages in 
> question or can do some great research and pay for it to be done. It'll 
> take a few months for a good programmer to get a production beta out 
> but you can have an alpha of a few tags in a week or two.
>
>> I often use a simple example to show off the benefits of coding in CF
>> over ASP.
>>
>> In CF you can query a database, cache the query, and display the 
>> results
>> with 2 tags:
>>
>> cfquery and cfoutput
>>
>> In ASP, it takes 2 commands just to open the db connection (and you 
>> must
>> take responsibility for closing it when you are through... a 3rd
>> command).
>>
>> no automatic db connection
>>
>> awkward code required to build dynamic queries
>>
>> no built-in ability to cache the query
>>
>> no automatic looping over a query (ala cfoutput)
>>
>> And, best of all (IMO) the cf code is less cryptic, easier to write,
>> less error-prone,  much more human-readable and much more maintainable
>> over time... a real price-performer!
>>
>>   Perl (or possibly APL) are the only languages (that I am aware of)
>> which can do more than cf, with fewer lines of code...  "I can write
>> that (put your application name here) in 1 line of code!"
>>
>> .. but you need to be lobotomized to read/understand the resultant
>> code - or write many, many lines of comments... but, even with 
>> comments,
>> you still need to spend a lot time to decipher the code if you want to
>> understand/change it.... TIMTOWTDIW... "There Is More Than One Way To 
>> Do
>> It Wrong!"
>>
>> Dick
>>
>>
> 
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to