December 22nd, 2003, 05:00 PM
Convince me to learn CF instead of PHP
Title says it all. I'm a former ASP dude looking to learn something new. Gimmie an ear full!
December 22nd, 2003, 07:44 PM
Well I don't want to start a holy war, but I much prefer CF. This is mainly because I don't come from a "programming" background originally (C++ etc.), but came from doing HTML and then learning CF, so the tag-based syntax was very easy for me. Honestly as an ASP developer you may well find the syntax of PHP more familiar. But...some of the advantages of CF are:
Much faster development time (because the tags work at a much higher level of abstraction than PHP scripting does)
Much more is built into the language (graphing, Flash remoting, web services, XML creation and parsing, database abstraction, full-text searching, etc.) where with PHP you must install mods or recompile to get this functionality
Professional support if you need it
Built-in clustering and other enterprise features
CFMX is a Java application, so you can now fully leverage all that Java has to offer if you choose to, including using JSP tag libraries, calling Java classes, leveraging the Java API, etc. Thus you can program at a very low-level via Java if you need or want to.
PHP is a great platform and I understand PHP 5 is going to be very cool. I've just found CF to be super fast to develop with and very easy to learn and use. Hope that helps.
December 24th, 2003, 04:27 AM
It depends on what you want, if you want to learn something in 5 minutes (which you will if you've done ASP) that will get your dynamic site up & running in 15 minutes, then use Coldfusion.
If you want more control over your dynamic site, and by more I mean a lot more, then use PHP.
Coldfusion is so god-damn easy to pickup that its quick to develop in. But if you're happier having more control over the code (and the code actually looking like code (yes I know theres cfscript)) PHP is the one.
I'd say from my expeirence learn PHP, which should also be quite easy with some ASP background, then if you're still interested in Coldfusion it'll definately only take you 5 minutes to learn.
December 24th, 2003, 05:14 AM
I dare you to ask this question in the PHP forum
This is me: http://chris.uk.com
December 24th, 2003, 09:06 AM
December 24th, 2003, 10:45 AM
Without igniting any sort of argument, I'm curious to learn why you think this is the case. Can you expand? Thanks.
February 2nd, 2004, 01:38 PM
I work in both CF and PHP and I can't say I find PHP more flexible.
PHP has weaker error handling (no throw catch to my knowledge)
has far more implimentation problems.
My ISP run a point release version of PHP that is 4.1.2 the only version I can get stable with the more recent apache for win is 4.2.1 so I can't always be sure that code will work up on the web.
don't even mention regsiter globals to me.
I suppose the php.ini is very flexible but does also add to implimentation issue.
CF has simplified many of the common tasks into tags that a 2 year old could understand, yet it's also rock solid with com objects, can scale to an enterprise environment with clustering has good xml support and is designed rather than cobled (like php)
However I like php it has a good community, lots of free GNU code to learn from and enhance, but it forces programmer style coding even on the simple pages and does very little for you (XML support is dodgy) it handles images pretty well and can be cool for OOP (although later CFs cover this pretty well too) Of course PHP is free and CF is well overpriced (where the free developers edition download)
On average I'd pay the wack for CF if I'm on a big project and use php when doing simpler sites.
February 2nd, 2004, 03:06 PM
Re: Holy war
PHP5, due out this year, introduces two features which address the key points you've made here - an updated object model and a new way to handle XML.
Regarding PHP's OOP model, we'll have all of the try/finally and catch/throw loops used in other OO langs (such as Java), class/method access modifiers, etc. PHP5 also introduces what is quite possibly the easiest method for managing XML data from w/in an object - SimpleXML, which allows you to treat XML data as if each piece were an object attribute.
PHP4 is still an incredibly powerful language for web applications development; I wouldn't wait to begin coding in PHP until v5 is released.
Last edited by drgroove; February 2nd, 2004 at 03:13 PM.
February 2nd, 2004, 03:13 PM
Nice to hear those PHP5 additions Dr.
I also wanna thank everybody on this thread for all their input. I ended up doing some tutorials and such in each language and decided on going with PHP for my immediate project. PHP just seems to make a little more sense to me. Might be my ASP background... not sure. In any event, I'm going the PHP/mySQL route for the near future...
In my CF research, I ran into something called FuseBox. Maybe you all already know about that, but in case you didn't, check it out (http://www.fusebox.org). That seems like some really good stuff.
February 2nd, 2004, 03:15 PM
Myself and another senior member on this board both come from ASP backgrounds, and now both do PHP/MySQL rather than ASP. I think that kind of migration is not uncommon with developers exploring alternatives to the Microsoft lock-in.
Happy coding - drop us a thread & let us know how the project is going.
February 4th, 2004, 11:36 AM
cheers for the details on php5 always nice to see whats around the corner.
Don't get me wrong I like php its a great thing when any major software is free and I agree people from a programing background are often weirded out by coldfusion.
(Im a bit odd in that my background was in traditional C programing but I still prefer CF)
I think eventualy php/mysql will become virtualy the standard web application language in the way that Apache is the most popular webserver however.
the vast majority of web programming dosen't require a great deal of programing skill (the applications are generaly simple) however you deal a lot with documents/style/standards that are not adhered to, basicaly it has little in common with standard development for 1 platform.
This is why the coldfusion aproach with tags that fit in with html markup is so good, when needed you can breakout the script tag but most of the time u can keep your code very simple.
I have developed some basic php coldfusion emulation and some methodologies to make php work more like coldfusion e.g. I don't put my html in echos, I create variables if they don't exist like a cfparam I have a cfquery function and I use the
my html here
method for putting html values into variables.
and you'll all freak when I say that I build a global version of all variables (form get cookie session etc) so that I don't care where they come from (yes I do secure and test them before writing to a DB)
I respect and understand why many people prefer php but I think its still a little immature in comparison and implimentation can be a pain (easier if you can work with 1 version and a standard php.ini which if you've got a decent isp should be the case)
Good luck with your php but try to consider some of the ideas CF suggest, I think there is much to recommend in the way that it works.
February 4th, 2004, 11:43 AM
Actually, PHP has been the most popular web applications development language for over a year now (link in sig), going on 2 years.
In terms of separating HTML from code w/ PHP, using Smarty (smarty.php.net) is the best way to do this. Smarty is a tag library similar to what JSP offers (or CF for that matter) that allows you to implement a clean MVC application w/ PHP.
Regarding PHP's maturity, I wouldn't necessarily compare it to CF, esp considering PHP has had OO for years, and CF /just/ got the ability to do functions and /barely/ has the ability to do objects. PHP5 will put the language far beyond CF in terms of extensibility, power, and strict OO principles.
February 4th, 2004, 11:59 AM
cheers for the smarty link DR, that is as smart as you like.
Im not against php in fact I spend as much time in it as CF these days but I'd take serious convincing that 5 will be beyond CF.
Whilst php has always had a better method for OOP this was and still is (to some degree) less important for large web apps than things like clustering. good com support, ease of implimentation a quality patch/fix release approach and error handling that works, would be higher on my list, custom tags got me by just about
Whilst I hope very much that php5 addresses these issues I think many people are too willing to ignore phps obvious weaknesses, because they find it imediately similar to other traditional languages. I mean all languages have strengths and weaknesses, php's improvement rate is impressive but because of that I find it harder when It comes to implimentation
when all is said and done tho they both make ASP look like the bag O sh** that it is.
February 4th, 2004, 02:31 PM
I'm no MS zealot, but from what I've seen ASP.NET is actually pretty cool, and ASP.NET 2.0 is looking to be quite awesome. MS always starts from behind and then catches up quickly. And when it comes to IDE's, nothing is even close: Visual Studio .NET simply obliterates all other IDE's, even Eclipse (which is great).
So, folks may like or dislike MS, but .NET and Visual Studio are actually pretty cool, if you can stand the lock-in of a single vendor.
February 5th, 2004, 04:30 AM
you're not the first person to recommend .net as an architecture.
I'm sure it is a major improvement over standard asp, but there was always sooo much room for improvement.
As for the IDE this reminds me very much of peoples reasoning for using VB over C++ complete with the same lock in issue for VB.
I'm sure at some point I'll have to look at .net but at the same time I'd probably rather look at JSP, which coldfusion gives me a simple route to. JSP is mature has less lock in issues is multiplatform and scales to enterprise well, its proven.
At the end of the day I've never appreciated Microsoft's embrace extend and destroy policy but I find it most distasteful when used on the web. The web is an open standard not the competition, M$ continual lock out at the server end coupled with their browser share is one of the main reasons I spend most of my days fixing layout bugs and less time developing.
But don't get me going I blame all the companies with web interest for the lack of adherence to standards which is why even though, still getting there I am a big fan of php, at least there is no ulterior motives just good people trying to do things the right way.