Jump to content

To PHP or CGI?


Elemental

Recommended Posts

Hey Folks, As a NEWBIE to most of this stuff, I was in the middle of a conversation to which I could give ZERO input since it dealt with scripting; and if I know little about HTML and CSS I know less than ZERO about scripting, thus my questionTo PHP or CGI?I mean, okay, I know of it and what it does, well sort of, but I know nothing about its workings; How, When, Why or even Which or What.I know there are others, I'm not a total ... never mind, ASP being one of them although to my understanding ASP is for Windows Servers only and since I'm all about choices, small as they may sometimes be, Linux seems to be my kind of server; tips anyone?So, to PHP or CGI?All comments are welcomed I have no stake in either although I could bet my last dime that I should be familiar with all of them, including ASP I’m sure.

Link to comment
Share on other sites

I would suggest PHP - it is easier to work with, faster, and there is more support in online communities (and it can run on Linux servers).How - Download a text editor, and find a host with PHP support or install a server then PHP on your computer (or a package such as WAMP). Then, check out http://www.w3schools.com/php/ to get started!When - Well, whenever you are ready I suppose.Why - Because you will be able to make much better and more dynamic web pages once you have learnt it.Which - PHP... but of course there is nothing stopping you learning others are well.What - Isn't that sort of the same as which?Good luck!

Link to comment
Share on other sites

The usual CGI interface is perl. I suppose benchmark tests can prove that it's slower than PHP, but in practice you really can't notice. It's a very C-like script, and it does run on Linux for heaven's sake. If you're accustomed to a C-like mode of functional programming (which includes Javascript, BTW) perl comes very naturally. Perl scripting also encourages a clear distinction between markup and content.PHP has several advantages. To the newbie, it integrates with HTML in a very natural way. It also has a gazillion native routines that apply to HTML by design. In perl, you either have to import a lot of library code or write your own routines. So PHP is much easier to learn. That said, I think that if PHP is your learning experience, you may acquire some habits that make mark-up and content difficult to distinguish, and can lead to bad coding practices.I'm NOT saying this is inevitable. Careful PHP scripting probably is better and more efficient than careful perl scripting. But if you already know C or Javascript, perl may be a faster way to get on board.As always, these thoughts are for the record, not just the OP.

Link to comment
Share on other sites

In miost terms PHP is a very easy scripting language to learn, and like Perl, PHP is based from a C/C++ type syntax. In today's terms, Perl is less used and less favoured by the market - PHP is the future for server-side scripting languages, its easy to learn, it has a function for almost everything, which makes it very easy to use. To me, PHP is very logical, its easy to make big scripts, with little work from the programmer.Overall, if you're looking for a scripting language that is easy to learn, and has the functionality of any other scripting language, and more - go for PHP. If you like a strong C-type syntax, go with Perl. Besides, to me, PHP is used more in the freelancing industry, and Perl used more in the corporate business trade, but either way it's all up to you.

Link to comment
Share on other sites

Synook; Deirdre's Dad; StormForum, Thank you ALL for your reply and advise, it's much appreciated.Peace,Elemental

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...