.php, .asp and .cfm: what are the various merits?

  Handy Spinner 18:07 04 Feb 04
Locked

Just wondering what are the advantages/disadvantages of the above file formats.

I would be interested in hearing about ALL the +s and -s, including how easy each one is to learn.

Thanks.

  Taran 20:14 04 Feb 04

This forum doesn't have sufficient space to go into a full comparative discourse on all of the scripting languages you mention.

In brief, PHP coupled with MySQL is supported on the majority of web servers and is free for most applications and users which are just two of the many factors in their favour. I use them extensively now, and I hardly ever use ASP any more.

ASP pages with Access or MS SQL data sources require more expensive Windows web hosting and they have a long history in dynamic and data driven web applications. You can get another version of ASP, Chillisoft ASP by SUN, that runs on Unix/Linux web servers but you would be coding in ASP 2 specification rather than using the latest VBScript or JScript ASP. Again, I'm generalising here so don't jump all over me for the brevity of this answer.

Cold Fusion is drop dead easy to learn [in my opinion] but it is comparatively difficult to find suitable web hosting and expensive to buy. It works beautifully though and is well worth considering if you have the need for it.

There isn't anything I can think of off-hand that I can do in ASP that I can't do with PHP and the same goes for ColdFusion, up to a point. Don't take my word for ColdFusion though: I only dabble with it compared to my PHP and ASP work.

To give you a straight answer is almost impossible. There are certain tasks and applications where I would prefer to use one language over another. This could be influenced by a lot of different factors:

is there a current system I have to hook into ?

who will be running/developing my system in the future ?

does the client have web hosting already and if so what do they have ?

does the client require heavy Microsoft program interaction ?

did I get out of bed on the PHP or ASP side ?

;o)

Basically, you asked how long a piece of string is and I doubt you will ever get a full and satisfactory answer since there are just too many variables to take into account.

T

  PurplePenny 23:10 04 Feb 04

Would that be ASP string or PHP string?

Penny

  Taran 17:58 05 Feb 04

Nice one

;o)

  Handy Spinner 22:16 06 Feb 04

That is all good stuff to know. Thanks Taran - I was rather hoping for a response from you!

Just as one last thing, you couldn't tell me which one out of PHP and ASP is easier to learn? Or is that a matter of opinion as well?

  Taran 22:57 06 Feb 04

I'd say that PHP is easier overall, but....

If you learn ASP you can use a syntax form in PHP that allows you to use your ASP tag wraps. Your PHP options are as follows:

<?php

// These are your standard PHP tags that wrap your script

?>

Alternatives are:


<? // Short tags ?>

<% // ASP tags %>

and finally

< SCRIPT LANGUAGE="php" >

// Script tags

</SCRIPT>

So if you already know ASP you can use the familiar ASP tag syntax to open and close your PHP scripts.

ASP has several variable options for scripting but if you require deep integration with MS Office it is by far your best bet since you can hook into and export out to pretty much any MS Office application with ease. The latest ASP.NET offers some very interesting ways of data linking.

But back to PHP, I think it is far easier to learn overall than ASP. You can use PHP with an Access or MS SQL database [why anyone would want to is another story] and you can export from PHP to Excel format. PHP also allows you to create PDF files from source data on the fly, images can be autothumbnailed and gallery displayed from souce pictures without you having to manually resize them to fit in your web pages and the vast majority of web hosts support PHP and MySQL for no extra charge.

Apache, PHP and MySQL combine to make a serious set of tools and while using MySQL is nowhere near as pleasant an experience as Access, FileMaker, Alpha Five and similar database products you can download the excellent PHPMyAdmin or the wonderful MySQL Front which allow you to easily create and edit MySQL databases. PHPMyAdmin does this using your web browser while MySQL Front has its own GUI.

Sites like DevShed have loads of free access material on setting up and getting started with PHP and a search for PHP tutorials on the web will give you loads of information and a lot of free samples to download and play with.

Finally, PHP and MySQL along with MySQL Front and PHPMyAdmin are very cost effective.

You can download and use them for free...

If you need more info or want some web links post again.

T

  Handy Spinner 23:58 06 Feb 04

Thanks, how do I get started in PHP? Any downloadable tutorials? What software do I need? Thanks again.

  Taran 09:26 07 Feb 04

One of the best "getting started" articles is click here

I'd download the PDF version and keep it for future reference. The same site has a ton of tutorial articles on PHP and MySQL.

Download Apache click here

I'd stick with version Apache 1.3.29 instead of version 2 since most web hosts use this version and Apache 2 has a couple of glitches when used with the PHP plugin which are currently being ironed out.

The Developer Shed article concentrates on installing Apache 2, so if you follow the instructions in the article for installation but you use Apache 1.3.29 make sure you copy and name the correct PHP Apache DLL file called php4apache.dll and not php4apache2.dll as listed in the article which is for version 2.

mySQL can be downloaded from click here

Make sure you pick one of the Windows downloads.

PHP can be had from click here

PHPMyAdmin click here is a web browser interface for you to create, alter and otherwise manipulate MySQL databases and it greatly speeds up your workflow.

MySQL Front is click here and offers some very powerful features including importing tables from Access and other nice things.

All of the above are free to download and also free to use and between them they make up a toolbox with enough features to generate some huge and very complex web applications.

If you want a book on PHP and MySQL you could click here and look at the suggestion by PurplePenny. The book she suggests is one of the very best to get you up and running.

Aside from that a search on the web will produce more free PHP tutorials than you could ever hope to wade through. The PHP site has a user manual you can download as well as a number of tutorials and the excellent Zend site has some truly superb articles click here

If you need more post again but this lot should keep you out of mischief for a day or two...

;o)

  Handy Spinner 14:16 11 Feb 04

Yes, definitely, Taran!

Thanks.

This thread is now locked and can not be replied to.

What is Amazon Go and will it come to the UK? The store without checkouts or queues

1995-2015: How technology has changed the world in 20 years

Why ecommerce hasn't taken off on social media

New MacBook Pro 2016 review | MacBook Pro with Touch Bar review: Apple's expensive and powerful…