4 Replies - 2121 Views - Last Post: 16 March 2011 - 03:13 PM
Should I start ColdFusion?
Posted 13 March 2011 - 06:52 PM
First of all, should I go from PHP to CF, or ASP.NET?
What are the best things about CF?
Which is better? PHP or CF?
Should I begin CF or ASP?
Anyone answering these questions would help me greatly!
Replies To: Should I start ColdFusion?
Re: Should I start ColdFusion?
Posted 14 March 2011 - 06:49 AM
So, first things first, if you're working with PHP now, what is motivating your interest in picking up a second language? The languages you mentioned (CF and ASP.NET) are competing languages with PHP and serve much the same segment of the web development world. If your interest is due to being better able to serve a customer's dev needs then your answer would be whichever language your customers are asking for more.
Another thing to know about Coldfusion is that there is a difference between "ColdFusion" and CFML (ColdFusion Markup Language). ColdFusion is the CFML server platform offered by Adobe that supports Adobe's CFML language spec. There are other vendors of CFML platforms notably BlueDragon, Railo as well as open source CFML platforms like OpenBD.
Insofar as how they compare, well, this is always a subjective area of discussion. There are some objective comparisons you can make though so I'll go through them with the caveat that I do 99% of my dev work with CF, have touched PHP a couple of times and ASP.NET never.
Underlying technology - CF and PHP came out around the same time (1995) and ASP.NET was released in 2002 so insofar as maturity goes, they're all three pretty mature, stable platforms for web development. PHP requires the site's web server to have a PHP processor module to interpret the PHP code and turn it into generated HTML. PHP can run on IIS and Apache HTTP web servers. ASP.NET requires the site's web server to have the .NET framework to interpret the code's server side GUI and user controls and such. ASP.NET is typically thought to be intended to run on Microsoft's IIS HTTP server (where it does run natively) however it can be made to run on Apache given some underlying modifications. CFML requires a processor module as well and can run on both IIS and Apache web servers depending upon the CFML platform being used.
Price - Well, as we know, PHP is essentially free insofar as the cost needed to acquire the processor module for the web server being used. ASP.NET is natively supported by IIS6 and IIS7 as long as the appropriate .NET framework has been installed on the server as and such is also free. Adobe, BlueDragon and Railo all have platforms that can be purchased for varying amounts. Coral Web Builder runs around $225 for unlimited deployments. There are also free open source CFML platforms like OpenBD and Railo offers a stripped down version of their platform for free. However, price isn't solely determined by the cost of the server software as other factors such as the necessary server environment may also have associated costs (such as running ASP.NET on a Windows server, for instance).
Ease of use - I can't comment on how easy or complicated it is to install the necessary components for either PHP or ASP.NET on the server of your choice but I can attest to both Adobe's and NewAtlanta's (the vendor for the BlueDragon platform) installations of their respective platforms. Both are rather simple to do on a Windows box and only slightly more involved on a -nix environment. No special skills or knowledge are needed to properly install either on most web servers.
That said, amongst most devs who have experience with multiple languages, CFML tends to be regarded as a very easy language to pick up and start using...especially if you're already familiar with HTML and using tags and probably has the lowest initial learning curve of all three.
So, all that said, you had asked: "What are the best things about CF?". To me, the best things about CF is that the tags and script commands actually encapsulate a lot of pre-compiled code. For instance, the code necessary to query a database table and return the resultant dataset back to the server in CFML looks like this:
<cfquery name="testQry" datasource="someDatasource"> SELECT whatever FROM tableName </cfquery>
What you have at the end of that small bit of code is a query structure called testQry containing the data found with the SQL contained within the opening and closing cfquery tags. No identifying the database server (done one time previously in the set up of the site), no passing in connection protocols (again done previously), no closing the connection. With CF, you set up things in advance like your datasources wherein you identify the database box IP, the database you'll be using, the connection login and password and you turn all that into an alias ("someDatasource" in my example) that you can reference anytime in your code for that site. You can also designate mappings to certain server folders, email servers, security settings, set variable parameters and so on.
So, as a best thing, this is pretty cool...and it's just one example. Doing more complex operations like uploading and managing files, manipulating directories, creating and consuming web services...all those things are all a lot easier to do via the CFML tag language than they are with either PHP or ASP.NET. This ease of development results in something that references the cost issue earlier: development time. A general rule of thumb is that it takes around 1/3 the time to build a moderately complex site in CF than it would in either PHP or ASP.NET. Because less time is needed, less developer time is paid for. Now, because there are fewer CF devs in the marketplace than either PHP or ASP.NET devs, CF devs tend to get paid slightly more (especially when compared with PHP) but usually not enough more to balance out the increased rate versus the decreased time.
Further, the end customer can expect a quicker deployment schedule which is important to some folks. Quicker to market is an important consideration in some situations and CF holds a distinct advantage in the from-concept-to-deployment category.
So, if CF is that great, why isn't it ruling the world? CFML does have a much smaller deployment footprint than either PHP or ASP.NET insofar as the number of sites in the world running each tech. This is primarily due to there not having been a viable open source (free) version of CFML that was enterprise capable until the past few years. Despite the fact that building and maintaining a CF site was always cheaper than either PHP or ASP.NET, having the lay out a couple of thousand dollars for an enterprise CFML platform normally prohibited smaller sites from even considering CFML. PHP especially grew in that absence of real competition and so has come to dominate the numbers of deployed sites using that language. However, as cost is no longer a factor with the open source offerings, CFML is pretty much holding it own and gaining slowly. It simply isn't regarded as THE hot thing these days (as opposed to say Ruby).
As to your last question of whether to go with CF or ASP.NET...that depends on what is driving your interest in doing such at all. Anytime you expand your knowledge as a dev you're not doing yourself any harm. However, if there are specific reasons you're looking to diversify your skill set in developing web applications, those reasons will likely dictate which direction is better for you.
If you have more detailed questions, ask 'em here and I'm sure we can answer them. If you're wanting to learn more about CF and/or CFML our Coldfusion Resources thread is a great place to start.
This post has been edited by Craig328: 14 March 2011 - 06:58 AM
Re: Should I start ColdFusion?
Posted 14 March 2011 - 10:49 AM
So the CFML is a lot like HTML, which would be a great thing for me, especially since I love HTML's syntax. And, there seems like there is less 'work' involved in creating things.
So in CFML, an upload script would be
(Pulled from a CFML tutorial site)
<cfif isDefined("fileUpload")> <cffile action="upload" fileField="fileUpload" destination="C:\docs"> <p>Thankyou, your file has been uploaded.</p> </cfif> <form enctype="multipart/form-data" method="post"> <input type="file" name="fileUpload" /><br /> <input type="submit" value="Upload File" /> </form>
Where in PHP a simple upload script is well.. a lot more code. So, the syntax is better, and theres less writing involved. Sounds like my kind of language
Re: Should I start ColdFusion?
Posted 14 March 2011 - 11:08 AM
What's more is that when the code is written, it's a lot easier following what's going on in the code because the tag names are quite descriptive of what they do. CFFILE deals with files. CFOUTPUT deals with outputting things. I mean from that you can follow what CFSET, CFDIRECTORY, CFPARAM, CFLOOP and most other CF tags do without knowing actually squat about the fine detail of the coded module.
Re: Should I start ColdFusion?
Posted 16 March 2011 - 03:13 PM