John Burns
________________________________
From: Dick Applebaum [mailto:[EMAIL PROTECTED]
Sent: Tue 3/9/2004 12:16 PM
To: CF-Talk
Subject: Re: Why use Cold Fusion vs. other languages?
Not necessarily...
In our ad hoc demo scenario, I try to make the initial demo simple:
- easy to type
- easy to understand
- easy to get running
Normally:
<cfquery name="getPhone" datasource="cfsnippets">
SELECT LastName, FirstName, Phone
FROM Employees
WHERE Department='Sales'
ORDER BY LastName, FirstName
</cfquery>
<h1>SomeName Phone List</h1>
<cfoutput query="getPhone">
<br>#LastName#, #FirstName#.......#Phone#
</cfoutput>
I try to ask the customer for some info to include in the program to
show that it is truly extemporaneous.
Once the simple program is running, you can pre-empt criticism --
"Admittedly, this is a simple example. let's add some complexity!"
Then, you can go several ways:
- add simple formatting to show results in a table
- add a simple input form to the same template to show how the user
can select which department (or whatever) to display
- add a simple tickcount routine to time the program execution.
So now you have a "Dynamic, Data-Driven" program.
- Run a few queries against different departments
Then, talk about performance, database activity and query caching (in a
wouldn't it be nice if we could...)
"Well, we can! With CF, it's easy!
Then go back to your simple example and add:
- a caching parameter to the query (I like to use cached after)
- a button on the input form to reset the cache
- a simple routine (in the input form processing) to set/reset the
cached time
Now you can show the difference between cached and non-cached query.
Take the opportunity to review what you have done so far:
- all extemporaneous
- created a usable, dynamic, database-driven web program with 2 CF
instructions
- added an input form so that the user could view the data that is
meangingful to him
- added sophisticated query caching to optimize performance and
minimize load
on the database server and application server -- helps the
application to scale.
Query caching of this type, actually gets better with more users --
better chance that
a query will already be cached -- somebody has has
previously retriever (and cached)
the phone list for the xxxx department.
This is a real application!
OK, What's it taken -- 20 minutes? That's productivity=RAD!
Now, if you're feeling bold, and the customer has his own web site, you
can show how CF can suck one of his existing pages into your program.
Or, use a web service to do a search at Amazon, UPS, or some such.
Here, I try to pick things that are meaningful to the customer (and
usually have been prewritten to save time).
The "Ideal" is this:
You walk into the customer's board room and connect your wireless
laptop into the large screen display.
With zero configuration networking, you wirelessly connect (with proper
security & authorization) to the customer's live (probably development)
database.
Ad hoc, you create a simple CF (as above) program that manipulates "his
data" in a way that is "meaningful to him" -- after all, that's what
it's all about!
You (and CF) wow'em!
HTH
dick
On Mar 9, 2004, at 6:24 AM, Chunshen Li (Don) wrote:
> Good point, however, only developers would be able to undertand this.
>
> >Dick Applebaum wrote:
> >
> >Don't forget to add dynamic query caching with
> >cachedwithin="#createtimespan(0,0,0,30)#" or whatever. No other
> >language in the web space offers a similar solution with a single
> attribute.
> >
> >-- geoff
> >http://www.daemon.com.au/
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

