|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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!
|
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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. -D |
|
#4
|
||||
|
||||
|
I dare you to ask this question in the PHP forum
![]() christo
__________________
. Spiration channels: Free scripts, programming tutorials and articles Dotcut alerts: Online Press cuttings / news alerts Clearprop: UK microlight school, wiltshire Uk dating: UK safe dating with Topdates About Christo . . |
|
#5
|
||||
|
||||
|
Quote:
He already has...
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever. Analyze twice; hack once. The world's first existential ITIL question: If a change is released into production without a ticket to track it, was it actually released? About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect - Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire |
|
#6
|
|||
|
|||
|
Quote:
|
|
#7
|
|||
|
|||
|
Holy war
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. |
|
#8
|
||||
|
||||
|
Re: Holy war
Quote:
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 02:13 PM. |
|
#9
|
||||
|
||||
|
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. Happy coding! |
|
#10
|
||||
|
||||
|
Quote:
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. |
|
#11
|
|||
|
|||
|
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 foo.=<<<_cfindecator my html here _cfindecator 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. |
|
#12
|
||||
|
||||
|
Quote:
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. |
|
#13
|
|||
|
|||
|
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. ![]() |
|
#14
|
|
|
|