Coldfusion是一個用Java編寫的腳本處理服務器。 Coldfusion需要一個Java服務器(如JRun),一個Web服務器(如Apache)以及Coldfusion 9之前的數據庫服務器(如果您要使用數據庫)。幸運的是開發版附帶了所有內置的功能。
對於生產,您需要一個單獨的Web服務器,如IIS或Apache,因爲內置的Web服務器僅限於開發。您很可能需要一個單獨的數據庫服務器,例如MySQL或Microsoft SQL。但除非您有特定的需求,否則您可能會與內置的JRun Java服務器相處,現在不用擔心Coldfusion的這一方面。
如果你做任何PHP,ColdFusion的將是方式有點類似於它是服務器以及如何代碼和HTML的腳本頁面集成在一起的設置。 (是的,有分歧,但是這是一個足夠好的比較,而不是與.NET安裝程序)
ColdFusion的有它自己的內置數據庫,或者你可以從各種各樣的其他數據庫的選擇。你應該建立一個到數據庫的連接,在ColdFusion管理員中稱爲'數據源',然後在使用cfquery標籤之後使用真的很簡單。
如果您不熟悉ColdFusion,我想直到你有ColdFusion和您現有的應用程序是如何工作的第一個好的手柄跳過所有的第三方框架。如果你是新手,這些都會增加不必要的複雜性,並且框架的文檔有點稀疏。
查看源代碼。在這裏詢問關於它的含義的個別問題。
找到一個特定的ColdFusion的功能的文檔最快的方法是到谷歌:
'ColdFusion的8 cftagname'(如 'ColdFusion的8 CFQUERY' 或 'ColdFusion的8 cfqueryparam')
或
'Coldfusion 8 cffunctionname'(例如'Coldfusion 8 structKeyExists')
單擊生成的livedocs.adobe.com鏈接。 (谷歌的工作方式比網站的內部搜索引擎更好,而Coldfusion 8似乎是與Google最好的鏈接)
cfdump標籤對於簡單的調試非常方便。
最後,這裏的Hello World的例子:
index.cfm(標準ColdFusion的頁面使用.CFM擴展)
<!--- All coldfusion tags begin with <cf
...and Coldfusion comments have three dashes.
These comments will be removed on the server side
before being sent to the browser
--->
<!--- Set a greeting variable using standard cfset tag --->
<cfset greeting = "Hello World!!">
<!--- Begin HTML --->
<html>
<head>
</head>
<body>
<!-- Normal HTML comment -->
<p>I could just say hello world with HTML</p>
<!--- In order to output Coldfusion within HTML,
wrap with the cfoutput tag. Variables in HTML are wrapped with hash marks:
Example: #varName#
--->
<cfoutput>
<p>More HTML, blah, blah, blah...</p>
<!--- Outputs: Hello World! --->
<p>#greeting#</p>
<!--- Or apply a Coldfusion function to the variable.
Wrap the variable name with a function name and
then wrap the function with hash marks to tell
the Coldfusion server to process the statement
--->
<!--- Outputs: HELLO WORLD! --->
<p>#ucase(greeting)#</p>
</cfoutput>
<!--- And another way to view the contents of a variable as a developer --->
<cfdump var="#greeting#>
<body>
</html>
希望有所幫助。
請打破這一成獨立的問題。 – 2010-01-27 01:45:44
@丹:他們似乎有點太基本,不能保證自己的問題。我只需要一些指導來指導我,而不是過分擔心每個細節是否得不到解答。 – mpen 2010-01-27 02:00:28