Foamcow said:
A word of caution.
If you have no experience in doing this it will probably take longer and be more troublesome than you imagine
Ahhhh, spoken like a true PHP Programmer ;-)
I've not been on the boards for a while and thought I'd come and reinforce the benfits of ColdFusion against all the other server side options.
First of all, I appreciate you are new to Server Side work, and as the other guys have already spoken, its bound to be a rocky road ahead, HOWEVER, its worth the elbow grease as learning a server side language opens up a whole avenue of your career, especialy if you concentrate on ColdFusion or .NET then not only are we talking database driven web content, we're talking extensive and powerfull web based applications, there is a great differance I assure you. You can then look into branching into MIS development and all sorts.
Now my experience with .NET is reasonably limited so i wont go into too much detail about what it does or doesn't do, but i can however show you some clear examples of the benefits of CFML over the .NET scripting language, from a coders point of view.
Now, you're going to want to look at the MX7 version of CF to really start utilizing its power, take a look around the basic tutorials here to see how simple it is to achieve some fantastic results.
Now to take a more simple example, infact, probably the simplest of examples, you want to query a piece of data from the database, and then display it on the screen.
Now take a look at the examples of ASP, JSP and ColdFusion, which would you prefer to code with? notice the 'tag based' syntax of CFML? it makes you feel right at home doesn't it?
ASP
Code:
<%
Option Explicit
Response.Expires = 0
Dim objConn, objRS, strQ
Dim strConnection 14:
Set objConn = Server.CreateObject("ADODB.Connection")
strConnection = "Data Source=somedatasource;"
objConn.Open strConnection
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS.ActiveConnection = objConn
strQ = "select VendorID, Vendor "
strQ = strQ & "from Vendor "
strQ = strQ & "order by Vendor"
objRS.Open strQ
%>
<%
While Not objRS.EOF
Response.Write objRS("Vendor") & ", "
Response.Write objRS("VendorID") & "<br>"
objRS.MoveNext
Wend
objRS.close
objConn.close
Set objRS = Nothing
Set objConn = Nothing
%>
JSP
Code:
<%
try {
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
} catch (java.lang.ClassNotFoundException e) {
e.printStackTrace();
}
Connection myConnection = null;
Statement myStatement = null;
ResultSet myResultSet = null;
try {
myConnection = DriverManager.getConnection ("jdbc:odbc:jsp", "", "");
myStatement = myConnection.createStatement();
myResultSet = myStatement.executeQuery("select VendorID, Vendor from main order by lastname");
while(myResultSet.next())
{
out.println(myResultSet.getString("Vendor")+", ");
out.println(myResultSet.getString("VendorID")+"<br>");
}
myResultSet.close();
myStatement.close();
myConnection.close();
} catch (SQLException e) {
e.printStackTrace();
}
%>
CFML
Code:
<cfquery name="Company" datasource="yourDB">
select VendorID, Vendor
from tblVendor
order by Vendor
</cfquery>
<cfoutput query="Company">
#Vendor#, #VendorID#<br>
</cfoutput>
Keep in mind those are all identical tasks, interesting huh?
Now there is the expense downside to hosting for ColdFusion, however this is minimal, and the costs you will save in man-hours in the development, maintanance and support will more than justify the additional few pounds per month to host the site.
Rob